diff options
| author | Alec Goncharow <alec@goncharow.dev> | 2024-01-12 22:53:56 -0500 |
|---|---|---|
| committer | Alec Goncharow <alec@goncharow.dev> | 2024-01-12 22:53:56 -0500 |
| commit | ce07d4c3f62e4134b3869d02b091b911c40b945d (patch) | |
| tree | 06fa4841ea73538eab900afa3e194318239709a5 /.config/nvim | |
| parent | 02e1c9be35e13e26b34bbfd680e18f3093ee2949 (diff) | |
fzf is love, fzf is life
also some more twiddling with syntax and such
Diffstat (limited to '.config/nvim')
| -rw-r--r-- | .config/nvim/colors/yaks.vim | 8 | ||||
| -rw-r--r-- | .config/nvim/lua/lsp.lua | 25 | ||||
| -rw-r--r-- | .config/nvim/lua/lspsaga_conf.lua | 4 | ||||
| -rw-r--r-- | .config/nvim/lua/settings.lua | 5 | ||||
| -rw-r--r-- | .config/nvim/syntax/zig.vim | 3 |
5 files changed, 18 insertions, 27 deletions
diff --git a/.config/nvim/colors/yaks.vim b/.config/nvim/colors/yaks.vim index 3d7ba89..ab1f49b 100644 --- a/.config/nvim/colors/yaks.vim +++ b/.config/nvim/colors/yaks.vim @@ -12,7 +12,7 @@ endif let g:colors_name="yaks" -" Primary colors stolen from +" Primary colors mostly stolen from " https://github.com/ryanpcmcquen/sublime_witness/blob/master/Witness.sublime-color-scheme "---------------------------------------------------------------- @@ -160,9 +160,9 @@ hi SpellCap guifg=#ede0ab guibg=#7f7f43 gui=underline hi SpellLocal guifg=#ede0ab guibg=#7f7f43 gui=underline hi SpellRare guifg=#ede0ab guibg=#7f7f43 gui=underline - -" lol - +" -------------------------------- +" flailing +" -------------------------------- hi CmpGhostText guifg=lightblue guifg=none gui=italic hi link zigVarDecl Keyword diff --git a/.config/nvim/lua/lsp.lua b/.config/nvim/lua/lsp.lua index 0c6fcd2..55e70cc 100644 --- a/.config/nvim/lua/lsp.lua +++ b/.config/nvim/lua/lsp.lua @@ -26,16 +26,6 @@ local on_attach = function(client, bufnr) end, bufopts) vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, bufopts) vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, bufopts) - --- following functions are now managed under ./lspsaga_conf.lua - -- vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts) - -- vim.keymap.set('n', '<space>ca', vim.lsp.buf.code_action, bufopts) - -- vim.keymap.set('v', '<space>ca', vim.lsp.buf.code_action, bufopts) - -- vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts) see ./lspsaga_conf.lua - -- vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts) - -- vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts) - - -- vim.keymap.set('n', '<space>f', function() vim.lsp.buf.format { async = true } end, bufopts) - -- vim.keymap.set('v', '<space>f', function() vim.lsp.buf.format { async = true } end, bufopts) -- disable lsp highlighting -- client.server_capabilities.semanticTokensProvider = nil end @@ -76,6 +66,10 @@ lspconfig.bashls.setup({ capabilities = capabilities, }) +lspconfig.vimls.setup({ + on_attach = on_attach, + capabilities = capabilities, +}) require 'lspconfig'.sqlls.setup({ server = { @@ -100,6 +94,7 @@ lspconfig.yamlls.setup { } } + lspconfig.lua_ls.setup { on_attach = on_attach, capabilities = capabilities, @@ -147,19 +142,9 @@ lspconfig.sqls.setup { }, } --- close quickfix menu after selecting choice -vim.api.nvim_create_autocmd( - "FileType", { - pattern = { "qf" }, - command = [[nnoremap <buffer> <CR> <CR>:cclose<CR>]] - }) - vim.api.nvim_create_autocmd('BufWritePre', { pattern = '*.go', callback = function() vim.lsp.buf.code_action({ context = { only = { 'source.organizeImports' } }, apply = true }) end }) - --- local autocmd = vim.api.nvim_create_autocmd --- autocmd({ "BufLeave" }, { pattern = { "*" }, command = "if &buftype == 'quickfix'|q|endif" }) diff --git a/.config/nvim/lua/lspsaga_conf.lua b/.config/nvim/lua/lspsaga_conf.lua index 37dc583..4400dd3 100644 --- a/.config/nvim/lua/lspsaga_conf.lua +++ b/.config/nvim/lua/lspsaga_conf.lua @@ -13,7 +13,7 @@ require('lspsaga').setup({ layout = 'float', keys = { toggle_or_jump = '<cr>', - quit = 'q', + quit = { 'q', '<ESC>' }, jump = 'e', }, }, @@ -33,7 +33,7 @@ require('lspsaga').setup({ diagnostic_only_current = false, keys = { exec_action = 'o', - quit = 'q', + quit = { 'q', '<ESC>' }, toggle_or_jump = '<CR>', quit_in_show = { 'q', '<ESC>' }, }, diff --git a/.config/nvim/lua/settings.lua b/.config/nvim/lua/settings.lua index 36bab36..90d7f5a 100644 --- a/.config/nvim/lua/settings.lua +++ b/.config/nvim/lua/settings.lua @@ -96,9 +96,12 @@ function! SynStack() endif echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")') endfunc - command! Synstack call SynStack() ]]) +-- highlights the list of words following "Todo" if they are parsed in what looks like a comment +vim.cmd([[ +autocmd Syntax * syntax keyword Todo note NOTE fixme FIXME todo TODO speed SPEED hack HACK safety SAFETY containedin=.*Comment +]]) vim.cmd('colorscheme yaks') diff --git a/.config/nvim/syntax/zig.vim b/.config/nvim/syntax/zig.vim index 9b5a3d0..58a8973 100644 --- a/.config/nvim/syntax/zig.vim +++ b/.config/nvim/syntax/zig.vim @@ -1,3 +1,6 @@ +" NOTE I don't know how any of this works, I just yoinked it from zig vim +" plugin for syntax highlighting debugging, keeping it around for now +" " Vim syntax file " Language: Zig " Maintainer: Andrew Kelley |
