From d4df85e1ff389748b8a44f586f1653c281f02eaf Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Tue, 22 Nov 2022 14:56:24 +0300 Subject: nvim: update nvim-lspcofig, config --- .config/nvim/lua/plugin_settings.lua | 9 ++++++--- .config/nvim/lua/plugins.lua | 2 -- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to '.config') diff --git a/.config/nvim/lua/plugin_settings.lua b/.config/nvim/lua/plugin_settings.lua index 734efd3..a965f6b 100644 --- a/.config/nvim/lua/plugin_settings.lua +++ b/.config/nvim/lua/plugin_settings.lua @@ -327,7 +327,7 @@ cmp.setup({ -- }}} nvim-cmp -- --- nvim-lsp {{{ -- +-- nvim-lspconfig {{{ -- local nvim_lsp = require('lspconfig') -- Mappings. @@ -360,18 +360,21 @@ local on_attach = function(client, bufnr) vim.keymap.set('n', 'fm', vim.lsp.buf.formatting, bufopts) end +-- bring in cmp_nvim_lsp +local capabilities = require('cmp_nvim_lsp').default_capabilities() + local servers = { 'rust_analyzer', 'jedi_language_server', 'texlab', 'clangd', 'ltex' } for _, lsp in ipairs(servers) do nvim_lsp[lsp].setup { on_attach = on_attach, - capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities()) + capabilities = capabilities } end nvim_lsp['efm'].setup{ on_attach = on_attach, filetypes = { 'sh' }, - capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities()) + capabilities = capabilities } -- }}} nvim-lsp -- diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua index 2628272..af639e3 100644 --- a/.config/nvim/lua/plugins.lua +++ b/.config/nvim/lua/plugins.lua @@ -26,8 +26,6 @@ return require('packer').startup(function() use 'neovim/nvim-lspconfig' -- annotation generator - -- learn to use it 2022-05-17 00:44 - -- https://github.com/danymat/neogen use { "danymat/neogen", config = function() -- cgit v1.2.3-70-g09d2