summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pkgs/custom-neovim/asset/rc.vim46
-rw-r--r--pkgs/custom-neovim/default.nix2
-rw-r--r--pkgs/custom-neovim/plugins.nix18
3 files changed, 4 insertions, 62 deletions
diff --git a/pkgs/custom-neovim/asset/rc.vim b/pkgs/custom-neovim/asset/rc.vim
index 31eb27a..6675cce 100644
--- a/pkgs/custom-neovim/asset/rc.vim
+++ b/pkgs/custom-neovim/asset/rc.vim
@@ -36,8 +36,8 @@ let mapleader=","
map <leader>s :let @/=""<CR>
map <leader>c zz
-map <leader>d <c-]>
map <leader>h q:
+map <leader>d g<C-]>
nmap <backspace> :e#<CR>
nmap f za
@@ -123,45 +123,5 @@ let g:undotree_SetFocusWhenToggle = 1
let g:localvimrc_sandbox = 0
let g:localvimrc_persistent = 2
-let g:wordmotion_prefix = '<Leader>'
-nmap <S-w> <Leader>w
-
-let g:lsp_auto_enable = 0
-
-" spinning up a language client only makes
-" sense if such a client is available
-if executable('cquery')
- let g:lsp_auto_enable = 1
-
- autocmd User lsp_setup call lsp#register_server({
- \ 'name': 'cquery',
- \ 'cmd': {server_info->['cquery']},
- \ 'root_uri': {server_info->lsp#utils#path_to_uri(lsp#utils#find_nearest_parent_file_directory(lsp#utils#get_buffer_path(), 'compile_commands.json'))},
- \ 'initialization_options': { 'cacheDirectory': '/tmp/cquery' },
- \ 'whitelist': ['c', 'cpp', 'cc'],
- \ })
-
- nnoremap <silent> gd :LspDefinition<CR>
- nnoremap <silent> gt :LspTypeDefinition<CR>
- nnoremap <silent> gi :LspImplementation<CR>
- nnoremap <silent> gr :LspReferences<CR>
- nnoremap <c-t> :LspWorkspaceSymbol<CR>
- nnoremap <a-t> :LspDocumentSymbol<CR>
-
- autocmd FileType cpp setlocal omnifunc=lsp#complete
- set completeopt=longest,menuone,preview
- " use enter to select completion item
- inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
- " improve popup and selection behavior
- inoremap <expr> <C-n> pumvisible() ? '<C-n>' :
- \ '<C-n><C-r>=pumvisible() ? "\<lt>Down>" : ""<CR>'
- inoremap <expr> <M-,> pumvisible() ? '<C-n>' :
- \ '<C-x><C-o><C-n><C-p><C-r>=pumvisible() ? "\<lt>Down>" : ""<CR>'
- " trigger omnicompletion using <C-m> (compared to <C-n> for plain completion)
- inoremap <C-m> <C-x><C-o>
-
- " close documentation buffer after selecting a completion item
- autocmd CompleteDone * silent! pclose
- " close quickfix buffer after selection
- autocmd FileType qf nnoremap <buffer> <CR> <CR>:cclose<CR>
-endif
+let g:wordmotion_prefix = '<leader>'
+nmap <S-w> <leader>w
diff --git a/pkgs/custom-neovim/default.nix b/pkgs/custom-neovim/default.nix
index 1dff1f7..422847e 100644
--- a/pkgs/custom-neovim/default.nix
+++ b/pkgs/custom-neovim/default.nix
@@ -17,7 +17,7 @@ in pkgs.neovim.override {
# autocomplete
fzfWrapper
fzf-vim
- async vim-lsp
+ vim-gutentags
# load project specific config
vim-localvimrc
diff --git a/pkgs/custom-neovim/plugins.nix b/pkgs/custom-neovim/plugins.nix
index 5e0f6ea..9ff92f2 100644
--- a/pkgs/custom-neovim/plugins.nix
+++ b/pkgs/custom-neovim/plugins.nix
@@ -76,24 +76,6 @@ in {
};
};
- vim-lsp = buildVimPlugin {
- name = "vim-lsp";
- src = fetchgit {
- url = "https://github.com/prabirshrestha/vim-lsp.git";
- rev = "0310241af11adc6c3a7ba93955bc27b15744c957";
- sha256 = "0ccd6is75qlk8mg9wpwp1ypq68p7lgbq1c1jbpr6pwr59s53r4lx";
- };
- };
-
- async = buildVimPlugin {
- name = "async";
- src = fetchgit {
- url = "https://github.com/prabirshrestha/async.vim.git";
- rev = "f3014550d7a799097e56b094104dd2cd66cf2612";
- sha256 = "0zn25qwycynagrij5rsp1x7kbfz612gn7xda0hvm4y7qr3pal77p";
- };
- };
-
vim-color-akr = buildVimPlugin {
name = "vim-color-akr";
src = ./asset/vim-color-akr;