Lsp update, rust
This commit is contained in:
parent
02a96a28ff
commit
11ccd37e73
31
init.lua
31
init.lua
|
|
@ -184,6 +184,7 @@ require('neogen').setup {
|
|||
-- LSP Configuration
|
||||
local lsp_zero = require('lsp-zero')
|
||||
-- https://lsp-zero.netlify.app/v3.x/language-server-configuration.html#default-keybindings
|
||||
-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md
|
||||
lsp_zero.on_attach(function(client, bufnr)
|
||||
lsp_zero.default_keymaps({
|
||||
buffer = bufnr,
|
||||
|
|
@ -191,10 +192,28 @@ lsp_zero.on_attach(function(client, bufnr)
|
|||
})
|
||||
end)
|
||||
|
||||
--local lspconfig = vim.lsp.config()
|
||||
--local lspconfig = require("lspconfig")
|
||||
vim.lsp.enable("lua_ls")
|
||||
vim.lsp.enable("bashls")
|
||||
--vim.lsp.config("ccls", {
|
||||
-- init_options = {
|
||||
-- compilationDatabaseDirectory = "build";
|
||||
-- index = {
|
||||
-- threads = 0;
|
||||
-- };
|
||||
-- clang = {
|
||||
-- excludeArgs = { "-frounding-math"} ;
|
||||
-- };
|
||||
-- }
|
||||
--})
|
||||
--vim.lsp.enable('ccls')
|
||||
vim.lsp.enable("clangd")
|
||||
vim.lsp.config("clangd", {
|
||||
init_options = {
|
||||
fallbackFlags = { "--compile-commands-dir=.\\compile_commands.json" },
|
||||
},
|
||||
})
|
||||
|
||||
vim.lsp.enable("gopls")
|
||||
vim.lsp.enable("jdtls")
|
||||
vim.lsp.enable("eslint")
|
||||
|
|
@ -213,6 +232,16 @@ vim.lsp.enable("ansiblels")
|
|||
vim.lsp.enable("sourcekit", {
|
||||
filetypes = { "swift" },
|
||||
})
|
||||
vim.lsp.enable("rust_analyzer", {
|
||||
settings = {
|
||||
['rust-analyzer'] = {
|
||||
diagnostics = {
|
||||
enable = false;
|
||||
}
|
||||
}
|
||||
},
|
||||
filetypes = { "rust" }
|
||||
})
|
||||
-- vim.lsp.enable("yamlls", {
|
||||
-- settings = {
|
||||
-- yaml = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue