aboutsummaryrefslogtreecommitdiffstats
path: root/lsp
diff options
context:
space:
mode:
Diffstat (limited to 'lsp')
-rw-r--r--lsp/gh_actions_ls.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/lsp/gh_actions_ls.lua b/lsp/gh_actions_ls.lua
index 2e7bd1fd..f029ea72 100644
--- a/lsp/gh_actions_ls.lua
+++ b/lsp/gh_actions_ls.lua
@@ -30,7 +30,22 @@ return {
on_dir(parent)
end
end,
+ handlers = {
+ ['actions/readFile'] = function(_, result)
+ if type(result.path) ~= 'string' then
+ return nil, nil
+ end
+ local file_path = vim.uri_to_fname(result.path)
+ if vim.fn.filereadable(file_path) == 1 then
+ local f = assert(io.open(file_path, 'r'))
+ local text = f:read('*a')
+ f:close()
+ return text, nil
+ end
+ return nil, nil
+ end,
+ },
init_options = {}, -- needs to be present https://github.com/neovim/nvim-lspconfig/pull/3713#issuecomment-2857394868
capabilities = {
workspace = {