|
@ -1,9 +1,14 @@ |
|
|
-- Learn the keybindings, see :help lsp-zero-keybindings |
|
|
-- Learn the keybindings, see :help lsp-zero-keybindings |
|
|
-- Learn to configure LSP servers, see :help lsp-zero-api-showcase |
|
|
-- Learn to configure LSP servers, see :help lsp-zero-api-showcase |
|
|
local lsp = require('lsp-zero') |
|
|
local lsp = require('lsp-zero') |
|
|
local lspconfig = require('lspconfig'); |
|
|
|
|
|
lsp.preset('recommended') |
|
|
lsp.preset('recommended') |
|
|
|
|
|
|
|
|
|
|
|
lsp.setup_nvim_cmp({ |
|
|
|
|
|
experimental = { |
|
|
|
|
|
ghost_text = true, |
|
|
|
|
|
}, |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
-- (Optional) Configure lua language server for neovim |
|
|
-- (Optional) Configure lua language server for neovim |
|
|
lsp.nvim_workspace() |
|
|
lsp.nvim_workspace() |
|
|
|
|
|
|
|
@ -34,6 +39,7 @@ lsp.on_attach(function(client, bufnr) |
|
|
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts) |
|
|
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts) |
|
|
end) |
|
|
end) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lsp.setup() |
|
|
lsp.setup() |
|
|
|
|
|
|
|
|
vim.diagnostic.config({ |
|
|
vim.diagnostic.config({ |
|
|