From 93c0512fa0ff07e557a613d7d3e54a3afb944e7e Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Thu, 18 Nov 2021 14:32:08 +0100 Subject: fix(texlab): add language-specific root marker (#1441) --- lua/lspconfig/texlab.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lua') diff --git a/lua/lspconfig/texlab.lua b/lua/lspconfig/texlab.lua index c1612255..c1e2c30a 100644 --- a/lua/lspconfig/texlab.lua +++ b/lua/lspconfig/texlab.lua @@ -69,7 +69,9 @@ configs.texlab = { default_config = { cmd = { 'texlab' }, filetypes = { 'tex', 'bib' }, - root_dir = util.find_git_ancestor, + root_dir = function(fname) + return util.root_pattern '.latexmkrc'(fname) or util.find_git_ancestor(fname) + end, single_file_support = true, settings = { texlab = { @@ -122,9 +124,6 @@ A completion engine built from scratch for (La)TeX. See https://github.com/latex-lsp/texlab/blob/master/docs/options.md for configuration options. ]], - default_config = { - root_dir = "vim's starting directory", - }, }, } -- cgit v1.2.3-70-g09d2