diff options
Diffstat (limited to '.config/nvim/lua')
-rw-r--r-- | .config/nvim/lua/lsp_conf.lua | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/.config/nvim/lua/lsp_conf.lua b/.config/nvim/lua/lsp_conf.lua index e339a5c..35f88eb 100644 --- a/.config/nvim/lua/lsp_conf.lua +++ b/.config/nvim/lua/lsp_conf.lua @@ -11,10 +11,10 @@ for type, icon in pairs(signs) do vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = '' }) end -local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end +--local function vim.keymap.set(...) vim.api.nvim_vim.keymap.set(bufnr, ...) end local opts = { noremap=true, silent=true } -null_ls.config({ +null_ls.setup({ debug = false, save_after_format = false, sources = { @@ -48,11 +48,11 @@ for _, lsp in ipairs(servers) do local opts = { noremap=true, silent=true } -- See `:help vim.lsp.*` for documentation on any of the below functions - buf_set_keymap('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', opts) - buf_set_keymap('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts) - buf_set_keymap('n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts) - buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts) - buf_set_keymap('n', '<space>e', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts) + vim.keymap.set('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', opts) + vim.keymap.set('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts) + vim.keymap.set('n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts) + vim.keymap.set('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts) + vim.keymap.set('n', '<space>e', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts) end, flags = { debounce_text_changes = 150, @@ -60,18 +60,19 @@ for _, lsp in ipairs(servers) do } end -nvim_lsp["null-ls"].setup({ - on_attach = function(client) - if client.resolved_capabilities.document_formatting then - buf_set_keymap('n', '<A-f>', '<cmd>lua vim.lsp.buf.formatting_sync()<cr>', opts) - vim.cmd "autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting_seq_sync()" - end - end -}) - +-- nvim_lsp["null-ls"].setup({ +-- on_attach = function(client) +-- if client.resolved_capabilities.document_formatting then +-- vim.keymap.set('n', '<A-f>', '<cmd>lua vim.lsp.buf.formatting_sync()<cr>', opts) +-- vim.cmd "autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting_seq_sync()" +-- end +-- end +-- }) +-- +-- trouble.setup({ - use_lsp_diagnostic_signs = true, + use_diagnostic_signs = true, auto_close = true, - auto_open = true + auto_open = false }) |