diff options
author | Yigit Sever | 2022-11-22 14:56:24 +0300 |
---|---|---|
committer | Yigit Sever | 2022-11-22 14:56:24 +0300 |
commit | d4df85e1ff389748b8a44f586f1653c281f02eaf (patch) | |
tree | ee7e406f26fac11a12e48342c5cda76914315026 /.config/nvim/lua/plugin_settings.lua | |
parent | ec70d536b9182c6946b52da0af8587be82d418fb (diff) | |
download | dotfiles-d4df85e1ff389748b8a44f586f1653c281f02eaf.tar.gz dotfiles-d4df85e1ff389748b8a44f586f1653c281f02eaf.tar.bz2 dotfiles-d4df85e1ff389748b8a44f586f1653c281f02eaf.zip |
nvim: update nvim-lspcofig, config
Diffstat (limited to '.config/nvim/lua/plugin_settings.lua')
-rw-r--r-- | .config/nvim/lua/plugin_settings.lua | 9 |
1 files changed, 6 insertions, 3 deletions
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({ | |||
327 | 327 | ||
328 | -- }}} nvim-cmp -- | 328 | -- }}} nvim-cmp -- |
329 | 329 | ||
330 | -- nvim-lsp {{{ -- | 330 | -- nvim-lspconfig {{{ -- |
331 | local nvim_lsp = require('lspconfig') | 331 | local nvim_lsp = require('lspconfig') |
332 | 332 | ||
333 | -- Mappings. | 333 | -- Mappings. |
@@ -360,18 +360,21 @@ local on_attach = function(client, bufnr) | |||
360 | vim.keymap.set('n', '<leader>fm', vim.lsp.buf.formatting, bufopts) | 360 | vim.keymap.set('n', '<leader>fm', vim.lsp.buf.formatting, bufopts) |
361 | end | 361 | end |
362 | 362 | ||
363 | -- bring in cmp_nvim_lsp | ||
364 | local capabilities = require('cmp_nvim_lsp').default_capabilities() | ||
365 | |||
363 | local servers = { 'rust_analyzer', 'jedi_language_server', 'texlab', 'clangd', 'ltex' } | 366 | local servers = { 'rust_analyzer', 'jedi_language_server', 'texlab', 'clangd', 'ltex' } |
364 | for _, lsp in ipairs(servers) do | 367 | for _, lsp in ipairs(servers) do |
365 | nvim_lsp[lsp].setup { | 368 | nvim_lsp[lsp].setup { |
366 | on_attach = on_attach, | 369 | on_attach = on_attach, |
367 | capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities()) | 370 | capabilities = capabilities |
368 | } | 371 | } |
369 | end | 372 | end |
370 | 373 | ||
371 | nvim_lsp['efm'].setup{ | 374 | nvim_lsp['efm'].setup{ |
372 | on_attach = on_attach, | 375 | on_attach = on_attach, |
373 | filetypes = { 'sh' }, | 376 | filetypes = { 'sh' }, |
374 | capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities()) | 377 | capabilities = capabilities |
375 | } | 378 | } |
376 | 379 | ||
377 | -- }}} nvim-lsp -- | 380 | -- }}} nvim-lsp -- |