feat(nvim): replace discontinued rust-tools.nvim with rustaceanvim
parent
76062fc63f
commit
af9a0ec6d0
|
@ -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
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue