diff --git a/home-manager/neovim/default.nix b/home-manager/neovim/default.nix index 9fa62e2..390e874 100644 --- a/home-manager/neovim/default.nix +++ b/home-manager/neovim/default.nix @@ -97,10 +97,11 @@ # LSP nvim-lspconfig lsp-status-nvim - rust-tools-nvim + rustaceanvim neodev-nvim null-ls-nvim lsp_lines-nvim + lsp-inlayhints-nvim # debugging nvim-dap diff --git a/home-manager/neovim/lspconfig.lua b/home-manager/neovim/lspconfig.lua index 20b41c5..e767caf 100644 --- a/home-manager/neovim/lspconfig.lua +++ b/home-manager/neovim/lspconfig.lua @@ -15,6 +15,8 @@ local on_attach = function(client, bufnr) }) end + require("lsp-inlayhints").on_attach(client, bufnr) + local telescope = require("telescope.builtin") nnoremap("gD", vim.lsp.buf.declaration) @@ -40,6 +42,8 @@ local on_attach = function(client, bufnr) end end +require("lsp-inlayhints").setup({}) + local lsp_status = require("lsp-status") lsp_status.config({ current_function = false, @@ -118,12 +122,8 @@ for lsp, settings in pairs(servers) do }) end --- setup rust tools -local codelldb_base_path = vim.env.HOME .. "/.vscode-extensions/vscode-lldb/share/vscode/extensions/vadimcn.vscode-lldb/" -local codelldb_bin_path = codelldb_base_path .. 'adapter/codelldb' -local codelldb_lib_path = codelldb_base_path .. 'lldb/lib/liblldb.so' - -require("rust-tools").setup({ +-- setup rustaceanvim +vim.g.rustaceanvim = { server = { on_attach = on_attach, settings = { @@ -137,12 +137,8 @@ require("rust-tools").setup({ }, }, }, - capabilities = capabilities, }, - dap = { - adapter = require("rust-tools.dap").get_codelldb_adapter(codelldb_bin_path, codelldb_lib_path) - }, -}) +} -- setup null-ls for markdown formatting local null_ls = require("null-ls")