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

Don't work to expand variables or ~ in configPath #625

Closed
fmsyt opened this issue Sep 14, 2022 · 1 comment · Fixed by DoItWithASmile/vscode-markdown-preview-enhanced#1 or #655
Closed

Comments

@fmsyt
Copy link

fmsyt commented Sep 14, 2022

I want to move mume directory in $HOME/.config/mume.
But actual created in %LOCALAPPDATA%\Programs\Microsoft VS Code\$HOME\.config\mume.

Configured in remoteWSL:

{
    "markdown-preview-enhanced.configPath": "$HOME/.config/mume"
}

In default, mume is created in ~/.local/state/mume

thank you.

@fmsyt fmsyt changed the title Don't work to expand variables or ~ inconfigPath Don't work to expand variables or ~ in configPath Sep 14, 2022
@DoItWithASmile
Copy link
Contributor

I second that issue.

I came across it while trying to do "${workspaceFolder}/".
I am looking for a per-workspace configuration for the editor. Reason being that each workspace might have their own custom styles. Since MPE doesn't care about VS code's markdown.styles setting, this would be an acceptable workaround.

DoItWithASmile added a commit to DoItWithASmile/vscode-markdown-preview-enhanced that referenced this issue Dec 29, 2022
Adds support for predefined VS Code variable "${workspaceFolder}" to setting "configPath" in MPE.

This allows for configuring MPE per-workspace if needed.

fixes shd101wyy#625
DoItWithASmile added a commit to DoItWithASmile/vscode-markdown-preview-enhanced that referenced this issue Dec 29, 2022
setting "configPath" does not support environment variables.

Extended to support windows style %ENV_VAR% as well as bash style ${ENV_VAR} and $ENV_VAR environment variables

fixes shd101wyy#625
DoItWithASmile added a commit to DoItWithASmile/vscode-markdown-preview-enhanced that referenced this issue Dec 30, 2022
Implementation only applies to configPath and polutes the code.

Refactors that code and extracts it into a PathResolver class.

fixes shd101wyy#625
shd101wyy pushed a commit that referenced this issue Dec 31, 2022
* Support workspaceFolder variable in configPath

Adds support for predefined VS Code variable "${workspaceFolder}" to setting "configPath" in MPE.

This allows for configuring MPE per-workspace if needed.

fixes #625

* Support environment variables in configPath

setting "configPath" does not support environment variables.

Extended to support windows style %ENV_VAR% as well as bash style ${ENV_VAR} and $ENV_VAR environment variables

fixes #625

* Refactoring to allow any string to resolve variables

Implementation only applies to configPath and polutes the code.

Refactors that code and extracts it into a PathResolver class.

fixes #625
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment