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

Cooperation with profiles #8

Open
KPiach opened this issue Jan 6, 2023 · 7 comments
Open

Cooperation with profiles #8

KPiach opened this issue Jan 6, 2023 · 7 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@KPiach
Copy link

KPiach commented Jan 6, 2023

VSCode supports the ability to create profiles. When using profiles, the snippet paths change, which means that the extension does not find user snippets and VSCode cannot see the user snippet from files created by the extension.

@zjffun
Copy link
Owner

zjffun commented Jan 6, 2023

Thank you. We will try to fix this, but it seems to get --user-data-dir is hard currently.

microsoft/vscode#37442
microsoft/vscode#2741

@zjffun zjffun added bug Something isn't working help wanted Extra attention is needed labels Jan 6, 2023
@zjffun
Copy link
Owner

zjffun commented Jan 24, 2023

I try to use --user-data-dir but can't reproduce this bug.

code --user-data-dir ~/vscode-user-data-dir-test

Screen Shot 2023-01-24 at 12 30 40

Could you give us more information about profiles, Operating System, code -v or code --verbose to help us reproduce this?

code -v
1.74.2
e8a3071ea4344d9d48ef8a4df2c097372b0c5161
arm64

code --user-data-dir ~/vscode-user-data-dir-test --verbose
[main 2023-01-24T04:43:32.989Z] [File Watcher (node.js)] Request to start watching: /Users/zjf/vscode-user-data-dir-test/User (excludes: <none>, includes: <all>),/Users/zjf/vscode-user-data-dir-test/User/settings.json (excludes: <none>, includes: <all>)
[main 2023-01-24T04:43:32.995Z] Sending env to running instance...
[main 2023-01-24T04:43:32.995Z] [File Watcher (node.js)] Error: ENOENT: no such file or directory, stat '/Users/zjf/vscode-user-data-dir-test/User/settings.json'
[main 2023-01-24T04:43:32.996Z] [File Watcher (node.js)] Started watching: '/Users/zjf/vscode-user-data-dir-test/User'
[main 2023-01-24T04:43:33.029Z] Sent env to running instance. Terminating...
[main 2023-01-24T04:43:33.029Z] Lifecycle#kill()
[main 2023-01-24T04:43:33.029Z] Lifecycle#onWillShutdown.fire()
[30850:0124/124333.036455:WARNING:pref_notifier_impl.cc(60)] Init observer found at shutdown.

@KPiach
Copy link
Author

KPiach commented Jan 25, 2023

My VSC:
image
I have configured some profiles:
image
If I use VSC snippet command for create snippet file, it will be in:
image
and I can use snippets normally (for clarification, -59cf7cf2 is a subdirectory of my profile named Python). This file is not seen by the extension.
On the other hand, if I create a snippet file by extension, it will be located in ..\Code\User\snippets\ and not available in the editor.

@KPiach

This comment was marked as resolved.

@zjffun

This comment was marked as resolved.

@zjffun
Copy link
Owner

zjffun commented Jan 26, 2023

image

Got it, I find this feature in Visual Studio Code November 2022.

@zjffun
Copy link
Owner

zjffun commented Jan 26, 2023

Wait for microsoft/vscode#160466 to be implemented.

@zjffun zjffun self-assigned this May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants