summaryrefslogtreecommitdiff
path: root/ale_linters
diff options
context:
space:
mode:
authorrliang <ricardoliang@gmail.com>2019-05-13 15:50:03 -0300
committerrliang <ricardoliang@gmail.com>2019-05-13 15:50:03 -0300
commitab7e5b264f27bef8ec8abf795ebe66214d057620 (patch)
treefc45c2a46640c5e51f093463dcef88d531430786 /ale_linters
parentc88ebc5e70852c9571aa7a94b5eb28df000d693a (diff)
downloadale-ab7e5b264f27bef8ec8abf795ebe66214d057620.zip
[linter] Add LSP support for LaTeX via texlab
Diffstat (limited to 'ale_linters')
-rw-r--r--ale_linters/tex/texlab.vim21
1 files changed, 21 insertions, 0 deletions
diff --git a/ale_linters/tex/texlab.vim b/ale_linters/tex/texlab.vim
new file mode 100644
index 00000000..5ead74b4
--- /dev/null
+++ b/ale_linters/tex/texlab.vim
@@ -0,0 +1,21 @@
+" Author: Ricardo Liang <ricardoliang@gmail.com>
+" Description: Texlab language server (Rust rewrite)
+
+call ale#Set('tex_texlab_executable', 'texlab')
+call ale#Set('tex_texlab_options', '')
+
+function! ale_linters#tex#texlab#GetProjectRoot(buffer) abort
+ return ''
+endfunction
+
+function! ale_linters#tex#texlab#GetCommand(buffer) abort
+ return '%e' . ale#Pad(ale#Var(a:buffer, 'tex_texlab_options'))
+endfunction
+
+call ale#linter#Define('tex', {
+\ 'name': 'texlab',
+\ 'lsp': 'stdio',
+\ 'executable': {b -> ale#Var(b, 'tex_texlab_executable')},
+\ 'command': function('ale_linters#tex#texlab#GetCommand'),
+\ 'project_root': function('ale_linters#tex#texlab#GetProjectRoot'),
+\})