diff --git a/home/editors/neovim/default.nix b/home/editors/neovim/default.nix index 49bd5ab..f1b3c15 100644 --- a/home/editors/neovim/default.nix +++ b/home/editors/neovim/default.nix @@ -2,29 +2,18 @@ let neovim-unwrapped = pkgs.neovim-unwrapped.overrideAttrs (oldAttrs: rec { - version = "2020-09-24"; + version = "2020-09-30"; src = pkgs.fetchFromGitHub { owner = "neovim"; repo = "neovim"; - rev = "a958039f0ad7cd4f6a139fde18795c88c623a30e"; - sha256 = "04xkms6vvfa0zafvijw6mc88adfsmrksan8hg2p6jp0kwc5i9kqq"; + rev = "e5d98d85693245fec811307e5a2ccfdea3a350cd"; + sha256 = "119537lcrqn84n3sqj917jql4nrczk85idj27yqhp0dafc21raa8"; }; nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [ pkgs.utf8proc ]; }); buildVimPluginFrom2Nix = pkgs.vimUtils.buildVimPluginFrom2Nix; - nvim-lsp = buildVimPluginFrom2Nix { - pname = "nvim-lspconfig"; - version = "2020-09-07"; - src = pkgs.fetchFromGitHub { - owner = "neovim"; - repo = "nvim-lspconfig"; - rev = "60133c47e0fd82556d7ca092546ebfa8d047466e"; - sha256 = "15ysbbvxlgy1qx8rjv2i9pgjshldcs3m1ff0my2y5mnr3cpqb3s6"; - }; - }; - # not very stable yet, no existing netcoredbg config nvim-dap = buildVimPluginFrom2Nix { pname = "nvim-dap"; @@ -59,7 +48,7 @@ in { nerdtree vim-startify vim-polyglot - vim-multiple-cursors + vim-visual-multi vim-surround vim-commentary vim-easymotion @@ -72,7 +61,7 @@ in { argtextobj-vim wmgraphviz-vim - nvim-lsp + nvim-lspconfig nvim-dap # might require :UpdateRemotePlugins diff --git a/home/editors/neovim/init.vim b/home/editors/neovim/init.vim index 8cad1fe..fe3a3ec 100644 --- a/home/editors/neovim/init.vim +++ b/home/editors/neovim/init.vim @@ -1,6 +1,7 @@ " set shell=/bin/sh set termguicolors +set timeoutlen=500 colorscheme gruvbox let g:gruvbox_number_column = 'bg1' diff --git a/home/editors/neovim/lsp/lsp.vim b/home/editors/neovim/lsp/lsp.vim index 644cd45..7f0e8ae 100644 --- a/home/editors/neovim/lsp/lsp.vim +++ b/home/editors/neovim/lsp/lsp.vim @@ -37,3 +37,5 @@ nnoremap sw lua vim.lsp.buf.workspace_symbol() nnoremap f lua vim.lsp.buf.formatting() nnoremap a lua vim.lsp.buf.code_action() nnoremap r lua vim.lsp.buf.rename() +nnoremap d lua vim.lsp.util.show_line_diagnostics() + diff --git a/home/editors/neovim/vim-surround-fix.vim b/home/editors/neovim/vim-surround-fix.vim index 464471c..d9e0d79 100644 --- a/home/editors/neovim/vim-surround-fix.vim +++ b/home/editors/neovim/vim-surround-fix.vim @@ -17,6 +17,6 @@ endfunction omap s ''.SurroundOp('s') omap S ''.SurroundOp('S') -imap Isurround -imap s Isurround +imap Isurround +imap s Isurround imap S ISurround diff --git a/home/editors/neovim/which-key.vim b/home/editors/neovim/which-key.vim index 778264d..03c8bc4 100644 --- a/home/editors/neovim/which-key.vim +++ b/home/editors/neovim/which-key.vim @@ -3,4 +3,7 @@ vnoremap :WhichKeyVisual '' nnoremap :WhichKey ',' vnoremap :WhichKeyVisual ',' -set timeoutlen=100 +nnoremap :WhichKey '' +vnoremap :WhichKeyVisual '' +nnoremap :WhichKey ',' +vnoremap :WhichKeyVisual ','