nvim: Improve LSP stuff
This commit is contained in:
@ -1,12 +1,10 @@
|
||||
-- change rust-analyzer target
|
||||
-- change rust-analyzer target and restart
|
||||
set_rust_target = function(target)
|
||||
vim.g["rust-analyzer-target"] = target
|
||||
vim.cmd("RustAnalyzer restart")
|
||||
print("rust-analyzer.cargo.target = " .. target)
|
||||
require("rust-tools").setup({
|
||||
server = { settings = { ["rust-analyzer"] = { cargo = { target = target } } } },
|
||||
})
|
||||
end
|
||||
|
||||
-- a custom telescope picker for changing rust-analyzer target
|
||||
pick_rust_target = function(opts)
|
||||
opts = opts or {}
|
||||
require("telescope.pickers").new(opts, {
|
||||
@ -24,3 +22,5 @@ pick_rust_target = function(opts)
|
||||
end,
|
||||
}):find()
|
||||
end
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user