Skip to content

Commit

Permalink
feat: gh-actions-language-server #3551
Browse files Browse the repository at this point in the history
  • Loading branch information
disrupted authored Jan 13, 2025
1 parent b146026 commit 4c5748b
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions lua/lspconfig/configs/gh_actions_ls.lua
Original file line number Diff line number Diff line change
@@ -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
```
]],
},
}

0 comments on commit 4c5748b

Please sign in to comment.