diff options
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/util.lua | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lua/lspconfig/util.lua b/lua/lspconfig/util.lua index d23e47c2..b99f8555 100644 --- a/lua/lspconfig/util.lua +++ b/lua/lspconfig/util.lua @@ -93,14 +93,7 @@ function M.search_ancestors(startpath, func) end local function escape_wildcards(path) - -- Escape all potentially problematic special characters - -- Covers: - -- - Wildcards and pattern matching: [ ] ? * $ ( ) ^ % . + - ~ - -- - Escape character: \ - -- - Shell special characters: ` ' " ; | & < > - -- - Whitespace: %s (spaces, tabs, etc.) - -- The gsub function replaces any matches with the same character preceded by a backslash - return path:gsub('([' .. vim.pesc('[]?*$()^%.+-~') .. '\\`\'";|&<>%s])', '\\%1') + return path:gsub('([%[%]%?%*])', '\\%1') end function M.root_pattern(...) |
