initial commit
This commit is contained in:
commit
23d4795228
99 changed files with 6691 additions and 0 deletions
28
config/nvim/lua/lsp/rust-analyzer.lua
Normal file
28
config/nvim/lua/lsp/rust-analyzer.lua
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
return {
|
||||
standalone = false,
|
||||
capabilities = { general = { positionEncodings = { 'utf-16' } } },
|
||||
settings = {
|
||||
['rust-analyzer'] = {
|
||||
checkOnSave = {
|
||||
overrideCommand = {
|
||||
'cargo',
|
||||
'clippy',
|
||||
'--message-format=json',
|
||||
'--',
|
||||
'-W',
|
||||
'clippy::expect_used',
|
||||
'-W',
|
||||
'clippy::pedantic',
|
||||
'-W',
|
||||
'clippy::unwrap_used',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
on_attach = function(...)
|
||||
require('config.lsp').on_attach(...)
|
||||
bmap({ 'n', '\\Rc', '<cmd>RustLsp codeAction<cr>' })
|
||||
bmap({ 'n', '\\Rm', '<cmd>RustLsp expandMacro<cr>' })
|
||||
bmap({ 'n', '\\Ro', '<cmd>RustLsp openCargo<cr>' })
|
||||
end,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue