Skip to content

Commit

Permalink
fix(powershell_es): root pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
sharpchen committed Jan 5, 2025
1 parent f4ed656 commit 368db3d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lua/lspconfig/configs/powershell_es.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
local temp_path = vim.fn.stdpath 'cache'
local util = require 'lspconfig.util'

local function make_cmd(new_config)
if new_config.bundle_path ~= nil then
Expand All @@ -20,9 +21,7 @@ return {
end,

filetypes = { 'ps1' },
root_dir = function(fname)
return vim.fs.dirname(vim.fs.find('.git', { path = fname, upward = true })[1])
end,
root_dir = util.root_pattern('PSScriptAnalyzerSettings.psd1', '.git'),
single_file_support = true,
},
docs = {
Expand Down

0 comments on commit 368db3d

Please sign in to comment.