mirror of
https://github.com/LunarVim/LunarVim.git
synced 2024-09-21 02:55:09 +02:00
disable rust for now
This commit is contained in:
parent
ca0fa9cbb2
commit
e4da06abb0
2 changed files with 72 additions and 57 deletions
|
@ -1,3 +1,4 @@
|
|||
if O.lang.rust.rust_tools.active then
|
||||
local opts = {
|
||||
tools = { -- rust-tools options
|
||||
-- automatically set inlay hints (type hints)
|
||||
|
@ -66,10 +67,21 @@ local opts = {
|
|||
on_attach = require'lsp'.common_on_attach
|
||||
} -- rust-analyser options
|
||||
}
|
||||
|
||||
require('rust-tools').setup(opts)
|
||||
|
||||
-- TODO add this later
|
||||
else
|
||||
|
||||
require'lspconfig'.rust_analyzer.setup {
|
||||
cmd = {DATA_PATH .. "/lspinstall/rust/rust-analyzer"},
|
||||
on_attach = require'lsp'.common_on_attach,
|
||||
filetypes = {"rust"},
|
||||
root_dir = require'lspconfig.util'.root_pattern("Cargo.toml",
|
||||
"rust-project.json")
|
||||
}
|
||||
|
||||
end
|
||||
|
||||
-- TODO fix these mappings
|
||||
vim.api.nvim_exec([[
|
||||
autocmd Filetype rust nnoremap <leader>lm <Cmd>RustExpandMacro<CR>
|
||||
autocmd Filetype rust nnoremap <leader>lH <Cmd>RustToggleInlayHints<CR>
|
||||
|
|
|
@ -167,6 +167,9 @@ O = {
|
|||
yaml = {},
|
||||
terraform = {},
|
||||
rust = {
|
||||
rust_tools = {
|
||||
active = false
|
||||
},
|
||||
linter = '',
|
||||
formatter = '',
|
||||
autoformat = false,
|
||||
|
|
Loading…
Reference in a new issue