mirror of
https://github.com/prurigro/darkcloud-nvimconfig.git
synced 2024-12-23 00:10:23 -05:00
Open the ale error list by hitting leader twice instead of on error, and always show the gutter when ale is enabled to avoid having the window jump around as errors appear and disappear
This commit is contained in:
parent
676378ca45
commit
8861aa289f
3 changed files with 37 additions and 18 deletions
|
@ -105,6 +105,7 @@ As usual, to have your system use `vimpager` in place of `less`, you'll need to
|
|||
| F10 and Backslash+{ | ALL | Toggle the **tagbar** source code tag sidebar |
|
||||
| F11 and Backslash+\] | ALL | Toggle the **gundo** undo history sidebar |
|
||||
| F12 and Backslash+\[ | ALL | Toggle **vimfiler** file manager sidebar |
|
||||
| Backslash+Backslash | N | Toggle the location list for **ale** issues |
|
||||
|
||||
#### Toggles ####
|
||||
|
||||
|
@ -197,7 +198,7 @@ For a complete list of mappings specific to **darkcloud-vimconfig**, check the l
|
|||
* [vim-signify](https://github.com/mhinz/vim-signify): When a version controlled file is changed, this displays a column showing where and how, and allows for navigation to and between differences.
|
||||
* [vim-surround](https://github.com/tpope/vim-surround): Provides functionality to exchange surrounding delimiters and xml-style tags with another, or simply remove them.
|
||||
* [vim-repeat](https://github.com/tpope/vim-repeat): A library used by vim-surround to allow its delimiter-switching functions to be repeated with the `.` command.
|
||||
* [vim-togglelist](https://github.com/milkypostman/vim-togglelist): Supplies toggle functions for the *location* and *error* lists, which are used by a number of plugins and normally require separate open and close commands.
|
||||
* [vim-togglelist](https://github.com/milkypostman/vim-togglelist): A simple plugin for vim that allows you to bind a key to toggle the Location List and the Quickfix List.
|
||||
* [vim-trailing-whitespace](https://github.com/bronson/vim-trailing-whitespace): Highlights and allows for the easy removal of trailing whitespace in documents.
|
||||
* [vim-unimpaired](https://github.com/tpope/vim-unimpaired): Pairs of handy bracket mappings.
|
||||
|
||||
|
|
|
@ -490,6 +490,9 @@
|
|||
nmap <expr><silent> <Leader>k ':execute "setlocal iskeyword+=".getline(".")[col(".")-1]<CR>:echo "The character ".getline(".")[col(".")-1]." has been added to iskeyword"<CR>'
|
||||
nmap <expr><silent> <Leader>K ':execute "setlocal iskeyword-=".getline(".")[col(".")-1]<CR>:echo "The character ".getline(".")[col(".")-1]." has been removed from iskeyword"<CR>'
|
||||
|
||||
"toggle the location list
|
||||
nnoremap <silent><expr> <Leader><Leader> ':call ToggleLocationList()<CR>'
|
||||
|
||||
"toggle the command reference box
|
||||
nnoremap <silent><expr> ~ ':TCommand<CR>'
|
||||
|
||||
|
@ -590,15 +593,25 @@
|
|||
set pastetoggle=<F3>
|
||||
|
||||
"toggle syntax checking
|
||||
nnoremap <silent><expr> <F4> ':ALEToggle<CR>'
|
||||
xnoremap <silent><expr> <F4> '<Esc>:ALEToggle<CR>gv'
|
||||
inoremap <silent><expr> <F4> '<C-O>:ALEToggle<CR>'
|
||||
nnoremap <silent><expr> <C-F4> ':ALEToggle<CR>'
|
||||
xnoremap <silent><expr> <C-F4> '<Esc>:ALEToggle<CR>gv'
|
||||
inoremap <silent><expr> <C-F4> '<C-O>:ALEToggle<CR>'
|
||||
nnoremap <silent><expr> <A-F4> ':ALEToggle<CR>'
|
||||
xnoremap <silent><expr> <A-F4> '<Esc>:ALEToggle<CR>gv'
|
||||
inoremap <silent><expr> <A-F4> '<C-O>:ALEToggle<CR>'
|
||||
function! ToggleAle()
|
||||
ALEToggle
|
||||
|
||||
if g:ale_enabled
|
||||
set scl=yes
|
||||
else
|
||||
set scl=auto
|
||||
endif
|
||||
endfunction
|
||||
|
||||
nnoremap <silent><expr> <F4> ':call ToggleAle()<CR>'
|
||||
xnoremap <silent><expr> <F4> '<Esc>:call ToggleAle()<CR>gv'
|
||||
inoremap <silent><expr> <F4> '<C-O>:call ToggleAle()<CR>'
|
||||
nnoremap <silent><expr> <C-F4> ':call ToggleAle()<CR>'
|
||||
xnoremap <silent><expr> <C-F4> '<Esc>:call ToggleAle()<CR>gv'
|
||||
inoremap <silent><expr> <C-F4> '<C-O>:call ToggleAle()<CR>'
|
||||
nnoremap <silent><expr> <A-F4> ':call ToggleAle()<CR>'
|
||||
xnoremap <silent><expr> <A-F4> '<Esc>:call ToggleAle()<CR>gv'
|
||||
inoremap <silent><expr> <A-F4> '<C-O>:call ToggleAle()<CR>'
|
||||
|
||||
"toggle goyo
|
||||
nnoremap <silent><expr> <Leader>` ':Goyo<CR>'
|
||||
|
|
|
@ -3,30 +3,35 @@ if !exists("g:autostartchecker") || &diff
|
|||
let g:autostartchecker = 0
|
||||
endif
|
||||
|
||||
"start ale if autostartchecker is true
|
||||
let g:ale_enabled = g:autostartchecker
|
||||
|
||||
" open list of warnings and errors when they exist
|
||||
let g:ale_open_list = 1
|
||||
"always show the sign column when ale is running
|
||||
if g:autostartchecker
|
||||
set scl=yes
|
||||
else
|
||||
set scl=auto
|
||||
endif
|
||||
|
||||
" size of the list
|
||||
let g:ale_list_window_size = 5
|
||||
"don't open the error list when detected (hitting leader twice will do this)
|
||||
let g:ale_open_list = 0
|
||||
|
||||
" don't fix on save
|
||||
"don't fix on save
|
||||
let g:ale_fix_on_save = 0
|
||||
|
||||
" configure when to lint
|
||||
"configure when to lint
|
||||
let g:ale_lint_on_text_changed = 'normal'
|
||||
let g:ale_lint_on_enter = 1
|
||||
let g:ale_lint_on_filetype_changed = 1
|
||||
let g:ale_lint_on_save = 1
|
||||
let g:ale_lint_on_insert_leave = 1
|
||||
|
||||
" list of ale fixers
|
||||
"list of ale fixers
|
||||
let g:ale_fixers = {
|
||||
\ 'javascript': [ 'eslint' ]
|
||||
\ }
|
||||
|
||||
" don't run ale on minified files
|
||||
"don't run ale on minified files
|
||||
let g:ale_pattern_options = {
|
||||
\ '\.min\.[^\.]*$': { 'ale_linters': [], 'ale_fixers': [] },
|
||||
\ }
|
||||
|
|
Loading…
Reference in a new issue