summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2016-10-02 16:19:03 +0200
committerGitHub <noreply@github.com>2016-10-02 16:19:03 +0200
commit40c01d2f14a6b24ce196a31ac0027ee262723fc4 (patch)
treed1c767967399d2072599a561ae46c442360231e5
parent21e91d7572bc42145a213dbd6ba5a7d620fef410 (diff)
parent81bccb28479ddd91b543ac1341066cbae314951c (diff)
downloadale-40c01d2f14a6b24ce196a31ac0027ee262723fc4.zip
Merge pull request #21 from KabbAmine/sign-custom
Add an option for defining text of signs
-rw-r--r--README.md10
-rw-r--r--plugin/ale/sign.vim10
2 files changed, 18 insertions, 2 deletions
diff --git a/README.md b/README.md
index e71e1cf4..934998b9 100644
--- a/README.md
+++ b/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.
### 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
```
+### 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
diff --git a/plugin/ale/sign.vim b/plugin/ale/sign.vim
index 6f07703d..46d74fc6 100644
--- a/plugin/ale/sign.vim
+++ b/plugin/ale/sign.vim
@@ -20,9 +20,15 @@ if !hlexists('ALEWarning')
highlight link ALEWarning SpellCap
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.
-sign define ALEErrorSign text=>> texthl=ALEErrorSign
-sign define ALEWarningSign text=-- texthl=ALEWarningSign
+execute 'sign define ALEErrorSign text=' . g:ale_sign_error
+ \ . ' 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.
function! ale#sign#SetSigns(buffer, loclist)