telesoho / vscode-markdown-paste-image

Smartly paste for Markdown.
MIT License
135 stars 41 forks source link

Feature Request: Will your extension support folder `.vscode/settings.json` on a workspace? #64

Closed gusbemacbe closed 2 years ago

gusbemacbe commented 2 years ago

Hello!

On a specific project with a folder .vscode on a workspace, I would not like to add MarkdownPaste.path setting to the global user settings, because it would be boring to always change the path in MarkdownPaste.path at the global user setting.

For example, on a global user settings.json:

{
  "MarkdownPaste.path": "${fileDirname}/blabla/images/"
}

On a specific project's folder containing .vscode/settings.json:

{
  "MarkdownPaste.path": "${fileDirname}/blabla/assets/images/examples"
}

When I press Ctrl/Cmd + Alt + V, I have to rename and type always assets/images/examples, because of "MarkdownPaste.path": "${fileDirname}/blabla/images/", but I find it too tired, and it is not supported for folder settings on a workspace. I do not want to apply "MarkdownPaste.path": "${fileDirname}/blabla/assets/images/examples" to the global user settings, because it is for the specific project and not for all projects.

You can analyse the screenshot, observing the tree:

image

telesoho commented 2 years ago

@gusbemacbe

https://code.visualstudio.com/docs/getstarted/settings

image

According to Microsoft's documentation, the workspace settings will always override the user's public settings. If you don't want workspace setting, you should remove it.

gusbemacbe commented 2 years ago

According to Microsoft's documentation, the workspace settings will always override the user's public settings. If you don't want workspace setting, you should remove it.

I do not mean the workspace settings; I want to override the user settings with a project root folder (.vscode/settings.json). But your extension does not support to override the project root folder on a workspace with the user settings.

Only on an explorer (without workspace), your extension supports to override the project root folder settings with the user settings.

Compare that image above (with workspace) with the image below (without workspace):

image

You can see "Open Folder" (your extensions supports) and "Add Folder to Workspace" (your extension does not support):

image

Remember not to confound project root folder containing .vscode/settings.json with Workspace settings.

You can see how @valentjn's vscode-ltex supports project root folder settings both with or without a workspace. You can see the image above that "ltex.language": "pt-PT" is enabled at .vscode/settings.json on a project on a workspace. Yours is not enabled because your extension does not support.

gusbemacbe commented 2 years ago

It works fully. Impeccable!

image