[linter] Add LSP support for LaTeX via texlab

This commit is contained in:
rliang
2019-05-13 15:50:03 -03:00
parent c88ebc5e70
commit ab7e5b264f
6 changed files with 71 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
Before:
call ale#assert#SetUpLinterTest('tex', 'texlab')
Save &filetype
let &filetype = 'tex'
After:
call ale#assert#TearDownLinterTest()
Execute(The language string should be correct):
AssertLSPLanguage 'tex'
Execute(The default executable path should be correct):
AssertLinter 'texlab', ale#Escape('texlab')
Execute(The project root should be detected correctly):
AssertLSPProject ''
Execute(The executable should be configurable):
let b:ale_tex_texlab_executable = 'foobar'
AssertLinter 'foobar', ale#Escape('foobar')
Execute(The options should be configurable):
let b:ale_tex_texlab_options = '-v'
AssertLinter 'texlab', ale#Escape('texlab') . ' ' . b:ale_tex_texlab_options