neoclide / coc.nvim

Nodejs extension host for vim & neovim, load extensions like VSCode and host language servers.
Other
24.47k stars 956 forks source link

(minor) CocConfig - doesn't work with relative path #1120

Closed mikeTWC1984 closed 5 years ago

mikeTWC1984 commented 5 years ago

I'm trying to use custom node/npm binaries located in my home directory. Somehow cocnvim can't recognize ~ as home, so I have to concat $HOME

this works

let g:coc_node_path = $HOME . "/custom/node/bin/node"
call coc#config("npm.binPath", ($HOME . "/custom/node/bin/npm"))

this will not work

let g:coc_node_path =  "$HOME/custom/node/bin/node"
let g:coc_node_path = "~/custom/node/bin/node"
let g:coc_node_path = "\~/custom/node/bin/node"

Also, it probably would make sense to have some variable to indicate node bin folder instead of setting node and npm separetly (smth like g:coc_node_bin)

chemzqm commented 5 years ago

make sense to have some variable to indicate node bin folder instead of setting node and npm separetly

No, I think that would just be more confusing since node and npm work independently.