aboutsummaryrefslogtreecommitdiffstats
path: root/lua/lspconfig/vala_ls.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/lspconfig/vala_ls.lua')
-rw-r--r--lua/lspconfig/vala_ls.lua26
1 files changed, 13 insertions, 13 deletions
diff --git a/lua/lspconfig/vala_ls.lua b/lua/lspconfig/vala_ls.lua
index f2aba74b..684e54a0 100644
--- a/lua/lspconfig/vala_ls.lua
+++ b/lua/lspconfig/vala_ls.lua
@@ -1,18 +1,18 @@
-local configs = require 'lspconfig/configs'
-local util = require 'lspconfig/util'
+local configs = require "lspconfig/configs"
+local util = require "lspconfig/util"
-local meson_matcher = function (path)
+local meson_matcher = function(path)
local pattern = "meson.build"
local f = vim.fn.glob(util.path.join(path, pattern))
- if f == '' then
+ if f == "" then
return nil
end
for line in io.lines(f) do
-- skip meson comments
- if not line:match('^%s*#.*') then
- local str = line:gsub('%s+', '')
- if str ~= '' then
- if str:match('^project%(') then
+ if not line:match "^%s*#.*" then
+ local str = line:gsub("%s+", "")
+ if str ~= "" then
+ if str:match "^project%(" then
return path
else
break
@@ -24,17 +24,17 @@ end
configs.vala_ls = {
default_config = {
- cmd = {'vala-language-server'},
- filetypes = {'vala', 'genie'},
- root_dir = function (fname)
+ cmd = { "vala-language-server" },
+ filetypes = { "vala", "genie" },
+ root_dir = function(fname)
local root = util.search_ancestors(fname, meson_matcher)
return root or util.find_git_ancestor(fname)
end,
},
docs = {
- description = 'https://github.com/benwaffle/vala-language-server',
+ description = "https://github.com/benwaffle/vala-language-server",
default_config = {
- root_dir = [[root_pattern("meson.build", ".git")]]
+ root_dir = [[root_pattern("meson.build", ".git")]],
},
},
}