Skip to content

Commit

Permalink
feat: support windows drives for path source
Browse files Browse the repository at this point in the history
Closes #612
  • Loading branch information
Saghen committed Dec 31, 2024
1 parent c379422 commit 98fded2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lua/blink/cmp/sources/path/lib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ function lib.dirname(path_regex, get_cwd, context)
accept = accept and (not prefix:match('^[%s/]*$') or not lib.is_slash_comment())
if accept then return vim.fn.resolve('/' .. dirname) end
end
-- Windows drive letter (C:/)
if prefix:match('(%a:)[/\\]$') then return vim.fn.resolve(prefix:match('(%a:)[/\\]$') .. '/' .. dirname) end
return nil
end

Expand Down

0 comments on commit 98fded2

Please sign in to comment.