diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2025-04-15 07:15:25 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-15 07:15:25 -0700 |
| commit | bb7833d1beb178c6736b498400cf05790b591048 (patch) | |
| tree | 17c404577feb3b531b15692af7560751001ad46f /lua | |
| parent | docs: update configs.md (diff) | |
| download | nvim-lspconfig-bb7833d1beb178c6736b498400cf05790b591048.tar nvim-lspconfig-bb7833d1beb178c6736b498400cf05790b591048.tar.gz nvim-lspconfig-bb7833d1beb178c6736b498400cf05790b591048.tar.bz2 nvim-lspconfig-bb7833d1beb178c6736b498400cf05790b591048.tar.lz nvim-lspconfig-bb7833d1beb178c6736b498400cf05790b591048.tar.xz nvim-lspconfig-bb7833d1beb178c6736b498400cf05790b591048.tar.zst nvim-lspconfig-bb7833d1beb178c6736b498400cf05790b591048.zip | |
Revert "fix(util): improve wildcard escaping" #3729
This reverts commit e39da6a820d2a700904117d29f0dd476d64262cf.
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(...) |
