summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pkgs/custom-neovim/asset/rc.vim26
-rw-r--r--pkgs/custom-neovim/default.nix3
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