Lsp update, rust

This commit is contained in:
Curt Spark 2025-11-22 18:26:51 +00:00
parent 02a96a28ff
commit 11ccd37e73
1 changed files with 30 additions and 1 deletions

View File

@ -184,6 +184,7 @@ require('neogen').setup {
-- LSP Configuration -- LSP Configuration
local lsp_zero = require('lsp-zero') local lsp_zero = require('lsp-zero')
-- https://lsp-zero.netlify.app/v3.x/language-server-configuration.html#default-keybindings -- 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.on_attach(function(client, bufnr)
lsp_zero.default_keymaps({ lsp_zero.default_keymaps({
buffer = bufnr, buffer = bufnr,
@ -191,10 +192,28 @@ lsp_zero.on_attach(function(client, bufnr)
}) })
end) end)
--local lspconfig = vim.lsp.config() --local lspconfig = require("lspconfig")
vim.lsp.enable("lua_ls") vim.lsp.enable("lua_ls")
vim.lsp.enable("bashls") 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.enable("clangd")
vim.lsp.config("clangd", {
init_options = {
fallbackFlags = { "--compile-commands-dir=.\\compile_commands.json" },
},
})
vim.lsp.enable("gopls") vim.lsp.enable("gopls")
vim.lsp.enable("jdtls") vim.lsp.enable("jdtls")
vim.lsp.enable("eslint") vim.lsp.enable("eslint")
@ -213,6 +232,16 @@ vim.lsp.enable("ansiblels")
vim.lsp.enable("sourcekit", { vim.lsp.enable("sourcekit", {
filetypes = { "swift" }, filetypes = { "swift" },
}) })
vim.lsp.enable("rust_analyzer", {
settings = {
['rust-analyzer'] = {
diagnostics = {
enable = false;
}
}
},
filetypes = { "rust" }
})
-- vim.lsp.enable("yamlls", { -- vim.lsp.enable("yamlls", {
-- settings = { -- settings = {
-- yaml = { -- yaml = {