From 258f671c5d3d92fadb1d38dc6766f9700da5143e Mon Sep 17 00:00:00 2001 From: Aleš Brelih Date: Mon, 15 Apr 2024 08:10:45 +0200 Subject: fix: gitlab-ci-ls filetype (#3109) Now it loads on yaml.gitlab. Also added yamlls dependency to the same filetype. --- lua/lspconfig/server_configurations/gitlab_ci_ls.lua | 10 +++++----- lua/lspconfig/server_configurations/yamlls.lua | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'lua') diff --git a/lua/lspconfig/server_configurations/gitlab_ci_ls.lua b/lua/lspconfig/server_configurations/gitlab_ci_ls.lua index 6dde3fc4..f9d8402f 100644 --- a/lua/lspconfig/server_configurations/gitlab_ci_ls.lua +++ b/lua/lspconfig/server_configurations/gitlab_ci_ls.lua @@ -4,7 +4,7 @@ local cache_dir = util.path.join(vim.loop.os_homedir(), '.cache/gitlab-ci-ls/') return { default_config = { cmd = { 'gitlab-ci-ls' }, - filetypes = { 'yaml' }, + filetypes = { 'yaml.gitlab' }, root_dir = util.root_pattern('.gitlab*', '.git'), init_options = { cache_path = cache_dir, @@ -22,11 +22,11 @@ cargo install gitlab-ci-ls ]], default_config = { cmd = { 'gitlab-ci-ls' }, - filetypes = { 'yaml' }, - root_dir = util.root_pattern('.gitlab*', '.git'), + filetypes = { 'yaml.gitlab' }, + root_dir = [[util.root_pattern('.gitlab*', '.git')]], init_options = { - cache_path = cache_dir, - log_path = util.path.join(cache_dir, 'log/gitlab-ci-ls.log'), + cache_path = [[util.path.join(vim.loop.os_homedir(), '.cache/gitlab-ci-ls/')]], + log_path = [[util.path.join(util.path.join(vim.loop.os_homedir(), '.cache/gitlab-ci-ls/'), 'log/gitlab-ci-ls.log')]], }, }, }, diff --git a/lua/lspconfig/server_configurations/yamlls.lua b/lua/lspconfig/server_configurations/yamlls.lua index 531e6f8c..3756e620 100644 --- a/lua/lspconfig/server_configurations/yamlls.lua +++ b/lua/lspconfig/server_configurations/yamlls.lua @@ -3,7 +3,7 @@ local util = require 'lspconfig.util' return { default_config = { cmd = { 'yaml-language-server', '--stdio' }, - filetypes = { 'yaml', 'yaml.docker-compose' }, + filetypes = { 'yaml', 'yaml.docker-compose', 'yaml.gitlab' }, root_dir = util.find_git_ancestor, single_file_support = true, settings = { -- cgit v1.2.3-70-g09d2