-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
feat: support use vscode variables in settings #399
feat: support use vscode variables in settings #399
Conversation
0920035
to
9e7320c
Compare
export default function variables( | ||
string: string, | ||
recursive?: boolean, | ||
): string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to export these types? is this needed by vscode ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This type definition is mainly for solving type checking issues.
use vscode-variables package to support using ${workspaceFolder} in configuration files to define paths
9e7320c
to
92dcfca
Compare
@@ -73,6 +73,10 @@ Pass settings to the language server via the `serverSettings` option. | |||
}, | |||
"home-manager": { | |||
"expr": "(builtins.getFlake \"/absolute/path/to/flake\").homeConfigurations.<name>.options" | |||
}, | |||
// Tip: use ${workspaceFolder} variable to define path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
describe this feature here
Thanks for the contribution @njzydark ! |
https://github.com/nix-community/nixd/blob/main/nixd/docs/configuration.md#where-to-place-the-configuration
According to the above document, when defining the expr of options, only absolute paths can be used. This is very inconvenient for configuring across machines. Therefore, this PR introduces the vscode-variables package to support using
${workspaceFolder}
in configuration files to define paths.before
after