-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix chktex highlighting wrong column when using tabs instead of spaces (
#4661) * Fix chktex highlighting wrong column when using tabs instead of spaces Fixes #723 chktex implemented feature request [1] for allowing setting options from the command line. Thanks to that we can tell it to treat tab character as of one space width, i.e. one char. That means, after we translate the output back to Vim columns, we get correct numbers. [1]: https://savannah.nongnu.org/bugs/?56486 * Add test_tex_chktex.vader * Use functions to set g: variables in ale_linters/tex/chktex.vim * Update ale_linters#tex#chktex#GetCommand() to use '%e'
- Loading branch information
Showing
2 changed files
with
40 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Before: | ||
call ale#assert#SetUpLinterTest('tex', 'chktex') | ||
|
||
After: | ||
call ale#assert#TearDownLinterTest() | ||
|
||
Execute(The default command should be correct): | ||
AssertLinter 'chktex', | ||
\ ale#Escape('chktex') | ||
\ . ' -v0 -p stdin -q -s TabSize=1' | ||
\ . ' -I' | ||
|
||
Execute(The executable should be configurable): | ||
let g:ale_tex_chktex_executable = 'bin/foo' | ||
|
||
AssertLinter 'bin/foo', | ||
\ ale#Escape('bin/foo') | ||
\ . ' -v0 -p stdin -q -s TabSize=1' | ||
\ . ' -I' | ||
|
||
Execute(The options should be configurable): | ||
let b:ale_tex_chktex_options = '--something' | ||
|
||
AssertLinter 'chktex', | ||
\ ale#Escape('chktex') | ||
\ . ' -v0 -p stdin -q -s TabSize=1' | ||
\ . ' --something' |