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

Dynamically determine config value #11049

Closed
Gbr22 opened this issue Jun 28, 2024 · 1 comment
Closed

Dynamically determine config value #11049

Gbr22 opened this issue Jun 28, 2024 · 1 comment
Labels
C-enhancement Category: Improvements

Comments

@Gbr22
Copy link

Gbr22 commented Jun 28, 2024

[language-server.vue-language-server]
command = "vue-language-server"
args = ["--stdio"]
config = { typescript = { tsdk = "C:\\Program Files\\nodejs\\node_modules\\typescript\\lib" } }

I have configured the vue language server on my windows device, but I want to have a single portable configuration file which I can use on linux as well. It would be nice to have a way to dynamically determine a value in the config file at runtime via some scripting language (bash, lua, js, python, whatever)

I would imagine it as something like this:

[[dynamic]]
key = "[language-server.vue-language-server].config.typescript.tsdk"
type = "string"
value = { command = "bash", args = ["-c", "echo '$(npm root -g)/typescript/lib'"] }

Keep in mind I don't often use toml, so the exact toml syntax for setting the value can be different, I'm just trying to get my point across.

@Gbr22 Gbr22 added the C-enhancement Category: Improvements label Jun 28, 2024
@the-mikedavis
Copy link
Member

This would be enabled by a scriptable config, closing in favor of #10389

@the-mikedavis the-mikedavis closed this as not planned Won't fix, can't repro, duplicate, stale Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: Improvements
Projects
None yet
Development

No branches or pull requests

2 participants