Vim, mostly
This commit is contained in:
parent
90d5cd4d1f
commit
3f720e882d
7 changed files with 136 additions and 30 deletions
|
@ -8,7 +8,7 @@ let g:ale_completion_enabled = 1
|
|||
let g:ale_fixers = ['autopep8', 'shfmt', 'uncrustify', 'remove_trailing_lines', 'trim_whitespace', 'phpcbf']
|
||||
let g:ale_php_phpcs_standard = '/srv/http/machines/ruleset.xml'
|
||||
|
||||
" For PHP, install https://pear.php.net/package/PHP_CodeSniffer
|
||||
" For PHP, install https://pear.php.net/package/PHP_CodeSniffer
|
||||
|
||||
|
||||
""" UNDOTREE """
|
||||
|
@ -24,14 +24,15 @@ nmap <F8> :TagbarToggle<CR>
|
|||
set noshowmode
|
||||
set laststatus=2
|
||||
let g:airline_powerline_fonts = 1
|
||||
" let g:airline#extensions#syntastic#enabled = 1
|
||||
let g:airline#extensions#tabline#enabled = 1
|
||||
|
||||
let g:airline_section_a = airline#section#create(['mode'])
|
||||
let g:airline_section_b = airline#section#create(['branch', 'hunks'])
|
||||
" let g:airline_section_z = airline#section#create(['%B', '@', '%l', ':', '%c'])
|
||||
let g:airline_theme = 'base16_monokai'
|
||||
let g:airline#extensions#ale#enabled = 1
|
||||
|
||||
let airline#extensions#languageclient#error_symbol = '✖ '
|
||||
let airline#extensions#languageclient#warning_symbol = '⚠ '
|
||||
|
||||
""" FZF """
|
||||
|
||||
|
@ -51,27 +52,28 @@ let g:fzf_colors =
|
|||
\ 'spinner': ['fg', 'Label'],
|
||||
\ 'header': ['fg', 'Comment'] }
|
||||
|
||||
nmap gF :Files<CR>
|
||||
nmap gf :GFiles<CR>
|
||||
nmap gb :Buffers<CR>
|
||||
nmap gL :Lines<CR>
|
||||
nmap gl :BLines<CR>
|
||||
nmap gT :Tags<CR>
|
||||
nmap gt :BTags<CR>
|
||||
nmap gm :Marks<CR>
|
||||
nmap gw :Windows<CR>
|
||||
nmap gh :History<CR>
|
||||
nmap gH :History:<CR>
|
||||
nmap gS :History/<CR>
|
||||
nmap gs :Snippets<CR>
|
||||
let g:fzf_command_prefix = 'Fzf'
|
||||
nmap gF :FzfFiles<CR>
|
||||
nmap gf :FzfGFiles<CR>
|
||||
nmap gb :FzfBuffers<CR>
|
||||
nmap gL :FzfLines<CR>
|
||||
nmap gl :FzfBLines<CR>
|
||||
nmap gT :FzfTags<CR>
|
||||
nmap gt :FzfBTags<CR>
|
||||
nmap gm :FzfMarks<CR>
|
||||
nmap gw :FzfWindows<CR>
|
||||
nmap gh :FzfHistory<CR>
|
||||
nmap gH :FzfHistory:<CR>
|
||||
nmap gS :FzfHistory/<CR>
|
||||
nmap gs :FzfSnippets<CR>
|
||||
|
||||
" TODO `gd` → go to tag matching selected word, or show a list with that
|
||||
" of tags pre-filtered with that word
|
||||
|
||||
""" SUPERTAB """
|
||||
|
||||
let g:SuperTabDefaultCompletionType = "<c-n>" " Go down when completing
|
||||
let g:SuperTabContextDefaultCompletionType = "<c-n>"
|
||||
" let g:SuperTabDefaultCompletionType = "<c-n>" " Go down when completing
|
||||
" let g:SuperTabContextDefaultCompletionType = "<c-n>"
|
||||
|
||||
""" LanguageTool """
|
||||
|
||||
|
@ -82,3 +84,26 @@ let g:pandoc#modules#disabled = ["folding"]
|
|||
let g:pandoc#spell#enabled = 0
|
||||
let g:pandoc#syntax#conceal#use = 0
|
||||
|
||||
""" LanguageClient-neovim """
|
||||
|
||||
let g:LanguageClient_serverCommands = {
|
||||
\ 'python': ['pyls'],
|
||||
\ }
|
||||
|
||||
|
||||
function LC_maps()
|
||||
if has_key(g:LanguageClient_serverCommands, &filetype)
|
||||
nnoremap <buffer> <silent> K :call LanguageClient#textDocument_hover()<cr>
|
||||
nnoremap <buffer> <silent> gd :call LanguageClient#textDocument_definition()<CR>
|
||||
nnoremap <buffer> <silent> gd :call LanguageClient#textDocument_references()<CR>
|
||||
nnoremap <buffer> <silent> <F2> :call LanguageClient#textDocument_rename()<CR>
|
||||
nnoremap <buffer> <silent> <F3> :call LanguageClient#textDocument_formatting()<CR>
|
||||
set completefunc=LanguageClient#complete
|
||||
set omnifunc=LanguageClient#complete
|
||||
endif
|
||||
endfunction
|
||||
autocmd FileType * call LC_maps()
|
||||
|
||||
""" deoplete """
|
||||
|
||||
let g:deoplete#enable_at_startup = 1
|
|
@ -34,15 +34,24 @@ Plug 'tomtom/tcomment_vim'
|
|||
" Plug 'tomlion/vim-solidity'
|
||||
" Plug 'godlygeek/tabular'
|
||||
" Plug 'jrozner/vim-antlr'
|
||||
|
||||
" When in f/F/t/T mode, highlight in red the characters that can be jumped to
|
||||
Plug 'deris/vim-shot-f'
|
||||
|
||||
" Auto-highlight one character per word for quick f/F movement
|
||||
Plug 'unblevable/quick-scope'
|
||||
|
||||
"
|
||||
" Plug 'maralla/completor.vim'
|
||||
" if has('nvim')
|
||||
" Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
|
||||
" else
|
||||
" Plug 'Shougo/deoplete.nvim'
|
||||
" Plug 'roxma/nvim-yarp'
|
||||
" Plug 'roxma/vim-hug-neovim-rpc'
|
||||
" endif
|
||||
"
|
||||
" Auto-completion
|
||||
if has('nvim')
|
||||
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
|
||||
else
|
||||
Plug 'Shougo/deoplete.nvim'
|
||||
Plug 'roxma/nvim-yarp'
|
||||
Plug 'roxma/vim-hug-neovim-rpc'
|
||||
endif
|
||||
" Plug 'zchee/deoplete-jedi'
|
||||
|
||||
" Plug 'python-mode/python-mode', { 'branch': 'develop' }
|
||||
|
@ -54,7 +63,13 @@ Plug 'terryma/vim-smooth-scroll'
|
|||
Plug 'vim-pandoc/vim-pandoc'
|
||||
Plug 'vim-pandoc/vim-pandoc-syntax'
|
||||
Plug 'idanarye/vim-vebugger'
|
||||
Plug 'w0rp/ale'
|
||||
|
||||
" Language Server Procotol client
|
||||
Plug 'autozimu/LanguageClient-neovim', {
|
||||
\ 'branch': 'next',
|
||||
\ 'do': 'bash install.sh',
|
||||
\ }
|
||||
|
||||
|
||||
call plug#end()
|
||||
|
|
@ -40,6 +40,7 @@ set splitbelow
|
|||
|
||||
" Turn off relativenumber only for insert mode.
|
||||
if has('nvim')
|
||||
set relativenumber
|
||||
augroup every
|
||||
autocmd!
|
||||
au InsertEnter * set norelativenumber
|
|
@ -7,7 +7,7 @@ filetype on
|
|||
set runtimepath+=~/.config/vim,~/.cache/vim
|
||||
set viminfo+=n~/.cache/vim/viminfo
|
||||
|
||||
source ~/.config/vim/plugins
|
||||
source ~/.config/vim/pluginconfig
|
||||
source ~/.config/vim/vimconfig
|
||||
source ~/.config/vim/pluginlist.vim
|
||||
source ~/.config/vim/pluginconfig.vim
|
||||
source ~/.config/vim/vimconfig.vim
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue