diff options
| author | Michael Lingelbach <m.j.lbach@gmail.com> | 2021-07-13 10:41:39 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-13 10:41:39 -0700 |
| commit | cd1ccf056be9cbcc3d5cbefff08135276bc476ed (patch) | |
| tree | 82a0d7f77d4782b1aa06668298b48d7cf5ecb511 /lua/lspconfig/vala_ls.lua | |
| parent | [docgen] Update CONFIG.md (diff) | |
| download | nvim-lspconfig-cd1ccf056be9cbcc3d5cbefff08135276bc476ed.tar nvim-lspconfig-cd1ccf056be9cbcc3d5cbefff08135276bc476ed.tar.gz nvim-lspconfig-cd1ccf056be9cbcc3d5cbefff08135276bc476ed.tar.bz2 nvim-lspconfig-cd1ccf056be9cbcc3d5cbefff08135276bc476ed.tar.lz nvim-lspconfig-cd1ccf056be9cbcc3d5cbefff08135276bc476ed.tar.xz nvim-lspconfig-cd1ccf056be9cbcc3d5cbefff08135276bc476ed.tar.zst nvim-lspconfig-cd1ccf056be9cbcc3d5cbefff08135276bc476ed.zip | |
chore: change stylua to single quotes (#1068)
Diffstat (limited to 'lua/lspconfig/vala_ls.lua')
| -rw-r--r-- | lua/lspconfig/vala_ls.lua | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lua/lspconfig/vala_ls.lua b/lua/lspconfig/vala_ls.lua index 684e54a0..652f7ea3 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 pattern = "meson.build" + 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,15 +24,15 @@ end configs.vala_ls = { default_config = { - cmd = { "vala-language-server" }, - filetypes = { "vala", "genie" }, + 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")]], }, |
