Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors when I use coc-snippets under GIT BASH #346

Open
markwu opened this issue Nov 5, 2023 · 1 comment
Open

Errors when I use coc-snippets under GIT BASH #346

markwu opened this issue Nov 5, 2023 · 1 comment

Comments

@markwu
Copy link

markwu commented Nov 5, 2023

image

I encountered an error after installing coc-snippets in my Windows environment.

I'm using Vim within Git Bash, which is built with MSYS. In this setup, the C:\ drive is represented as /c/.

Consequently, C:/Users/markwu becomes /c/Users/markwu in Git Bash.

However, it seems that coc-snippets is adding C:/ in front of the path, which is causing issues. Even if I manually create the directory /c/Users/markwu/.config/coc/ultisnips, coc-snippets cannot recognize it.

As a result, I'm encountering the following error when using vim:

[coc.nvim]: Error: ENOENT: no such file or directory, mkdir 'c:\c\Users\markwu\.config\coc\ultisnips'

@listenerri
Copy link

listenerri commented Feb 17, 2025

I found a workaround, if you don't use ultisnips, just disable it in coc-settings.json:

# open or create coc-settings.json in vim
:CocConfig

# insert the following line config into {}
{
    "snippets.ultisnips.enable": false
}

If you need to use ultisnips, create a folder called UltiSnips in your HOME directory and add the following configuration in the coc-settings.json file

# the `~` works well on Windows, Linux, Git Bash, Msys2
{
    "snippets.userSnippetsDirectory": "~/UltiSnips"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants