cmp-path
cmp-path copied to clipboard
Support windows path and env
- Add windows path (works for cmdline too):
x:\foo\bar
,x:/foo\bar
- Add brace-env path (not for cmdline, convenient for bash coding):
${HOME}/
,${HOME}\
- Add windows env path (not for cmdline):
%HOME%/
,%HOME%\
I hope this will be merged, I checkout this commit, and it works find on my windows machine and it is very useful.
Is it possible to adapt it to also support relative paths? (relative to neovim pwd
).
Is it possible to adapt it to also support relative paths? (relative to neovim
pwd
).
You mean provide completion items for ./
?
Yes, let's assume that :pwd
in Neovim returns:
C:\path\to\dir
And this dir
contains:
file1
file2
subdir\file1
subdir\file2
Then, I expect that when typing in insert mode:
.\
and activating the nvim-cmp
popup, the possible autocomplete choices should include:
.\file1
.\file2
.\subdir\file1
.\subdir\file2
...or perhaps it would be better if, after triggering with .\
, the nvim-cmp
popup directly showed:
file1
file2
subdir\file1
subdir\file2
without prefixing each file with .\
? This, of course, is specifically for Windows.
However, I believe that solution "1" (including the .\
before each file) is the most "consistent".
Think your detailed description.
This PR supports .\
and I'm sure I can get completions from both ./
and .\