diff --git a/config/lua/lsp-conf.lua b/config/lua/lsp-conf.lua index 70f0a93..407aa14 100644 --- a/config/lua/lsp-conf.lua +++ b/config/lua/lsp-conf.lua @@ -4,6 +4,8 @@ lspconfig.gopls.setup { on_attach = function(_, bufnr) vim.api.nvim_command("au BufWritePre lua vim.lsp.buf.format { async = false }") end } +lspconfig.pyright.setup {} +lspconfig.nil_ls.setup {} -- Global mappings. -- See `:help vim.diagnostic.*` for documentation on any of the below functions @@ -27,12 +29,12 @@ vim.api.nvim_create_autocmd('LspAttach', { -- See `:help vim.lsp.*` for documentation on any of the below functions local opts = { buffer = ev.buf } vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts) - vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts) + vim.keymap.set('n', 'dD', vim.lsp.buf.declaration, opts) vim.keymap.set('n', 'rn', vim.lsp.buf.rename, opts) vim.keymap.set({ 'n', 'v' }, 'ca', vim.lsp.buf.code_action, opts) - vim.keymap.set("n", "gd", "Telescope lsp_definitions", { buffer = bufnr }) - vim.keymap.set("n", "gi", "Telescope lsp_implementations", { buffer = bufnr }) - vim.keymap.set("n", "gR", "Telescope lsp_references", { buffer = bufnr }) + vim.keymap.set("n", "dd", "Telescope lsp_definitions", { buffer = bufnr }) + vim.keymap.set("n", "di", "Telescope lsp_implementations", { buffer = bufnr }) + vim.keymap.set("n", "dr", "Telescope lsp_references", { buffer = bufnr }) vim.keymap.set("n", "dt", "Telescope lsp_type_definitions", { buffer = bufnr }) vim.keymap.set("n", "ds", "Telescope lsp_document_symbols", { buffer = bufnr }) vim.keymap.set("n", "dS", "Telescope lsp_dynamic_workspace_symbols", { buffer = bufnr }) diff --git a/flake.nix b/flake.nix index 9db1d54..d067005 100644 --- a/flake.nix +++ b/flake.nix @@ -35,6 +35,8 @@ ]; full-dependencies = with pkgs; [ gopls + pyright + nil ] ++ dependencies; neovim-with-deps = recursiveMerge [ pkgs.neovim-unwrapped