diff options
| author | sharpchen <77432836+sharpchen@users.noreply.github.com> | 2025-01-05 14:47:34 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-05 06:47:34 -0800 |
| commit | cd51acc1e21d3e71c9a6efb0faf4ff05eee06bf4 (patch) | |
| tree | ed0b98a5cec0f40735262ec2ccb2ebea848511be /lua | |
| parent | docs: update configs.md (diff) | |
| download | nvim-lspconfig-cd51acc1e21d3e71c9a6efb0faf4ff05eee06bf4.tar nvim-lspconfig-cd51acc1e21d3e71c9a6efb0faf4ff05eee06bf4.tar.gz nvim-lspconfig-cd51acc1e21d3e71c9a6efb0faf4ff05eee06bf4.tar.bz2 nvim-lspconfig-cd51acc1e21d3e71c9a6efb0faf4ff05eee06bf4.tar.lz nvim-lspconfig-cd51acc1e21d3e71c9a6efb0faf4ff05eee06bf4.tar.xz nvim-lspconfig-cd51acc1e21d3e71c9a6efb0faf4ff05eee06bf4.tar.zst nvim-lspconfig-cd51acc1e21d3e71c9a6efb0faf4ff05eee06bf4.zip | |
fix(powershell_es): root pattern #3543
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/configs/powershell_es.lua | 5 |
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 = { |
