summaryrefslogtreecommitdiff
path: root/ale_linters/tex/texlab.vim
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2019-05-13 20:17:35 +0100
committerGitHub <noreply@github.com>2019-05-13 20:17:35 +0100
commit70604828fa8a6713f1e7db2e4e58d44f9099ac87 (patch)
treefc45c2a46640c5e51f093463dcef88d531430786 /ale_linters/tex/texlab.vim
parentc88ebc5e70852c9571aa7a94b5eb28df000d693a (diff)
parentab7e5b264f27bef8ec8abf795ebe66214d057620 (diff)
downloadale-70604828fa8a6713f1e7db2e4e58d44f9099ac87.zip
Merge pull request #2500 from rliang/texlab
[lsp] Add Texlab support
Diffstat (limited to 'ale_linters/tex/texlab.vim')
-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'),
+\})