Browse Source

feat: add rust to lspconfig

master
Tovi Jaeschke-Rogers 5 months ago
parent
commit
d1a7d12316
2 changed files with 23 additions and 7 deletions
  1. +20
    -7
      .config/nvim/lua/tovi/plugins/lspconfig.lua
  2. +3
    -0
      .zshrc

+ 20
- 7
.config/nvim/lua/tovi/plugins/lspconfig.lua View File

@ -223,6 +223,19 @@ return {
dartls = {
cmd = { "dart", "language-server", "--protocol=lsp" },
},
rust_analyzer = {
settings = {
["rust-analyzer"] = {
cargo = {
features = {
"client",
"server",
},
},
},
},
},
}
require("mason").setup()
@ -245,15 +258,15 @@ return {
})
require("mason-tool-installer").setup({
ensure_installed = ensure_installed,
run_on_start = false,
})
ensure_installed = ensure_installed,
run_on_start = false,
})
require("mason-lspconfig").setup()
for server_name, server in pairs(servers) do
server.capabilities = vim.tbl_deep_extend("force", {}, capabilities, server.capabilities or {})
require("lspconfig")[server_name].setup(server)
end
for server_name, server in pairs(servers) do
server.capabilities = vim.tbl_deep_extend("force", {}, capabilities, server.capabilities or {})
require("lspconfig")[server_name].setup(server)
end
end,
}

+ 3
- 0
.zshrc View File

@ -103,5 +103,8 @@ source ~/.config/aliasrc
# Source fzf for Ctrl+r
source <(fzf --zsh)
. "$HOME/.cargo/env"
# Speed debugging
# zprof
#

Loading…
Cancel
Save