From 3c8239a55fd65d1ff0b886d5ec604a9e892dac08 Mon Sep 17 00:00:00 2001 From: foosinn Date: Mon, 3 Jan 2022 16:07:36 +0100 Subject: [PATCH] vim & zoxide --- packages/neovim.nix | 19 +++++++++++++++---- roles/base.nix | 4 ++-- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/packages/neovim.nix b/packages/neovim.nix index 54f3cc9..49c9cf0 100644 --- a/packages/neovim.nix +++ b/packages/neovim.nix @@ -1,8 +1,12 @@ with import {}; neovim.override { + vimAlias = true; + configure = { customRC = '' + source ${pkgs.fzf}/share/vim-plugins/fzf/plugin/fzf.vim + set hidden " langserver @@ -11,7 +15,7 @@ neovim.override { \ 'python': ['pyls'], \ 'rust': ['rust-analyzer'], \ } - + " basic builtin set background=dark set shiftwidth=4 @@ -65,7 +69,8 @@ neovim.override { let g:which_key_map.f = { 'name': '+files' } noremap ff :FZF - noremap fc :saveas + noremap fn :NnnPicker %:p:h + noremap fc :saveas %:p:h let g:which_key_map.y = { 'name': '+yank' } noremap yp :read !wl-paste @@ -79,7 +84,7 @@ neovim.override { noremap bn :bn noremap bp :bp - let g:which_key_map.b = { 'name': '+lang' } + let g:which_key_map.m = { 'name': '+lang' } noremap md :call LanguageClient_textDocument_codeAction() noremap mc :call LanguageClient#textDocument_references() noremap mf :call LanguageClient#textDocument_formatting() @@ -88,6 +93,11 @@ neovim.override { noremap mm :call LanguageClient#textDocument_hover() noremap mr :call LanguageClient#textDocument_rename() noremap ms :call LanguageClient#workspace_symbol() + noremap ma :fzf_lsp_action + noremap ml :fzf_lsp_layout + + let g:which_key_map.g = { 'name': '+git' } + noremap gs :!lazygit " lang specifics let g:rustfmt_autosave = 1 @@ -99,10 +109,11 @@ neovim.override { airline easymotion editorconfig-vim - fugitive fzf + fzf-lsp-nvim LanguageClient-neovim ncm2 + nnn-vim surround syntastic vim-addon-nix diff --git a/roles/base.nix b/roles/base.nix index e374695..027eb8c 100644 --- a/roles/base.nix +++ b/roles/base.nix @@ -37,7 +37,7 @@ in { tmux unzip wget - z-lua + zoxide (import ../packages/neovim.nix) ]; @@ -76,7 +76,7 @@ in { . "$(fzf-share)/key-bindings.bash" . "$(fzf-share)/completion.bash" - . <(z --init bash) + . <(zoxide init bash) . <(direnv hook bash) . ${pkgs.bash-completion}/etc/profile.d/bash_completion.sh