aboutsummaryrefslogtreecommitdiffstats
path: root/lsp/gitlab_ci_ls.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lsp/gitlab_ci_ls.lua')
-rw-r--r--lsp/gitlab_ci_ls.lua24
1 files changed, 24 insertions, 0 deletions
diff --git a/lsp/gitlab_ci_ls.lua b/lsp/gitlab_ci_ls.lua
new file mode 100644
index 00000000..9e6cc7a9
--- /dev/null
+++ b/lsp/gitlab_ci_ls.lua
@@ -0,0 +1,24 @@
+local util = require 'lspconfig.util'
+
+local cache_dir = vim.uv.os_homedir() .. '/.cache/gitlab-ci-ls/'
+
+---@brief
+---
+---https://github.com/alesbrelih/gitlab-ci-ls
+--
+-- Language Server for Gitlab CI
+--
+-- `gitlab-ci-ls` can be installed via cargo:
+-- cargo install gitlab-ci-ls
+return {
+ cmd = { 'gitlab-ci-ls' },
+ filetypes = { 'yaml.gitlab' },
+ root_dir = function(bufnr, on_dir)
+ local fname = vim.api.nvim_buf_get_name(bufnr)
+ on_dir(util.root_pattern('.gitlab*', '.git')(fname))
+ end,
+ init_options = {
+ cache_path = cache_dir,
+ log_path = cache_dir .. '/log/gitlab-ci-ls.log',
+ },
+}