[fix] Update some stuff and Change deprecated commands

This commit is contained in:
Uttarayan Mondal
2022-11-08 01:19:26 +05:30
parent 444db182b4
commit 9f1af0fe14
2 changed files with 29 additions and 2 deletions

View File

@@ -5,6 +5,8 @@
local codelldb_path = '/Users/fs0c131y/.vscode/extensions/vadimcn.vscode-lldb-1.6.9/adapter/codelldb'
local liblldb_path = '/Users/fs0c131y/.vscode/extensions/vadimcn.vscode-lldb-1.6.9/lldb/lib/liblldb.dylib'
local rt = require('rust-tools')
local lspstatus = require('lsp-status')
local coq = require('coq')
local opts = {
tools = { -- rust-tools options
@@ -179,12 +181,37 @@ local opts = {
-- setting it to false may improve startup time
standalone = true,
on_attach = function(_, bufnr)
settings = {
["rust-analyzer"] = {
imports = {
enforce = true,
prefix = "self",
granularity = {
group = "module",
},
importPrefix = "self",
},
cargo = {
loadOutDirsFromCheck = true,
},
procMacro = {
enable = true,
},
checkOnSave = {
command = "clippy",
},
},
},
on_attach = function(client, bufnr)
-- Hover actions
vim.keymap.set("n", "<S-K>", rt.hover_actions.hover_actions, { buffer = bufnr })
-- Code action groups
vim.keymap.set("n", "<Leader>a", rt.code_action_group.code_action_group, { buffer = bufnr })
lspstatus.on_attach(client)
end,
capabilities = coq.lsp_ensure_capabilities(lspstatus.capabilities),
}, -- rust-analyer options