Skip to content

Commit

Permalink
fix: add missing regex file for path source
Browse files Browse the repository at this point in the history
Closes #834
  • Loading branch information
Saghen committed Dec 31, 2024
1 parent 4c2744d commit 1118d07
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lua/blink/cmp/sources/path/regex.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
local NAME_REGEX = '\\%([^/\\\\:\\*?<>\'"`\\|]\\)'
local PATH_REGEX =
assert(vim.regex(([[\%(\%(/PAT*[^/\\\\:\\*?<>\'"`\\| .~]\)\|\%(/\.\.\)\)*/\zePAT*$]]):gsub('PAT', NAME_REGEX)))

return {
--- Lua pattern for matching file names
NAME = '[^/\\:*?<>\'"`|]',
--- Vim regex for matching file paths
PATH = PATH_REGEX,
}

0 comments on commit 1118d07

Please sign in to comment.