Improve coc-config
This commit is contained in:
parent
107f928602
commit
6fc738eed1
|
@ -22,10 +22,6 @@ let
|
||||||
# general whitespace
|
# general whitespace
|
||||||
vim-trailing-whitespace vim-autoformat
|
vim-trailing-whitespace vim-autoformat
|
||||||
|
|
||||||
# snippets
|
|
||||||
coc-snippets # integrates completion
|
|
||||||
vim-snippets # provides standard snippets
|
|
||||||
|
|
||||||
# Git
|
# Git
|
||||||
coc-git # statusline, numberline and explorer infos
|
coc-git # statusline, numberline and explorer infos
|
||||||
fugitive # various git commands
|
fugitive # various git commands
|
||||||
|
@ -66,7 +62,14 @@ let
|
||||||
};
|
};
|
||||||
cocSettings = {
|
cocSettings = {
|
||||||
"diagnostic.maxWindowHeight" = 60;
|
"diagnostic.maxWindowHeight" = 60;
|
||||||
|
"diagnostic.virtualText" = true;
|
||||||
|
"diagnostic.virtualTextCurrentLineOnly" = false;
|
||||||
|
"codeLens.enable" = true;
|
||||||
languageserver = {
|
languageserver = {
|
||||||
|
markdown = {
|
||||||
|
command = "neuron-language-server";
|
||||||
|
filetypes = [ "md" "markdown" ];
|
||||||
|
};
|
||||||
nix = {
|
nix = {
|
||||||
command = "rnix-lsp";
|
command = "rnix-lsp";
|
||||||
filetypes = [ "nix" ];
|
filetypes = [ "nix" ];
|
||||||
|
@ -85,7 +88,7 @@ let
|
||||||
in {
|
in {
|
||||||
home = {
|
home = {
|
||||||
file.".config/nvim/coc-settings.json".text = builtins.toJSON cocSettings;
|
file.".config/nvim/coc-settings.json".text = builtins.toJSON cocSettings;
|
||||||
packages = [ neovim ];
|
packages = [ neovim pkgs.neuron-language-server];
|
||||||
sessionVariables.EDITOR = "${neovim}/bin/nvim";
|
sessionVariables.EDITOR = "${neovim}/bin/nvim";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,8 +2,6 @@ set spell spelllang=de,en
|
||||||
let g:airline_powerline_fonts = 1
|
let g:airline_powerline_fonts = 1
|
||||||
let g:airline_skip_empty_sections = 1
|
let g:airline_skip_empty_sections = 1
|
||||||
let g:airline#extensions#tabline#enabled = 1
|
let g:airline#extensions#tabline#enabled = 1
|
||||||
|
|
||||||
|
|
||||||
let g:tex_flavor = 'latex'
|
let g:tex_flavor = 'latex'
|
||||||
|
|
||||||
nmap <space>e :CocCommand explorer --no-toggle<CR>
|
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
|
" Remap for do codeAction of selected region, ex: `<leader>aap` for current paragraph
|
||||||
xmap <leader>a <Plug>(coc-codeaction-selected)
|
xmap <leader>a <Plug>(coc-codeaction-selected)
|
||||||
nmap <leader>a <Plug>(coc-codeaction-selected)
|
nmap <leader>a <Plug>(coc-codeaction-selected)
|
||||||
nmap <space>a <Plug>(coc-codeaction)
|
|
||||||
nmap <space>f :Autoformat<CR>
|
nmap <space>f :Autoformat<CR>
|
||||||
|
|
||||||
" Create mappings for function text object, requires document symbols feature of languageserver.
|
" 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>
|
nnoremap <silent> <space>c :<C-u>CocFzfList commands<cr>
|
||||||
" Find symbol of current document
|
" Find symbol of current document
|
||||||
nnoremap <silent> <space>o :<C-u>CocFzfList outline<cr>
|
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.
|
" Do default action for next item.
|
||||||
nnoremap <silent> <space>j :<C-u>CocNext<CR>
|
nnoremap <silent> <space>j :<C-u>CocNext<CR>
|
||||||
" Do default action for previous item.
|
" Do default action for previous item.
|
||||||
|
|
Loading…
Reference in a new issue