Skip to content

Commit 4976476

Browse files
authored
Merge pull request #411 from joclement/improve-vim
improve vim
2 parents 1dc6e83 + ddbc328 commit 4976476

8 files changed

Lines changed: 14 additions & 57 deletions

File tree

.gitmodules

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@
1717
[submodule "vim/pack/plugins/start/vim-matchup"]
1818
path = vim/pack/plugins/start/vim-matchup
1919
url = https://github.com/andymass/vim-matchup.git
20-
[submodule "vim/pack/plugins/start/coc.nvim"]
21-
path = vim/pack/plugins/start/coc.nvim
22-
url = https://github.com/neoclide/coc.nvim.git
23-
branch = release
2420
[submodule "vim/pack/plugins/start/nerdtree"]
2521
path = vim/pack/plugins/start/nerdtree
2622
url = https://github.com/preservim/nerdtree.git
@@ -91,9 +87,6 @@
9187
[submodule "vim/pack/plugins/start/vim-gutentags"]
9288
path = vim/pack/plugins/start/vim-gutentags
9389
url = https://github.com/ludovicchabant/vim-gutentags.git
94-
[submodule "vim/pack/plugins/start/black"]
95-
path = vim/pack/plugins/start/black
96-
url = https://github.com/psf/black.git
9790
[submodule "vim/pack/plugins/start/vim-airline"]
9891
path = vim/pack/plugins/start/vim-airline
9992
url = https://github.com/vim-airline/vim-airline.git

install-nodejs.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,5 @@
22

33
set -euo pipefail
44

5-
sudo apt-get purge --yes nodejs
6-
sudo rm -f /etc/apt/sources.list.d/nodesource.list
7-
85
echo "Install Node.js"
96
sudo snap install --classic node

install.conf.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@
5858
path: vim/after/ftplugin
5959
~/.vim/pack:
6060
path: vim/pack
61-
~/.vim/coc-settings.json:
62-
path: vim/coc-settings.json
6361
~/.vim/ftplugin:
6462
path: vim/ftplugin
6563
~/.vimrc:
@@ -82,3 +80,4 @@
8280
- echo 'Run `chsh -s $(which zsh)`'
8381
- ./install-vim-plugins.sh
8482
- sudo apt-get install --yes direnv
83+
- rm -fr ~/.config/coc

vim/coc-settings.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

vim/ftplugin/perl.vim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
let g:ale_perl_perl_options = '-c -Mwarnings -Ilib -It/lib'
22

3+
let b:ale_linters = ['perlcritic', 'perlnavigator']
4+
35
let g:ale_perl_perlcritic_showrules = 1
46
let g:ale_type_map = {
57
\ 'perlcritic': {'ES': 'WS', 'E': 'W'},

vim/pack/plugins/start/black

Lines changed: 0 additions & 1 deletion
This file was deleted.

vim/pack/plugins/start/coc.nvim

Lines changed: 0 additions & 1 deletion
This file was deleted.

vimrc

Lines changed: 11 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -47,51 +47,23 @@ endfunction
4747
command! Cw call DispatchCw()
4848
" }}}
4949

50-
" CoC {{{
51-
" Based on https://github.com/neoclide/coc.nvim#example-vim-configuration
52-
set encoding=utf-8
50+
" ALE {{{
51+
" Must be set before ALE loads (packpath start plugins load after vimrc).
52+
let g:ale_completion_enabled = 1
5353

54+
set encoding=utf-8
5455
set nobackup
5556
set nowritebackup
56-
5757
set updatetime=300
58-
5958
set signcolumn=yes
6059

61-
" Use K to show documentation in preview window
62-
nnoremap <silent> K :call ShowDocumentation()<CR>
63-
64-
function! ShowDocumentation()
65-
if CocAction('hasProvider', 'hover')
66-
call CocActionAsync('doHover')
67-
else
68-
call feedkeys('K', 'in')
69-
endif
70-
endfunction
71-
72-
let g:coc_global_extensions = [
73-
\ 'coc-clangd',
74-
\ 'coc-docker',
75-
\ 'coc-emoji',
76-
\ 'coc-go',
77-
\ 'coc-git',
78-
\ 'coc-jedi',
79-
\ 'coc-json',
80-
\ 'coc-lua',
81-
\ 'coc-perl',
82-
\ 'coc-prettier',
83-
\ 'coc-pyright',
84-
\ 'coc-snippets',
85-
\ 'coc-stylelint',
86-
\ 'coc-ultisnips',
87-
\ 'coc-vimlsp',
88-
\ 'coc-yaml'
89-
\ ]
90-
91-
nmap <silent> gd <Plug>(coc-definition)
92-
nmap <silent> gy <Plug>(coc-type-definition)
93-
nmap <silent> gi <Plug>(coc-implementation)
94-
nmap <silent> gr <Plug>(coc-references)
60+
nmap <silent> gd <Plug>(ale_go_to_definition)
61+
nmap <silent> gy <Plug>(ale_go_to_type_definition)
62+
nmap <silent> gi <Plug>(ale_go_to_implementation)
63+
nmap <silent> gr <Plug>(ale_find_references)
64+
nmap <silent> K <Plug>(ale_hover)
65+
nmap <silent> <Leader>rn <Plug>(ale_rename)
66+
nmap <silent> <Leader>ca <Plug>(ale_code_action)
9567
" }}}
9668

9769
" lvimrc {{{

0 commit comments

Comments
 (0)