diff options
author | Adrian Kummerlaender | 2019-03-03 22:29:56 +0100 |
---|---|---|
committer | Adrian Kummerlaender | 2019-03-03 22:29:56 +0100 |
commit | e8d3e7dbd9248fbafab466b379adbc6d298d3db4 (patch) | |
tree | edabbd2c4afea11e1917c1305df6923872db27da | |
parent | 92b2bfc758d0b4a1dd7b4bc911a4ce1d9b5609a8 (diff) | |
download | pkgs-e8d3e7dbd9248fbafab466b379adbc6d298d3db4.tar pkgs-e8d3e7dbd9248fbafab466b379adbc6d298d3db4.tar.gz pkgs-e8d3e7dbd9248fbafab466b379adbc6d298d3db4.tar.bz2 pkgs-e8d3e7dbd9248fbafab466b379adbc6d298d3db4.tar.lz pkgs-e8d3e7dbd9248fbafab466b379adbc6d298d3db4.tar.xz pkgs-e8d3e7dbd9248fbafab466b379adbc6d298d3db4.tar.zst pkgs-e8d3e7dbd9248fbafab466b379adbc6d298d3db4.zip |
Expand language client keybindings, add fzf
-rw-r--r-- | pkgs/custom-neovim/asset/rc.vim | 26 | ||||
-rw-r--r-- | pkgs/custom-neovim/default.nix | 3 |
2 files changed, 18 insertions, 11 deletions
diff --git a/pkgs/custom-neovim/asset/rc.vim b/pkgs/custom-neovim/asset/rc.vim index 5b1cac5..f1155f1 100644 --- a/pkgs/custom-neovim/asset/rc.vim +++ b/pkgs/custom-neovim/asset/rc.vim @@ -111,15 +111,10 @@ nnoremap <F6> :GitGutterToggle<CR> nnoremap <F7> :SignatureToggleSigns<CR> nnoremap <F8> :Goyo<CR> -nnoremap <c-b> :CtrlPBuffer<CR> -nnoremap <c-m> :CtrlPMixed<CR> -nnoremap <c-t> :CtrlPTag<CR> -nnoremap <a-t> :CtrlPBufTag<CR> - -let g:ctrlp_custom_ignore = { -\ 'dir': '\.git$', -\ 'file': '\.o$\|\.d$' -\ } +nnoremap <c-p> :GFiles<CR> +nnoremap <c-b> :Buffers<CR> +nnoremap <c-t> :Tags<CR> +nnoremap <a-t> :BTags<CR> let g:undotree_SetFocusWhenToggle = 1 @@ -132,7 +127,9 @@ nmap <S-w> <Leader>w " spinning up a language client only makes " sense if such a client is available if executable('cquery') - let g:LanguageClient_serverCommands = { 'cpp': ['cquery'] } + let g:LanguageClient_serverCommands = { 'cpp': [ +\ 'cquery', '--init={"cacheDirectory":"/tmp/cquery/", "completion": {"filterAndSort": false}}' +\ ] } let g:LanguageClient_hoverPreview = "Never" set completefunc=LanguageClient#complete @@ -141,4 +138,13 @@ if executable('cquery') inoremap <C-n> <C-x><C-o> " allow completion selection via CR without inserting a new line imap <expr><CR> pumvisible() ? "\<C-y>" : "\<CR>" + + noremap <leader>lc :call LanguageClient_contextMenu()<CR> + noremap <leader>lr :call LanguageClient_rename()<CR> + nnoremap <silent> gd :call LanguageClient#textDocument_definition()<CR> + nnoremap <silent> gt :call LanguageClient#textDocument_typeDefinition()<CR> + nnoremap <silent> gi :call LanguageClient#textDocument_implementation()<CR> + + nmap <c-t> :call LanguageClient#workspace_symbol()<CR> + nmap <a-t> :call LanguageClient#textDocument_documentSymbol()<CR> endif diff --git a/pkgs/custom-neovim/default.nix b/pkgs/custom-neovim/default.nix index 8568c08..1d6b4c3 100644 --- a/pkgs/custom-neovim/default.nix +++ b/pkgs/custom-neovim/default.nix @@ -15,6 +15,8 @@ in pkgs.neovim.override { goyo # autocomplete + fzfWrapper + fzf-vim LanguageClient-neovim deoplete-nvim @@ -27,7 +29,6 @@ in pkgs.neovim.override { vim-addon-nix # file, buffer management - ctrlp vim-counterpoint vim-signature |