Merge pull request #13 from vmarovic/master
Option to keep sign column always open
This commit is contained in:
commit
31f4601fcf
@ -82,6 +82,14 @@ This plugin will look for linters in the [`ale_linters`](ale_linters) directory.
|
|||||||
Each directory within corresponds to a particular filetype in Vim, and each file
|
Each directory within corresponds to a particular filetype in Vim, and each file
|
||||||
in each directory corresponds to the name of a particular linter.
|
in each directory corresponds to the name of a particular linter.
|
||||||
|
|
||||||
|
### Always showing gutter
|
||||||
|
You can keep the sign gutter open at all times by setting the g:ale_sign_column_always to 1
|
||||||
|
|
||||||
|
```vim
|
||||||
|
let g:ale_sign_column_always = 1
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
To install this plugin, you should use one of the following methods.
|
To install this plugin, you should use one of the following methods.
|
||||||
|
@ -45,3 +45,8 @@ endif
|
|||||||
if !exists('g:ale_warn_about_trailing_whitespace')
|
if !exists('g:ale_warn_about_trailing_whitespace')
|
||||||
let g:ale_warn_about_trailing_whitespace = 1
|
let g:ale_warn_about_trailing_whitespace = 1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" This flag can be set to 1 to keep sign gutter always open
|
||||||
|
if !exists('g:ale_sign_column_always')
|
||||||
|
let g:ale_sign_column_always = 0
|
||||||
|
endif
|
||||||
|
@ -50,6 +50,8 @@ function! ale#sign#SetSigns(buffer, loclist)
|
|||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
|
call ale#sign#InsertDummy(len(signlist))
|
||||||
|
|
||||||
for i in range(0, len(signlist) - 1)
|
for i in range(0, len(signlist) - 1)
|
||||||
let obj = signlist[i]
|
let obj = signlist[i]
|
||||||
let name = obj['type'] ==# 'W' ? 'ALEWarningSign' : 'ALEErrorSign'
|
let name = obj['type'] ==# 'W' ? 'ALEWarningSign' : 'ALEErrorSign'
|
||||||
@ -62,3 +64,12 @@ function! ale#sign#SetSigns(buffer, loclist)
|
|||||||
exec sign_line
|
exec sign_line
|
||||||
endfor
|
endfor
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
" Show signd gutter if there is no signs and g:ale_sign_column_alwas is set to 1
|
||||||
|
function! ale#sign#InsertDummy(no_signs)
|
||||||
|
if g:ale_sign_column_always == 1 && a:no_signs == 0
|
||||||
|
sign define ale_keep_open_dummy
|
||||||
|
execute 'sign place 9999 line=1 name=ale_keep_open_dummy buffer=' . bufnr('')
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
@ -297,6 +297,8 @@ function! ALELint(delay)
|
|||||||
if a:delay > 0
|
if a:delay > 0
|
||||||
let s:lint_timer = timer_start(a:delay, function('s:TimerHandler'))
|
let s:lint_timer = timer_start(a:delay, function('s:TimerHandler'))
|
||||||
else
|
else
|
||||||
|
" Show empty gutter if g:ale_sign_column_always = 1
|
||||||
|
call ale#sign#InsertDummy(0)
|
||||||
call s:TimerHandler()
|
call s:TimerHandler()
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
Loading…
Reference in New Issue
Block a user