feat(nvim): replace discontinued rust-tools.nvim with rustaceanvim

This commit is contained in:
mandlm 2024-01-09 09:11:19 +01:00
parent 76062fc63f
commit af9a0ec6d0
Signed by: mandlm
GPG Key ID: 4AA25D647AA54CC7
2 changed files with 9 additions and 12 deletions

View File

@ -97,10 +97,11 @@
# LSP
nvim-lspconfig
lsp-status-nvim
rust-tools-nvim
rustaceanvim
neodev-nvim
null-ls-nvim
lsp_lines-nvim
lsp-inlayhints-nvim
# debugging
nvim-dap

View File

@ -15,6 +15,8 @@ local on_attach = function(client, bufnr)
})
end
require("lsp-inlayhints").on_attach(client, bufnr)
local telescope = require("telescope.builtin")
nnoremap("gD", vim.lsp.buf.declaration)
@ -40,6 +42,8 @@ local on_attach = function(client, bufnr)
end
end
require("lsp-inlayhints").setup({})
local lsp_status = require("lsp-status")
lsp_status.config({
current_function = false,
@ -118,12 +122,8 @@ for lsp, settings in pairs(servers) do
})
end
-- setup rust tools
local codelldb_base_path = vim.env.HOME .. "/.vscode-extensions/vscode-lldb/share/vscode/extensions/vadimcn.vscode-lldb/"
local codelldb_bin_path = codelldb_base_path .. 'adapter/codelldb'
local codelldb_lib_path = codelldb_base_path .. 'lldb/lib/liblldb.so'
require("rust-tools").setup({
-- setup rustaceanvim
vim.g.rustaceanvim = {
server = {
on_attach = on_attach,
settings = {
@ -137,12 +137,8 @@ require("rust-tools").setup({
},
},
},
capabilities = capabilities,
},
dap = {
adapter = require("rust-tools.dap").get_codelldb_adapter(codelldb_bin_path, codelldb_lib_path)
},
})
}
-- setup null-ls for markdown formatting
local null_ls = require("null-ls")