forked from dense-analysis/ale
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
569 support vim sign group and priority (dense-analysis#2786)
* Use sign-group only on supported vim versions. The sign-group feature is only available in nvim 0.4.0 and vim 8.1.614. * Add priority to ALE signs. This allows users to set a priority to ALE signs to take precedence over other plugin signs.
- Loading branch information
1 parent
98b8aba
commit 2771178
Showing
11 changed files
with
180 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,77 @@ | ||
Execute (Parsing English signs should work): | ||
AssertEqual | ||
\ [0, [[9, 1000001, 'ALEWarningSign']]], | ||
\ ale#sign#ParseSigns([ | ||
\ 'Signs for app.js:', | ||
\ ' line=9 id=1000001 name=ALEWarningSign', | ||
\ ]) | ||
if has('nvim-0.4.0') || (v:version >= 801 && has('patch614')) | ||
AssertEqual | ||
\ [0, [[9, 1000001, 'ALEWarningSign']]], | ||
\ ale#sign#ParseSigns([ | ||
\ 'Signs for app.js:', | ||
\ ' line=9 id=1000001 group=ale name=ALEWarningSign', | ||
\ ]) | ||
else | ||
AssertEqual | ||
\ [0, [[9, 1000001, 'ALEWarningSign']]], | ||
\ ale#sign#ParseSigns([ | ||
\ 'Signs for app.js:', | ||
\ ' line=9 id=1000001 name=ALEWarningSign', | ||
\ ]) | ||
endif | ||
|
||
Execute (Parsing Russian signs should work): | ||
AssertEqual | ||
\ [0, [[1, 1000001, 'ALEErrorSign']]], | ||
\ ale#sign#ParseSigns([' строка=1 id=1000001 имя=ALEErrorSign']) | ||
if has('nvim-0.4.0') || (v:version >= 801 && has('patch614')) | ||
AssertEqual | ||
\ [0, [[1, 1000001, 'ALEErrorSign']]], | ||
\ ale#sign#ParseSigns([' строка=1 id=1000001 group=ale имя=ALEErrorSign']) | ||
else | ||
AssertEqual | ||
\ [0, [[1, 1000001, 'ALEErrorSign']]], | ||
\ ale#sign#ParseSigns([' строка=1 id=1000001 имя=ALEErrorSign']) | ||
endif | ||
|
||
Execute (Parsing Japanese signs should work): | ||
AssertEqual | ||
\ [0, [[1, 1000001, 'ALEWarningSign']]], | ||
\ ale#sign#ParseSigns([' 行=1 識別子=1000001 名前=ALEWarningSign']) | ||
if has('nvim-0.4.0') || (v:version >= 801 && has('patch614')) | ||
AssertEqual | ||
\ [0, [[1, 1000001, 'ALEWarningSign']]], | ||
\ ale#sign#ParseSigns([' 行=1 識別子=1000001 group=ale 名前=ALEWarningSign']) | ||
else | ||
AssertEqual | ||
\ [0, [[1, 1000001, 'ALEWarningSign']]], | ||
\ ale#sign#ParseSigns([' 行=1 識別子=1000001 名前=ALEWarningSign']) | ||
endif | ||
|
||
Execute (Parsing Spanish signs should work): | ||
AssertEqual | ||
\ [0, [[12, 1000001, 'ALEWarningSign']]], | ||
\ ale#sign#ParseSigns([' línea=12 id=1000001 nombre=ALEWarningSign']) | ||
if has('nvim-0.4.0') || (v:version >= 801 && has('patch614')) | ||
AssertEqual | ||
\ [0, [[12, 1000001, 'ALEWarningSign']]], | ||
\ ale#sign#ParseSigns([' línea=12 id=1000001 group=ale nombre=ALEWarningSign']) | ||
else | ||
AssertEqual | ||
\ [0, [[12, 1000001, 'ALEWarningSign']]], | ||
\ ale#sign#ParseSigns([' línea=12 id=1000001 nombre=ALEWarningSign']) | ||
endif | ||
|
||
Execute (Parsing Italian signs should work): | ||
AssertEqual | ||
\ [0, [[1, 1000001, 'ALEWarningSign']]], | ||
\ ale#sign#ParseSigns([' riga=1 id=1000001, nome=ALEWarningSign']) | ||
\ | ||
if has('nvim-0.4.0') || (v:version >= 801 && has('patch614')) | ||
AssertEqual | ||
\ [0, [[1, 1000001, 'ALEWarningSign']]], | ||
\ ale#sign#ParseSigns([' riga=1 id=1000001, group=ale nome=ALEWarningSign']) | ||
else | ||
AssertEqual | ||
\ [0, [[1, 1000001, 'ALEWarningSign']]], | ||
\ ale#sign#ParseSigns([' riga=1 id=1000001, nome=ALEWarningSign']) | ||
endif | ||
|
||
Execute (The sign parser should indicate if the dummy sign is set): | ||
AssertEqual | ||
\ [1, [[1, 1000001, 'ALEErrorSign']]], | ||
\ ale#sign#ParseSigns([ | ||
\ ' строка=1 id=1000001 имя=ALEErrorSign', | ||
\ ' line=1 id=1000000 name=ALEDummySign', | ||
\ ]) | ||
if has('nvim-0.4.0') || (v:version >= 801 && has('patch614')) | ||
AssertEqual | ||
\ [1, [[1, 1000001, 'ALEErrorSign']]], | ||
\ ale#sign#ParseSigns([ | ||
\ ' строка=1 id=1000001 group=ale имя=ALEErrorSign', | ||
\ ' line=1 id=1000000 group=ale name=ALEDummySign', | ||
\ ]) | ||
else | ||
AssertEqual | ||
\ [1, [[1, 1000001, 'ALEErrorSign']]], | ||
\ ale#sign#ParseSigns([ | ||
\ ' строка=1 id=1000001 имя=ALEErrorSign', | ||
\ ' line=1 id=1000000 name=ALEDummySign', | ||
\ ]) | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.