vscode-markdownlint icon indicating copy to clipboard operation
vscode-markdownlint copied to clipboard

Is there a way to have the markdownlint `extends` property in VSCode user settings resolve relative to the current workspace path?

Open leonsilicon opened this issue 3 years ago • 1 comments

Firstly, thanks for the amazing VSCode extension!

I have an npm package @leonzalion/configs which contains a markdownlint.json file, and I'd like to add the following in my VSCode global user settings in order to extend the markdownlint JSON file inside my npm package whenever I open one of my projects:

"markdownlint.config": { "extends": "./node_modules/@leonzalion/configs/markdownlint.json" }

However, I believe the above code will always resolve from the user's home directory, so it wouldn't work in my situation.

Is there any way I could force markdownlint to resolve the package path from the active workspace directory (maybe with a special embedded string like %WORKSPACE_DIR%?) so that I don't have to add the markdownlint.config setting to all of my projects?

leonsilicon avatar May 05 '22 22:05 leonsilicon

Today, global configuration is relative to home directory as you outline. Something like what you propose seems like a reasonable enhancement, especially if there is precedence in VS Code already.

DavidAnson avatar May 05 '22 22:05 DavidAnson

You'd probably want something like ${workspaceFolder}, though it looks like this is not broadly supported in Settings: https://code.visualstudio.com/docs/editor/variables-reference#_is-variable-substitution-supported-in-user-and-workspace-settings

DavidAnson avatar Aug 08 '22 05:08 DavidAnson