Invalid path to a file
See original GitHub issueWarning: I will close the issue without the minimal init.vim and the reproduction instructions.
Problems summary
Invalid path to a file This thing could be fixed if i “hardcode” path to directory, i.e.
let s:root_dir = fnamemodify(expand('<sfile>'), ':h:h') " line 87
changed to
let s:root_dir = 'C:/Users/autriz/.vim/plugged/ddc.vim'
in file ddc.vim/autoload/ddc.vim
.
Invalid path also breaks ddc-around
, ddc-matcher_head
, etc. when onEvent is called.
Expected
Working
Environment Information
-
ddc.vim version (SHA1): 9600d45
-
denops.vim version (SHA1): a104cbf
-
deno version(
deno -V
output): 1.24.0 -
OS: Win10
-
neovim/Vim
:version
output: 8.2.5117
:version
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Jun 23 2022 04:01:15)
Included patches: 1-5117
Compiled by <https://www.msys2.org/>
Huge version without GUI. Features included (+) or not (-):
+acl +channel +cscope +ex_extra -hangul_input +linebreak +mouse_dec -mzscheme +profile -sodium -tcl +user_commands +wildmenu
+arabic +cindent +cursorbind +extra_search +iconv +lispindent -mouse_gpm +netbeans_intg -python -sound +termguicolors +vartabs +windows
+autocmd -clientserver +cursorshape -farsi +insert_expand +listcmds -mouse_jsbterm +num64 +python3/dyn +spell +terminal +vertsplit +writebackup
+autochdir +clipboard +dialog_con +file_in_path +ipv6 +localmap +mouse_netterm +packages +quickfix +startuptime +terminfo +vim9script -X11
-autoservername +cmdline_compl +diff +find_in_path +job -lua +mouse_sgr +path_extra +reltime +statusline +termresponse +viminfo -xfontset
-balloon_eval +cmdline_hist +digraphs +float +jumplist +menu -mouse_sysmouse +perl/dyn +rightleft -sun_workshop +textobjects +virtualedit -xim
+balloon_eval_term +cmdline_info -dnd +folding +keymap +mksession +mouse_urxvt +persistent_undo +ruby/dyn +syntax +textprop +visual -xpm
-browse +comments -ebcdic -footer +lambda +modify_fname +mouse_xterm +popupwin +scrollbind +tag_binary +timers +visualextra -xsmp
++builtin_terms +conceal +emacs_tags +fork() +langmap +mouse +multi_byte +postscript +signs -tag_old_static +title +vreplace -xterm_clipboard
+byte_offset +cryptv +eval +gettext +libcall -mouseshape +multi_lang +printer +smartindent -tag_any_white -toolbar +wildignore -xterm_save
system vimrc file: "/etc/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
defaults file: "$VIMRUNTIME/defaults.vim"
fall-back for $VIM: "/etc"
f-b for $VIMRUNTIME: "/usr/share/vim/vim82"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -I/usr/include/ncursesw -march=x86-64 -mtune=generic -O2 -pipe -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -L. -pipe -fstack-protector-strong -pipe -Wl,--as-needed -o vim.exe -lm -lncursesw -lrt -liconv -lacl -lintl -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--enable-auto-image-base -fstack-protector-strong -L/usr/lib/perl5/core_perl/CORE -lperl -lpthr
ead -ldl -lcrypt
Provide a minimal init.vim/vimrc without plugin managers (Required!)
call plug#begin('~/.vim/plugged')
Plug 'gruvbox-community/gruvbox'
Plug 'rhysd/vim-healthcheck'
Plug 'Shougo/ddc.vim'
Plug 'vim-denops/denops.vim'
Plug 'Shougo/ddc-around'
Plug 'Shougo/ddc-matcher_head'
Plug 'Shougo/ddc-sorter_rank'
Plug 'Shougo/ddc-nvim-lsp'
call plug#end()
call ddc#custom#patch_global('sourceOptions', {
\ '_': {
\ 'matchers': ['matcher_head'],
\ 'sorters': ['sorter_rank']
\ },
\ 'nvim-lsp': {
\ 'mark': 'lsp',
\ 'forceCompletionPattern': '\.\w*|:\w*|->\w*'
\ },
\ 'around': {
\ 'mark': 'A'
\ }
\})
call ddc#custom#patch_global('sources', [
\ 'around',
\ 'nvim-lsp'
\])
call ddc#custom#patch_global('souceParams', {
\ 'around': {
\ 'maxSize': 500
\ },
\ 'nvim-lsp': {
\ 'kindLabels': {
\ 'Class': 'c'
\ }
\ },
\})
call ddc#enable()
How to reproduce the problem from neovim/Vim startup (Required!)
start denops server start vim
Issue Analytics
- State:
- Created a year ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
TypeError: invalid path or file error even when the file exists
My code raised "invalid path or file" error even when the file exists. When I check the list of files in the path,...
Read more >Windows Invalid path error - Microsoft Community
When windows starts a small window opens with the message 'Invalid Path: D:\Top\' What's happening? ... When the file downloads, unzip it.
Read more >"Invalid path or filename 'access is not possible'" when trying ...
Solution: · Check the folder path that the file is trying to download to. If necessary, rename or delete the contents of the...
Read more >Invalid Path or File Name/File Does Not Exist
This error usually means the report references an image that the system cannot find in the specified path.
Read more >Long file name or invalid path - Axway Documentation Portal
Illegal characters in path name can occur if a Mac user uploads a file with a name valid on Mac but invalid on...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Off topic, but I have one question: is
ddu#util#print_error
in file ddc.ts:970 (and 975, 980) a typo? Because it being called throws an exceptionUnknown function: ddu#util#print_error
OH, I have fixed it.