Merge pull request #21 from KabbAmine/sign-custom
Add an option for defining text of signs
This commit is contained in:
commit
40c01d2f14
10
README.md
10
README.md
@ -84,12 +84,22 @@ 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
|
### Always showing gutter
|
||||||
|
|
||||||
You can keep the sign gutter open at all times by setting the g:ale_sign_column_always to 1
|
You can keep the sign gutter open at all times by setting the g:ale_sign_column_always to 1
|
||||||
|
|
||||||
```vim
|
```vim
|
||||||
let g:ale_sign_column_always = 1
|
let g:ale_sign_column_always = 1
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Customize signs
|
||||||
|
|
||||||
|
Use these options to specify what text should be used for signs:
|
||||||
|
|
||||||
|
```vim
|
||||||
|
let g:ale_sign_error = '>>'
|
||||||
|
let g:ale_sign_warning = '--'
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
@ -20,9 +20,15 @@ if !hlexists('ALEWarning')
|
|||||||
highlight link ALEWarning SpellCap
|
highlight link ALEWarning SpellCap
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" Global variables for signs
|
||||||
|
let g:ale_sign_error = get(g:, 'ale_sign_error', '>>')
|
||||||
|
let g:ale_sign_warning = get(g:, 'ale_sign_error', '--')
|
||||||
|
|
||||||
" Signs show up on the left for error markers.
|
" Signs show up on the left for error markers.
|
||||||
sign define ALEErrorSign text=>> texthl=ALEErrorSign
|
execute 'sign define ALEErrorSign text=' . g:ale_sign_error
|
||||||
sign define ALEWarningSign text=-- texthl=ALEWarningSign
|
\ . ' texthl=ALEErrorSign'
|
||||||
|
execute 'sign define ALEWarningSign text=' . g:ale_sign_warning
|
||||||
|
\ . ' texthl=ALEWarningSign'
|
||||||
|
|
||||||
" This function will set the signs which show up on the left.
|
" This function will set the signs which show up on the left.
|
||||||
function! ale#sign#SetSigns(buffer, loclist)
|
function! ale#sign#SetSigns(buffer, loclist)
|
||||||
|
Loading…
Reference in New Issue
Block a user