fixed plugin require lsp integration and made reloading safer and more clean
This commit is contained in:
1 parent
456f03e4eb
commit
29fbaa1522
6 files changed
+51
-40
No files matched your search
@@ -11,7 +11,9 @@ local config = function()
|
||||
vim.o.signcolumn = 'yes'
|
||||
|
||||
local map = function(from, to)
|
||||
vim.keymap.set('n', from, to, { noremap = true, silent = true, buffer = bufnr })
|
||||
vim.keymap.set('n', from, to,
|
||||
{ noremap = true, silent = true, buffer = bufnr }
|
||||
)
|
||||
end
|
||||
|
||||
map('gd', vim.lsp.buf.definition)
|
||||
@@ -33,7 +35,9 @@ local config = function()
|
||||
map('<space>fm', vim.lsp.buf.formatting)
|
||||
end
|
||||
|
||||
local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||
local capabilities = require 'cmp_nvim_lsp'.update_capabilities(
|
||||
vim.lsp.protocol.make_client_capabilities()
|
||||
)
|
||||
|
||||
require 'lspconfig'.sumneko_lua.setup {
|
||||
on_attach = on_attach,
|
||||
@@ -43,6 +47,12 @@ local config = function()
|
||||
diagnostics = {
|
||||
globals = { 'vim' },
|
||||
},
|
||||
workspace = {
|
||||
library = vim.api.nvim_get_runtime_file("", true)
|
||||
},
|
||||
telemetry = {
|
||||
enable = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -75,7 +85,6 @@ return function(use)
|
||||
'mfussenegger/nvim-dap',
|
||||
}
|
||||
}
|
||||
use 'tjdevries/nlua.nvim'
|
||||
use {
|
||||
'windwp/nvim-autopairs',
|
||||
config = function() require 'nvim-autopairs'.setup {} end
|
||||
|
||||
Reference in new issue
Block a user