1
0
Fork 0

Improve coc-config

This commit is contained in:
Malte Brandy 2020-08-17 14:44:58 +02:00
parent 107f928602
commit 6fc738eed1
No known key found for this signature in database
GPG key ID: 226A2D41EF5378C9
2 changed files with 10 additions and 8 deletions

View file

@ -22,10 +22,6 @@ let
# general whitespace
vim-trailing-whitespace vim-autoformat
# snippets
coc-snippets # integrates completion
vim-snippets # provides standard snippets
# Git
coc-git # statusline, numberline and explorer infos
fugitive # various git commands
@ -66,7 +62,14 @@ let
};
cocSettings = {
"diagnostic.maxWindowHeight" = 60;
"diagnostic.virtualText" = true;
"diagnostic.virtualTextCurrentLineOnly" = false;
"codeLens.enable" = true;
languageserver = {
markdown = {
command = "neuron-language-server";
filetypes = [ "md" "markdown" ];
};
nix = {
command = "rnix-lsp";
filetypes = [ "nix" ];
@ -85,7 +88,7 @@ let
in {
home = {
file.".config/nvim/coc-settings.json".text = builtins.toJSON cocSettings;
packages = [ neovim ];
packages = [ neovim pkgs.neuron-language-server];
sessionVariables.EDITOR = "${neovim}/bin/nvim";
};
}

View file

@ -2,8 +2,6 @@ set spell spelllang=de,en
let g:airline_powerline_fonts = 1
let g:airline_skip_empty_sections = 1
let g:airline#extensions#tabline#enabled = 1
let g:tex_flavor = 'latex'
nmap <space>e :CocCommand explorer --no-toggle<CR>
@ -164,7 +162,6 @@ augroup end
" Remap for do codeAction of selected region, ex: `<leader>aap` for current paragraph
xmap <leader>a <Plug>(coc-codeaction-selected)
nmap <leader>a <Plug>(coc-codeaction-selected)
nmap <space>a <Plug>(coc-codeaction)
nmap <space>f :Autoformat<CR>
" Create mappings for function text object, requires document symbols feature of languageserver.
@ -231,6 +228,8 @@ nnoremap <silent> <space>d :<C-u>CocFzfList diagnostics<cr>
nnoremap <silent> <space>c :<C-u>CocFzfList commands<cr>
" Find symbol of current document
nnoremap <silent> <space>o :<C-u>CocFzfList outline<cr>
" Find symbol of current document
nnoremap <silent> <space>a :<C-u>CocFzfList actions<cr>
" Do default action for next item.
nnoremap <silent> <space>j :<C-u>CocNext<CR>
" Do default action for previous item.