diff --git a/init.vim b/init.vim index ad3726e..5f2ecd6 100644 --- a/init.vim +++ b/init.vim @@ -89,7 +89,8 @@ " Language server Plug 'neovim/nvim-lspconfig' - Plug 'simrat39/rust-tools.nvim' + Plug 'mrcjkb/rustaceanvim', { 'tag': '3.*' } + Plug 'lvimuser/lsp-inlayhints.nvim' " TODO: Inlay hints. Will be native to nvim in v0.10, so delete after that " Support for DAP (Debug Adapter Protocol) Plug 'mfussenegger/nvim-dap' @@ -1383,21 +1384,32 @@ endif " Requires rust-analyzer to be installed on the system let g:rustfmt_on_save = 1 " vim-rustfmt lua <ll", ':w :!cargo run ', { buffer = bufnr }) vim.keymap.set("n", "ll", ":w :!cargo run 3>&2 2>&1 1>&3 | grep -o 'could not find `Cargo.toml`' > /dev/null && (rustc %:p && %:p:r)", { buffer = bufnr }) + require("lsp-inlayhints").on_attach(client, bufnr) + require("lsp-inlayhints").show() end, - }, - tools = { - inlay_hints = { - auto = true, -- enable inlay_hints + settings = { + -- rust-analyzer language server configuration + ['rust-analyzer'] = { + check = { + command = 'clippy', + }, + }, }, }, -}) + -- Plugin configuration + tools = { + }, + -- DAP configuration + dap = { + }, +} EOF " }}}