diff options
| author | Michael Lingelbach <m.j.lbach@gmail.com> | 2021-07-03 14:45:08 -0700 |
|---|---|---|
| committer | Michael Lingelbach <m.j.lbach@gmail.com> | 2021-07-03 15:49:27 -0700 |
| commit | ec11b85df73cce4edb2925cb7f1d0e8db3a07b1c (patch) | |
| tree | 77d533dc9606ca7e9b30d1a96baebf3de325d2a8 /lua/lspconfig/vala_ls.lua | |
| parent | [docgen] Update CONFIG.md (diff) | |
| download | nvim-lspconfig-ec11b85df73cce4edb2925cb7f1d0e8db3a07b1c.tar nvim-lspconfig-ec11b85df73cce4edb2925cb7f1d0e8db3a07b1c.tar.gz nvim-lspconfig-ec11b85df73cce4edb2925cb7f1d0e8db3a07b1c.tar.bz2 nvim-lspconfig-ec11b85df73cce4edb2925cb7f1d0e8db3a07b1c.tar.lz nvim-lspconfig-ec11b85df73cce4edb2925cb7f1d0e8db3a07b1c.tar.xz nvim-lspconfig-ec11b85df73cce4edb2925cb7f1d0e8db3a07b1c.tar.zst nvim-lspconfig-ec11b85df73cce4edb2925cb7f1d0e8db3a07b1c.zip | |
ci: lint and format with stylua
Diffstat (limited to 'lua/lspconfig/vala_ls.lua')
| -rw-r--r-- | lua/lspconfig/vala_ls.lua | 26 |
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")]], }, }, } |
