feat(nvim): replace discontinued rust-tools.nvim with rustaceanvim
This commit is contained in:
parent
76062fc63f
commit
af9a0ec6d0
2 changed files with 9 additions and 12 deletions
|
@ -97,10 +97,11 @@
|
||||||
# LSP
|
# LSP
|
||||||
nvim-lspconfig
|
nvim-lspconfig
|
||||||
lsp-status-nvim
|
lsp-status-nvim
|
||||||
rust-tools-nvim
|
rustaceanvim
|
||||||
neodev-nvim
|
neodev-nvim
|
||||||
null-ls-nvim
|
null-ls-nvim
|
||||||
lsp_lines-nvim
|
lsp_lines-nvim
|
||||||
|
lsp-inlayhints-nvim
|
||||||
|
|
||||||
# debugging
|
# debugging
|
||||||
nvim-dap
|
nvim-dap
|
||||||
|
|
|
@ -15,6 +15,8 @@ local on_attach = function(client, bufnr)
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
require("lsp-inlayhints").on_attach(client, bufnr)
|
||||||
|
|
||||||
local telescope = require("telescope.builtin")
|
local telescope = require("telescope.builtin")
|
||||||
|
|
||||||
nnoremap("gD", vim.lsp.buf.declaration)
|
nnoremap("gD", vim.lsp.buf.declaration)
|
||||||
|
@ -40,6 +42,8 @@ local on_attach = function(client, bufnr)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
require("lsp-inlayhints").setup({})
|
||||||
|
|
||||||
local lsp_status = require("lsp-status")
|
local lsp_status = require("lsp-status")
|
||||||
lsp_status.config({
|
lsp_status.config({
|
||||||
current_function = false,
|
current_function = false,
|
||||||
|
@ -118,12 +122,8 @@ for lsp, settings in pairs(servers) do
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
-- setup rust tools
|
-- setup rustaceanvim
|
||||||
local codelldb_base_path = vim.env.HOME .. "/.vscode-extensions/vscode-lldb/share/vscode/extensions/vadimcn.vscode-lldb/"
|
vim.g.rustaceanvim = {
|
||||||
local codelldb_bin_path = codelldb_base_path .. 'adapter/codelldb'
|
|
||||||
local codelldb_lib_path = codelldb_base_path .. 'lldb/lib/liblldb.so'
|
|
||||||
|
|
||||||
require("rust-tools").setup({
|
|
||||||
server = {
|
server = {
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
settings = {
|
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
|
-- setup null-ls for markdown formatting
|
||||||
local null_ls = require("null-ls")
|
local null_ls = require("null-ls")
|
||||||
|
|
Loading…
Reference in a new issue