aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/lspconfig/configs/powershell_es.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/lua/lspconfig/configs/powershell_es.lua b/lua/lspconfig/configs/powershell_es.lua
index fdc7ba33..2004d334 100644
--- a/lua/lspconfig/configs/powershell_es.lua
+++ b/lua/lspconfig/configs/powershell_es.lua
@@ -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
@@ -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 = {