Skip to content

Commit

Permalink
refactor(gh_actions_ls): Remove dependency lspconfig.util
Browse files Browse the repository at this point in the history
  • Loading branch information
Crashdummyy committed Jan 22, 2025
1 parent b6ebf7a commit 0f7f777
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lua/lspconfig/configs/gh_actions_ls.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
local util = require 'lspconfig.util'

return {
default_config = {
cmd = { 'gh-actions-language-server', '--stdio' },
Expand All @@ -17,7 +15,10 @@ return {

for _, entry in ipairs(patterns) do
if filename:find(entry.pattern) then
return util.root_pattern(entry.root)(filename)
local match = vim.fs.find(entry.root, { path = filename, upward = true })[1]
if match then
return match
end
end
end

Expand Down

0 comments on commit 0f7f777

Please sign in to comment.