mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
nvim: move rustaceanvim to lsp.rust
This commit is contained in:
parent
f1cd9b036f
commit
59c43e1501
3 changed files with 20 additions and 19 deletions
|
|
@ -4,5 +4,6 @@ require("opts")
|
||||||
require("_lazy")
|
require("_lazy")
|
||||||
|
|
||||||
require("lsp.haskell")
|
require("lsp.haskell")
|
||||||
|
require("lsp.rust")
|
||||||
|
|
||||||
vim.cmd.colorscheme("curry")
|
vim.cmd.colorscheme("curry")
|
||||||
|
|
|
||||||
19
.config/nvim/lua/lsp/rust.lua
Normal file
19
.config/nvim/lua/lsp/rust.lua
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
local mylsp = require("lsp")
|
||||||
|
local border = mylsp.border
|
||||||
|
local on_attach = mylsp.on_attach
|
||||||
|
|
||||||
|
vim.g.rustaceanvim = {
|
||||||
|
server = {
|
||||||
|
on_attach = on_attach,
|
||||||
|
settings = {
|
||||||
|
["rust-analyzer"] = { files = { excludeDirs = { ".direnv/" } } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
tools = {
|
||||||
|
hover = {
|
||||||
|
border = border,
|
||||||
|
stylize_markdown = true,
|
||||||
|
},
|
||||||
|
log = { level = vim.log.levels.OFF },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
@ -186,22 +186,3 @@ vim.api.nvim_create_autocmd("FileType", {
|
||||||
callback = function() require("metals").initialize_or_attach(metals_config) end,
|
callback = function() require("metals").initialize_or_attach(metals_config) end,
|
||||||
group = nvim_metals_group,
|
group = nvim_metals_group,
|
||||||
})
|
})
|
||||||
|
|
||||||
----------
|
|
||||||
-- Rust --
|
|
||||||
----------
|
|
||||||
vim.g.rustaceanvim = {
|
|
||||||
server = {
|
|
||||||
on_attach = mylsp.on_attach,
|
|
||||||
settings = {
|
|
||||||
["rust-analyzer"] = { files = { excludeDirs = { ".direnv/" } } },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
tools = {
|
|
||||||
hover = {
|
|
||||||
border = border,
|
|
||||||
stylize_markdown = true,
|
|
||||||
},
|
|
||||||
log = { level = vim.log.levels.OFF },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue