summaryrefslogtreecommitdiff
path: root/ale_linters/tex/texlab.vim
diff options
context:
space:
mode:
Diffstat (limited to 'ale_linters/tex/texlab.vim')
-rw-r--r--ale_linters/tex/texlab.vim5
1 files changed, 4 insertions, 1 deletions
diff --git a/ale_linters/tex/texlab.vim b/ale_linters/tex/texlab.vim
index 5ead74b4..dd26fa0a 100644
--- a/ale_linters/tex/texlab.vim
+++ b/ale_linters/tex/texlab.vim
@@ -1,11 +1,14 @@
" Author: Ricardo Liang <ricardoliang@gmail.com>
+" Author: ourigen <ourigen [at] pm.me>
" 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 ''
+ let l:git_path = ale#path#FindNearestDirectory(a:buffer, '.git')
+
+ return !empty(l:git_path) ? fnamemodify(l:git_path, ':h:h') : ''
endfunction
function! ale_linters#tex#texlab#GetCommand(buffer) abort