Compare commits
2 Commits
606241e4c0
...
01c728204b
Author | SHA1 | Date |
---|---|---|
Ray Elliott | 01c728204b | |
Ray Elliott | 58f116db7a |
|
@ -23,6 +23,8 @@
|
||||||
"python.formatting.provider": "black",
|
"python.formatting.provider": "black",
|
||||||
"python.formatting.blackPath": "/home/ray/.local/bin/black",
|
"python.formatting.blackPath": "/home/ray/.local/bin/black",
|
||||||
"coc.preferences.formatOnSaveFiletypes": ["python", "vue"],
|
"coc.preferences.formatOnSaveFiletypes": ["python", "vue"],
|
||||||
|
"sh.enable": true,
|
||||||
|
"sh.highlightParsingErrors": true,
|
||||||
|
|
||||||
"eslint.enable": true,
|
"eslint.enable": true,
|
||||||
"eslint.autoFixOnSave": true,
|
"eslint.autoFixOnSave": true,
|
||||||
|
|
|
@ -13,43 +13,6 @@ call plug#begin('~/.config/nvim/bundle')
|
||||||
|
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
" #ALE {{{
|
|
||||||
" https://github.com/w0rp/ale
|
|
||||||
|
|
||||||
Plug 'w0rp/ale'
|
|
||||||
" let g:ale_completion_enabled = 1
|
|
||||||
|
|
||||||
let g:ale_disable_lsp = 1
|
|
||||||
let g:ale_sign_column_always = 1
|
|
||||||
let g:ale_open_list = 0
|
|
||||||
let g:ale_fix_on_save = 1
|
|
||||||
let g:ale_fix_on_save_ignore = { 'vue': ['eslint'] }
|
|
||||||
|
|
||||||
let g:ale_linters = {'scss': ['stylelint'], 'javascript': [], 'javascriptreact': [], 'json': [], 'php':['php'], 'python': [], 'html':['htmlhint'], 'vue': []}
|
|
||||||
let g:ale_fixers = {'scss': ['stylelint'], 'javascript': [], 'javascriptreact': [], 'json': ['jq'], 'python': [], 'vue': []}
|
|
||||||
|
|
||||||
let g:ale_html_htmlhint_options = '-c ~/.htmlhintrc --format=unix'
|
|
||||||
|
|
||||||
let g:ale_python_pyls_config = {
|
|
||||||
\ 'pyls': {
|
|
||||||
\ 'pycodestyle': { 'enabled': v:false },
|
|
||||||
\ 'configurationSources': ['flake8']
|
|
||||||
\ }
|
|
||||||
\ }
|
|
||||||
|
|
||||||
let g:ale_sign_error = 'Α'
|
|
||||||
let g:ale_sign_warning = 'α'
|
|
||||||
|
|
||||||
nmap aa <Plug>(ale_hover)
|
|
||||||
nmap <space>ad <Plug>(ale_detail)
|
|
||||||
nmap <space>af <Plug>(ale_fix)
|
|
||||||
nmap <space>ar <Plug>(ale_find_references)
|
|
||||||
nmap <space>ag <Plug>(ale_go_to_definition)
|
|
||||||
nmap <space>aD <Plug>(ale_documentation)
|
|
||||||
nmap <space>an <Plug>(ale_next)
|
|
||||||
nmap <space>ap <Plug>(ale_previous)
|
|
||||||
|
|
||||||
"}}}
|
|
||||||
" #coc.nvim{{{
|
" #coc.nvim{{{
|
||||||
" https://github.com/neoclide/coc.nvim
|
" https://github.com/neoclide/coc.nvim
|
||||||
|
|
||||||
|
@ -63,7 +26,6 @@ call plug#begin('~/.config/nvim/bundle')
|
||||||
|
|
||||||
" inoremap <silent><expr> <c-n> coc#refresh()
|
" inoremap <silent><expr> <c-n> coc#refresh()
|
||||||
nnoremap <silent> <silent> <space><space> :call CocAction('doHover')<CR>
|
nnoremap <silent> <silent> <space><space> :call CocAction('doHover')<CR>
|
||||||
nnoremap <silent> <silent> <space>cc :call CocAction('doHover')<CR>
|
|
||||||
nnoremap <silent> <space>cf :call CocAction('doQuickfix')<CR>
|
nnoremap <silent> <space>cf :call CocAction('doQuickfix')<CR>
|
||||||
nnoremap <silent> <space>cg :call CocAction('jumpDefinition')<CR>
|
nnoremap <silent> <space>cg :call CocAction('jumpDefinition')<CR>
|
||||||
nnoremap <silent> <space>ci :call CocAction('jumpImplementation')<CR>
|
nnoremap <silent> <space>ci :call CocAction('jumpImplementation')<CR>
|
||||||
|
@ -72,14 +34,11 @@ call plug#begin('~/.config/nvim/bundle')
|
||||||
nnoremap <silent> <space>ca :call CocAction('codeAction')<CR>
|
nnoremap <silent> <space>ca :call CocAction('codeAction')<CR>
|
||||||
nnoremap <silent> <space>cs :call CocAction('documentSymbols')<CR>
|
nnoremap <silent> <space>cs :call CocAction('documentSymbols')<CR>
|
||||||
nnoremap <silent> <space>cS :call CocAction('workspaceSymbols')<CR>
|
nnoremap <silent> <space>cS :call CocAction('workspaceSymbols')<CR>
|
||||||
nnoremap <silent> <space>cn :call CocAction('diagnosticNext')<CR>
|
nnoremap <silent> ]c :call CocAction('diagnosticNext')<CR>
|
||||||
nnoremap <silent> <space>cp :call CocAction('diagnosticPrevious')<CR>
|
nnoremap <silent> [c :call CocAction('diagnosticPrevious')<CR>
|
||||||
" vnoremap \f <Plug>(coc-format-selected)
|
|
||||||
" nnoremap \f <Plug>(coc-format-selected)
|
|
||||||
command! -nargs=0 Format :call CocAction('format')
|
command! -nargs=0 Format :call CocAction('format')
|
||||||
command! -nargs=? Fold :call CocAction('fold', <f-args>)
|
command! -nargs=? Fold :call CocAction('fold', <f-args>)
|
||||||
|
|
||||||
|
|
||||||
" }}}
|
" }}}
|
||||||
" #delimitMate{{{
|
" #delimitMate{{{
|
||||||
" https://github.com/Raimondi/delimitMate
|
" https://github.com/Raimondi/delimitMate
|
||||||
|
@ -295,6 +254,12 @@ let g:mta_filetypes = {
|
||||||
Plug 'studio-vx/Vim-Jinja2-Syntax'
|
Plug 'studio-vx/Vim-Jinja2-Syntax'
|
||||||
|
|
||||||
"}}}
|
"}}}
|
||||||
|
" #vim-shellcheck{{{
|
||||||
|
" https://github.com/itspriddle/vim-shellcheck
|
||||||
|
Plug 'itspriddle/vim-shellcheck'
|
||||||
|
|
||||||
|
"}}}
|
||||||
|
|
||||||
" #vim-SyntaxRange{{{
|
" #vim-SyntaxRange{{{
|
||||||
" https://github.com/inkarkat/vim-SyntaxRange
|
" https://github.com/inkarkat/vim-SyntaxRange
|
||||||
" Plug 'inkarkat/vim-SyntaxRange'
|
" Plug 'inkarkat/vim-SyntaxRange'
|
||||||
|
@ -417,7 +382,7 @@ let g:vim_markdown_fenced_languages = ['bash=sh']
|
||||||
call plug#end()
|
call plug#end()
|
||||||
runtime macros/matchit.vim
|
runtime macros/matchit.vim
|
||||||
" TODO - try 'coc-tsserver'
|
" TODO - try 'coc-tsserver'
|
||||||
call coc#add_extension( 'coc-vetur', 'coc-python', 'coc-phpls', 'coc-json', 'coc-css', 'coc-prettier', 'coc-eslint', 'coc-vimlsp', 'coc-tsserver')
|
call coc#add_extension( 'coc-vetur', 'coc-python', 'coc-phpls', 'coc-json', 'coc-css', 'coc-prettier', 'coc-eslint', 'coc-vimlsp', 'coc-tsserver', 'coc-sh')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
14
init.vim
14
init.vim
|
@ -160,18 +160,6 @@ command! -nargs=1 -complete=command Redir silent call Redir(<q-args>)
|
||||||
" :Redir hi ............. show the full output of command ':hi' in a scratch window
|
" :Redir hi ............. show the full output of command ':hi' in a scratch window
|
||||||
" :Redir !ls -al ........ show the full output of command ':!ls -al' in a scratch window
|
" :Redir !ls -al ........ show the full output of command ':!ls -al' in a scratch window
|
||||||
"}}}
|
"}}}
|
||||||
function! AleLinterStatus() abort "{{{
|
|
||||||
let l:counts = ale#statusline#Count(bufnr(''))
|
|
||||||
|
|
||||||
let l:all_errors = l:counts.error + l:counts.style_error
|
|
||||||
let l:all_non_errors = l:counts.total - l:all_errors
|
|
||||||
|
|
||||||
return l:counts.total == 0 ? '' : printf(
|
|
||||||
\ '[ %dW %dE ]',
|
|
||||||
\ all_non_errors,
|
|
||||||
\ all_errors
|
|
||||||
\)
|
|
||||||
endfunction
|
|
||||||
"}}}
|
"}}}
|
||||||
function! ToggleHighlights() abort "{{{
|
function! ToggleHighlights() abort "{{{
|
||||||
if ! exists('b:toggle_highlights_state')
|
if ! exists('b:toggle_highlights_state')
|
||||||
|
@ -324,8 +312,6 @@ set statusline+=%-20(%l\ of\ %L\ (%p%%)%)
|
||||||
set statusline+=%-10(:%c\ %((%V)%)%)
|
set statusline+=%-10(:%c\ %((%V)%)%)
|
||||||
" separator, highlight color
|
" separator, highlight color
|
||||||
set statusline+=%=%#StatusLineNC#
|
set statusline+=%=%#StatusLineNC#
|
||||||
" Ale errors
|
|
||||||
set statusline+=%{AleLinterStatus()}\
|
|
||||||
" CoC status
|
" CoC status
|
||||||
set statusline+=%{coc#status()}
|
set statusline+=%{coc#status()}
|
||||||
" separator
|
" separator
|
||||||
|
|
Loading…
Reference in New Issue