aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorSalomon Popp <hi@salomonpopp.me>2025-01-13 09:40:45 +0100
committerGitHub <noreply@github.com>2025-01-13 00:40:45 -0800
commit4c5748bc92b00e7539d3a4d79053f036683d4691 (patch)
tree515331ff2c804003c19ab6cb6bfb1e26026a706a /lua
parentdocs: update configs.md (diff)
downloadnvim-lspconfig-4c5748bc92b00e7539d3a4d79053f036683d4691.tar
nvim-lspconfig-4c5748bc92b00e7539d3a4d79053f036683d4691.tar.gz
nvim-lspconfig-4c5748bc92b00e7539d3a4d79053f036683d4691.tar.bz2
nvim-lspconfig-4c5748bc92b00e7539d3a4d79053f036683d4691.tar.lz
nvim-lspconfig-4c5748bc92b00e7539d3a4d79053f036683d4691.tar.xz
nvim-lspconfig-4c5748bc92b00e7539d3a4d79053f036683d4691.tar.zst
nvim-lspconfig-4c5748bc92b00e7539d3a4d79053f036683d4691.zip
feat: gh-actions-language-server #3551
Diffstat (limited to 'lua')
-rw-r--r--lua/lspconfig/configs/gh_actions_ls.lua40
1 files changed, 40 insertions, 0 deletions
diff --git a/lua/lspconfig/configs/gh_actions_ls.lua b/lua/lspconfig/configs/gh_actions_ls.lua
new file mode 100644
index 00000000..b7451585
--- /dev/null
+++ b/lua/lspconfig/configs/gh_actions_ls.lua
@@ -0,0 +1,40 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'gh-actions-language-server', '--stdio' },
+ filetypes = { 'yaml.github' },
+ root_dir = util.root_pattern('.github'),
+ single_file_support = true,
+ capabilities = {
+ workspace = {
+ didChangeWorkspaceFolders = {
+ dynamicRegistration = true,
+ },
+ },
+ },
+ },
+ docs = {
+ description = [[
+https://github.com/lttb/gh-actions-language-server
+
+Language server for GitHub Actions.
+
+The server is registered for the special `yaml.github` filetype. You need to configure this filetype pattern for GitHub workflow files.
+
+```lua
+vim.filetype.add({
+ pattern = {
+ ['.*/%.github[%w/]+workflows[%w/]+.*%.ya?ml'] = 'yaml.github',
+ },
+})
+```
+
+`gh-actions-language-server` can be installed via `npm`:
+
+```sh
+npm install -g gh-actions-language-server
+```
+]],
+ },
+}