diff options
| author | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-04-11 15:43:10 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-04-11 15:43:10 +0200 |
| commit | d0dd2c9e2540e1fe29f673d32aff27e4591d5297 (patch) | |
| tree | 6848f852e4a5dc35e6567213637be19cd0ef291b /config | |
| parent | d5c593a20dd18bbb0fe77389882693a79c779d83 (diff) | |
LSP and plugin improvements
Diffstat (limited to 'config')
| -rw-r--r-- | config/nvim/lua/lsp.lua | 23 | ||||
| -rw-r--r-- | config/nvim/lua/plugins.lua | 22 |
2 files changed, 27 insertions, 18 deletions
diff --git a/config/nvim/lua/lsp.lua b/config/nvim/lua/lsp.lua index e74a330..7dfb050 100644 --- a/config/nvim/lua/lsp.lua +++ b/config/nvim/lua/lsp.lua @@ -11,8 +11,29 @@ lspconfig.dartls.setup(coq.lsp_ensure_capabilities({})) lspconfig.rust_analyzer.setup(coq.lsp_ensure_capabilities({ -- Server-specific settings. See `:help lspconfig-setup` settings = { - ['rust-analyzer'] = {}, + ['rust-analyzer'] = { + imports = { + granularity = { + group = "module", + }, + prefix = "self", + }, + cargo = { + buildScripts = { + enable = true, + }, + }, + procMacro = { + enable = true + }, + checkOnSave = { + command = "clippy" + } + }, }, + on_attach = function(client, bufnr) + vim.lsp.inlay_hint.enable(true, { bufnr = bufnr }) + end })) lspconfig.lua_ls.setup(coq.lsp_ensure_capabilities({})) diff --git a/config/nvim/lua/plugins.lua b/config/nvim/lua/plugins.lua index e4dadf6..882c76d 100644 --- a/config/nvim/lua/plugins.lua +++ b/config/nvim/lua/plugins.lua @@ -56,7 +56,6 @@ require('lazy').setup({ -- Syntaxes 'ARM9/snes-syntax-vim', 'https://git.sr.ht/~torresjrjr/gemini.vim', - { 'folke/neodev.nvim', opts = {} }, --'Debugging { @@ -78,21 +77,6 @@ require('lazy').setup({ }, 'michaeljsmith/vim-indent-object', { - 'Pocco81/auto-save.nvim', - opts = { - condition = function(buf) - local fn = vim.fn - local utils = require('auto-save.utils.data') - - if fn.getbufvar(buf, '&modifiable') == 1 - and utils.not_in(fn.getbufvar(buf, '&filetype'), {'oil'}) then - return true - end - return false - end, - } - }, - { 'danymat/neogen', config = true }, @@ -103,7 +87,11 @@ require('lazy').setup({ -- LSP 'neovim/nvim-lspconfig', - 'folke/neodev.nvim', + { + "folke/lazydev.nvim", + ft = "lua", + opts = {}, + }, -- Tools 'mbbill/undotree', |