[2025-05-08] Add rust_analyzer and some new plugins to nvim config
This commit is contained in:
parent
728a618190
commit
a666debfcf
7 changed files with 31 additions and 1 deletions
|
@ -4,6 +4,7 @@
|
|||
require('gitsigns').setup({numhl = true})
|
||||
require('plugins.matlab_ls')
|
||||
require('plugins.lua_ls')
|
||||
require('plugins.rust_analyzer')
|
||||
require('plugins.treesitter')
|
||||
--require('battery').setup({
|
||||
-- show_status_when_no_battery = false,
|
||||
|
@ -11,6 +12,15 @@ require('plugins.treesitter')
|
|||
--})
|
||||
--require('plugins.noice')
|
||||
require('plugins.statuscol')
|
||||
require('plugins.fidget')
|
||||
require('auto-save').setup{enabled = false,
|
||||
execution_message = {
|
||||
message = function() -- message to print on save
|
||||
return ""
|
||||
end,
|
||||
dim = 0, -- dim the color of `message`
|
||||
cleaning_interval = nil, -- (milliseconds) automatically clean MsgArea after displaying `message`. See :h MsgArea
|
||||
}}
|
||||
vim.diagnostic.config({
|
||||
virtual_lines = { current_line = true, },
|
||||
underline = true,
|
||||
|
@ -33,4 +43,6 @@ vim.diagnostic.config({
|
|||
-- })
|
||||
|
||||
-- vim.keymap.set('n','<C-l>',function() print(tostring(vim.fn.strftime('%H:%M'))) end)
|
||||
vim.keymap.set('n','<C-s>',":w<CR>")
|
||||
vim.keymap.set('n','<C-a>',":ASToggle<CR>")
|
||||
vim.keymap.set('n','<C-l>',":r!date +\\%R<CR>")
|
||||
|
|
3
nvim/lua/plugins/fidget.lua
Normal file
3
nvim/lua/plugins/fidget.lua
Normal file
|
@ -0,0 +1,3 @@
|
|||
require("fidget").setup {
|
||||
-- options
|
||||
}
|
8
nvim/lua/plugins/rust_analyzer.lua
Normal file
8
nvim/lua/plugins/rust_analyzer.lua
Normal file
|
@ -0,0 +1,8 @@
|
|||
vim.lsp.config.rust_analyzer =
|
||||
{
|
||||
cmd = { "rust-analyzer" },
|
||||
root_markers = { 'Cargo.toml' },
|
||||
filetypes = { 'rust' },
|
||||
}
|
||||
|
||||
vim.lsp.enable({'rust_analyzer'})
|
|
@ -104,7 +104,6 @@ function M.statusline()
|
|||
.. Highlight(GetDiag("warn"),"StatusLineDiagnosticWarn")
|
||||
.. Highlight(GetDiag("info"),"StatusLineDiagnosticInfo")
|
||||
.. Highlight(GetDiag("hint"),"StatusLineDiagnosticHint")
|
||||
.. " "
|
||||
return sline
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue