summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Noll <nbnoll@eml.cc>2021-09-15 17:14:08 -0700
committerNicholas Noll <nbnoll@eml.cc>2021-09-15 17:14:08 -0700
commit48e9e919f6077b41dfc43af6e56734d978a3fb21 (patch)
treed90054b1ff0b142fb17fe9675b4757ed6597e0f5
parentd93876512c942ef7c8080edb29a1904c8c7e704f (diff)
chore: fixed regression with nvim colorscheme by managing directly
-rw-r--r--.config/fish/config.fish2
-rw-r--r--.config/nvim/init.lua3
-rw-r--r--.config/nvim/lua/keybind.lua1
-rw-r--r--.config/nvim/lua/lsp.lua9
-rw-r--r--.config/nvim/lua/settings.lua5
-rw-r--r--.config/nvim/lua/theme.lua179
-rw-r--r--.config/nvim/pack/vendor/packages8
7 files changed, 182 insertions, 25 deletions
diff --git a/.config/fish/config.fish b/.config/fish/config.fish
index 39f68a4..e92ca09 100644
--- a/.config/fish/config.fish
+++ b/.config/fish/config.fish
@@ -56,7 +56,7 @@ alias mnt-pod='sshfs nbnoll@pod-login1.cnsi.ucsb.edu:/home/nbnoll $HOME/mnt/clus
alias ssh-knot='ssh -X nbnoll@knot7.cnsi.ucsb.edu'
alias mnt-knot='sshfs nbnoll@knot7.cnsi.ucsb.edu:/home/nbnoll $HOME/mnt/cluster'
-alias ssh-server='ssh root@nbnoll.xyz'
+alias ssh-server='ssh admin@nbnoll.xyz'
alias umnt-cluster='umount $HOME/mnt/cluster'
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua
index 86824e6..ee1370e 100644
--- a/.config/nvim/init.lua
+++ b/.config/nvim/init.lua
@@ -22,7 +22,7 @@ vim.cmd("packadd termdebug")
-- commands
vim.cmd('filetype indent plugin on')
-vim.cmd('syntax on')
+vim.cmd('syntax enable')
--------------------------------------------------------------------------
-- includes
@@ -32,3 +32,4 @@ require("theme")
require("function")
require("keybind")
require("lsp")
+require("todo")
diff --git a/.config/nvim/lua/keybind.lua b/.config/nvim/lua/keybind.lua
index 929b449..d97074d 100644
--- a/.config/nvim/lua/keybind.lua
+++ b/.config/nvim/lua/keybind.lua
@@ -24,7 +24,6 @@ vim.api.nvim_set_keymap("n", "<Leader>b", ":Buffers<CR>", { noremap = true, sile
vim.api.nvim_set_keymap("n", "<Leader>l", ":Lines<CR>", { noremap = true, silent = true })
vim.api.nvim_set_keymap("n", "<Leader>w", ":BLines<CR>", { noremap = true, silent = true })
-vim.api.nvim_set_keymap("n", "<Leader>o", ":only<CR>", { noremap = true, silent = true })
vim.api.nvim_set_keymap("n", "<Leader>|", ":wincmd |<CR>", { noremap = true, silent = true })
vim.api.nvim_set_keymap("n", "<Leader>=", ":wincmd =<CR>", { noremap = true, silent = true })
vim.api.nvim_set_keymap("n", "<Leader>r", ":wincmd R<CR>", { noremap = true, silent = true })
diff --git a/.config/nvim/lua/lsp.lua b/.config/nvim/lua/lsp.lua
index 33f71e8..98caa7f 100644
--- a/.config/nvim/lua/lsp.lua
+++ b/.config/nvim/lua/lsp.lua
@@ -1,4 +1,5 @@
local lsp = require('lspconfig')
+local git = require('neogit')
local setup = function(client, buffer)
local function set_keymap(...) vim.api.nvim_buf_set_keymap(buffer, ...) end
@@ -17,13 +18,9 @@ local setup = function(client, buffer)
set_keymap('n', '[c', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)
set_keymap('n', ']c', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts)
set_keymap('n', '<space>e', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts)
- --[[
- set_keymap('n', '<space>dt', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
- set_keymap('n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
- --]]
end
-local servers = { 'clangd', 'julials', 'tsserver' }
+local servers = { 'clangd', 'tsserver' }
for _, s in ipairs(servers) do
lsp[s].setup {
on_attach=setup,
@@ -38,3 +35,5 @@ vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
virtual_text = false
}
)
+
+git.setup({})
diff --git a/.config/nvim/lua/settings.lua b/.config/nvim/lua/settings.lua
index b8c9440..2d77b7a 100644
--- a/.config/nvim/lua/settings.lua
+++ b/.config/nvim/lua/settings.lua
@@ -26,10 +26,10 @@ opt.fillchars = {
vert = '┃', -- BOX DRAWINGS HEAVY VERTICAL (U+2503, UTF-8: E2 94 83)
}
opt.foldlevelstart = 99 -- start unfolded
-opt.foldmethod = 'syntax' -- not as cool as syntax, but faster
+opt.foldmethod = 'indent' -- not as cool as syntax, but faster
opt.formatoptions = opt.formatoptions + 'j' -- remove comment leader when joining comment lines
opt.formatoptions = opt.formatoptions + 'n' -- smart auto-indenting inside numbered lists
-opt.guifont = 'Inconsolata'
+opt.guifont = 'consolas'
opt.hidden = true -- allows you to hide buffers with unsaved changes without being prompted
opt.inccommand = 'split' -- live preview of :s results
opt.incsearch = true -- live preview of search hits
@@ -79,7 +79,6 @@ else
opt.shada = "'0,<0,f0,n~/.vim/tmp/shada"
end
-opt.shell = 'sh' -- shell to use for `!`, `:!`, `system()` etc.
opt.shiftround = false -- don't always indent by multiple of shiftwidth
opt.shiftwidth = 4 -- spaces per tab (when shifting)
opt.shortmess = opt.shortmess + 'A' -- ignore annoying swapfile messages
diff --git a/.config/nvim/lua/theme.lua b/.config/nvim/lua/theme.lua
index f4f5789..83e9c0a 100644
--- a/.config/nvim/lua/theme.lua
+++ b/.config/nvim/lua/theme.lua
@@ -1,15 +1,170 @@
-vim.cmd("colorscheme seoul256")
+vim.cmd("hi clear")
-vim.cmd("hi Normal guibg=NONE ctermbg=NONE")
-vim.cmd("hi NonText guibg=NONE ctermbg=NONE")
-vim.cmd("hi EndOfBuffer guibg=NONE ctermbg=NONE")
-vim.cmd("hi LineNr guibg=NONE ctermbg=NONE")
-vim.cmd("hi SignColumn guibg=NONE ctermbg=NONE")
-vim.cmd("hi VertSplit guibg=NONE ctermbg=NONE ")
+local theme = {
+ [22] = '#006F00', [23] = '#007173', [24] = '#007299', [25] = '#0074BE',
+ [30] = '#009799', [31] = '#0099BD', [38] = '#00BDDF', [52] = '#730B00',
+ [58] = '#727100', [59] = '#727272', [65] = '#719872', [66] = '#719899',
+ [67] = '#7299BC', [68] = '#719CDF', [73] = '#6FBCBD', [74] = '#70BDDF',
+ [88] = '#9B1300', [89] = '#9B1D72', [94] = '#9A7200', [95] = '#9A7372',
+ [96] = '#9A7599', [101] = '#999872', [103] = '#999ABD', [108] = '#98BC99',
+ [109] = '#98BCBD', [110] = '#98BEDE', [116] = '#97DDDF', [125] = '#BF2172',
+ [131] = '#BE7572', [137] = '#BE9873', [143] = '#BDBB72', [144] = '#BDBC98',
+ [145] = '#BDBDBD', [151] = '#BCDDBD', [152] = '#BCDEDE', [153] = '#BCE0FF',
+ [161] = '#E12672', [168] = '#E17899', [173] = '#E19972', [174] = '#E09B99',
+ [179] = '#DFBC72', [181] = '#E0BEBC', [184] = '#DEDC00', [186] = '#DEDD99',
+ [187] = '#DFDEBD', [189] = '#DFDFFF', [216] = '#FFBD98', [217] = '#FFBFBD',
+ [218] = '#FFC0DE', [220] = '#FFDD00', [222] = '#FFDE99', [224] = '#FFDFDF',
+ [230] = '#FFFFDF', [231] = '#FFFFFF', [232] = '#060606', [233] = '#171717',
+ [234] = '#252525', [235] = '#333233', [236] = '#3F3F3F', [237] = '#4B4B4B',
+ [238] = '#565656', [239] = '#616161', [240] = '#6B6B6B', [241] = '#757575',
+ [249] = '#BFBFBF', [250] = '#C8C8C8', [251] = '#D1D0D1', [252] = '#D9D9D9',
+ [253] = '#E1E1E1', [254] = '#E9E9E9', [255] = '#F1F1F1',
-vim.cmd("hi Pmenu ctermbg=237 ctermfg=NONE cterm=NONE guibg=#3a3a3a guifg=NONE gui=NONE")
-vim.cmd("hi PmenuSbar ctermbg=236 ctermfg=NONE cterm=NONE guibg=#303030 guifg=NONE gui=NONE")
-vim.cmd("hi PmenuSel ctermbg=236 ctermfg=140 cterm=NONE guibg=#303030 guifg=#af87d7 gui=NONE")
-vim.cmd("hi PmenuThumb ctermbg=167 ctermfg=NONE cterm=NONE guibg=#d75f5f guifg=NONE gui=NONE")
+ ['nil'] = "",
+ ['none'] = 'NONE',
+}
-vim.cmd("set pumblend=10")
+function highlight(group, color)
+ local style = color.style and "gui=" .. color.style or "gui=NONE"
+ local fg = color.fg and "guifg=" .. color.fg or "guifg=NONE"
+ local bg = color.bg and "guibg=" .. color.bg or "guibg=NONE"
+ local sp = color.sp and "guisp=" .. color.sp or ""
+
+ local hl = "highlight " .. group .. " " .. style .. " " .. fg .. " " .. bg .. " " .. sp
+
+ vim.cmd(hl)
+
+ if color.link then vim.cmd("highlight! link " .. group .. " " .. color.link) end
+end
+
+local editor = {
+ Normal = {},
+ EndOfBuffer = {},
+ SignColumn = {},
+ NormalFloat = { fg = theme[252], bg = theme[237] },
+
+ Special = { fg = theme[216] },
+ SpecialKey = { fg = theme[59] },
+ NonText = { fg = theme[239] },
+ VertSplit = { fg = theme[239] },
+
+ LineNr = { fg = theme[101] },
+ CursorLineNr = { fg = theme[131] },
+ CursorLine = { bg = theme[236] },
+
+ Search = { fg = theme[252], bg = theme[24] },
+ IncSearch = { fg = theme[220], bg = theme[238] },
+
+ StatusLine = { fg = theme[95], bg = theme[187], style='reverse,bold' },
+ StatusLineNC = { fg = theme[239], bg = theme[187], style='reverse,bold' },
+ StatusLineTerm = { fg = theme[95], bg = theme[187], style='reverse,bold' },
+ StatusLineTermNC = { fg = theme[239], bg = theme[187], style='reverse,bold' },
+
+ TabLineFill = { fg = theme[239] },
+ TabLineSel = { fg = theme[187], bg = theme[23] },
+ TabLine = { fg = theme[249], bg = theme[241] },
+ WildMenu = { fg = theme[95], bg = theme[185] },
+
+ Title = { fg = theme[181] },
+ Question = { fg = theme[179] },
+ Conceal = { fg = theme[254], bg = theme[236] },
+ Ignore = { fg = theme[240], bg = theme[237] },
+
+ Visual = { bg = theme[23] },
+ VisualNOS = { bg = theme[23] },
+
+ Folded = { fg = theme[101], bg = theme[238] },
+ FoldColumn = { fg = theme[144], bg = theme[94] },
+
+ Pmenu = { fg = theme[238], bg = theme[224] },
+ PmenuSel = { fg = theme[252], bg = theme[89] },
+ PmenuSbar = { bg = theme[65] },
+ PmenuThumb = { bg = theme[23] },
+
+ SpellBad = { fg = theme[168], style = 'italic,undercurl' },
+ SpellCap = { fg = theme[110], style = 'italic,undercurl' },
+ SpellLocal = { fg = theme[153], style = 'italic,undercurl' },
+ SpellRare = { fg = theme[218], style = 'italic,undercurl' },
+
+ DiffAdd = { bg = theme[22] },
+ DiffDelete = { bg = theme[95] },
+ DiffChange = { bg = theme[235] },
+ DiffText = { bg = theme[52] },
+}
+
+for group, colors in pairs(editor) do highlight(group, colors) end
+
+local syntax = {
+ Number = { fg = theme[222] },
+ Float = { fg = theme[222] },
+ Boolean = { fg = theme[103] },
+ Constant = { fg = theme[73] },
+ Character = { fg = theme[174] },
+ String = { fg = theme[109] },
+ Identifier = { fg = theme[217] },
+ Delimiter = { fg = theme[137] },
+ StringDelimiter = { fg = theme[137] },
+
+ Type = { fg = theme[179], style='bold' },
+ Keyword = { fg = theme[168] },
+ Operator = { fg = theme[186] },
+ Structure = { fg = theme[116] },
+
+ Statement = { fg = theme[108] },
+ Conditional = { fg = theme[110] },
+ Repeat = { fg = theme[68], },
+ Function = { fg = theme[187] },
+
+ PreProc = { fg = theme[143] },
+ Comment = { fg = theme[65], style='italic' },
+ Todo = { fg = theme[161], bg = theme[235], style='bold' },
+
+ Define = { fg = theme[173] },
+ Macro = { fg = theme[173] },
+ Include = { fg = theme[173] },
+ PreCondit = { fg = theme[173] },
+
+ Exception = { fg = theme[161] },
+ Underlined = { fg = theme[181] },
+ Error = { fg = theme[252], bg = theme[52] },
+ ErrorMsg = { fg = theme[252], bg = theme[52] },
+}
+
+for group, colors in pairs(syntax) do highlight(group, colors) end
+
+-- TODO: don't hardcode these
+vim.g.terminal_color_0 = "#4E4E4D"
+vim.g.terminal_color_1 = "#D68787"
+vim.g.terminal_color_2 = "#5F865F"
+vim.g.terminal_color_3 = "#D8AF5F"
+vim.g.terminal_color_4 = "#85ADD4"
+vim.g.terminal_color_5 = "#D7AFAF"
+vim.g.terminal_color_6 = "#87AFAF"
+vim.g.terminal_color_7 = "#D0D0D0"
+vim.g.terminal_color_8 = "#626262"
+vim.g.terminal_color_9 = "#D75F87"
+vim.g.terminal_color_10 = "#87AF87"
+vim.g.terminal_color_11 = "#FFD787"
+vim.g.terminal_color_12 = "#ADD4FB"
+vim.g.terminal_color_13 = "#FFAFAF"
+vim.g.terminal_color_14 = "#87D7D7"
+vim.g.terminal_color_15 = "#E4E4E4"
+
+vim.g.fzf_colors = {
+ ["fg"] = {'fg', 'NormalFloat'},
+ ["bg"] = {'bg', 'NormalFloat'},
+ ["fg+"] = {'bg', 'StatusLine'},
+}
+
+vim.o.pumblend = 20
+
+-- dark-fg = 252, dark-bg = 237
+local plugins = {
+ -- vim-gitgutter
+ GitGutterAdd = { fg = theme[108], bg = theme[238] },
+ GitGutterChange = { fg = theme[68], bg = theme[238] },
+ GitGutterDelete = { fg = theme[161], bg = theme[238] },
+ GitGutterChangeDelete = { fg = theme[168], bg = theme[238] },
+}
+
+for group, colors in pairs(plugins) do highlight(group, colors) end
diff --git a/.config/nvim/pack/vendor/packages b/.config/nvim/pack/vendor/packages
index b2a1808..72e8ddd 100644
--- a/.config/nvim/pack/vendor/packages
+++ b/.config/nvim/pack/vendor/packages
@@ -2,14 +2,18 @@
neovim/nvim-lspconfig
-junegunn/seoul256.vim
+nvim-neorg/neorg
+nvim-lua/plenary.nvim
+nvim-treesitter/nvim-treesitter
+
+TimUntersberger/neogit
+
junegunn/fzf.vim
tpope/vim-surround
tpope/vim-repeat
tpope/vim-vinegar
tpope/vim-commentary
-tpope/vim-git
simeji/winresizer
adelarsq/vim-matchit