Closed stellarhoof closed 5 months ago
Yes, this is an issue upstream. There's not much I can do here, short of creating a new glob matching implementation. I'd recommend filing an issue upstream with the minimal vim.glob.to_lpeg
repro. It would probably also be helpful if you can narrow down the repro a bit to determine which part of the pattern or path is causing problems.
Did you check the docs and existing issues?
Neovim version (nvim -v)
v0.10.0-dev-e948d7f
Operating system/version
MacOS Sonoma 14.4.1
Describe the bug
glob_pattern
in this line fails to match a filename when renaming, causing lsp client to not notify the server ofworkspace/didRenameFiles
.The glob string is
**/*.{ts,cts,mts,tsx,js,cjs,mjs,jsx}
and the filename is 'packages/ui/src/rats/Button.tsx':lua =vim.glob.to_lpeg('**/*.{ts,cts,mts,tsx,js,cjs,mjs,jsx}'):match('packages/ui/src/rats/Button.tsx')
also fails to matchIf I remove
glob_pattern
in the linked code and instead useglob
it works as intended.Probably an issue with neovim itself?
What is the severity of this bug?
breaking (some functionality is broken)
Steps To Reproduce
:lua =vim.glob.to_lpeg('**/*.{ts,cts,mts,tsx,js,cjs,mjs,jsx}'):match('packages/ui/src/rats/Button.tsx')
Expected Behavior
File renaming triggers
workspace/didRenameFiles
Directory structure
No response
Repro
Did you check the bug with a clean config?
nvim -u repro.lua
using the repro.lua file above.