Skip to content

Templates: inputs that the user or the installer fills in, instead of placeholders in commands #2368

Backlog

Description

@lagergren

Idea 3 of #1959, as an issue of its own: a way for a template to say that a value of its command has to come from the user or from its installer, instead of a placeholder that LSP4IJ doesn't know, such as XXX or <<insert base directory>>.

#1959's placeholders are paths that the installers already know. #2367 replaces them with the real commands, from installers that save their servers under fixed names (idea 1 of #1959). This issue is for the values that only the user knows, and for the values that an installer sets, without overwriting the whole command.

Inputs

As in VS Code's tasks.json and launch.json (input variables), the command refers to an input by its id, and the template declares its inputs once:

"programArgs": {
  "default": "luau-lsp lsp --definitions=${input:definitions}"
},
"inputs": [
  { "id": "installpath", "description": "Path to the camel-lsp-server JAR", "filledBy": "installer" },
  { "id": "definitions", "description": "Path to globalTypes.d.luau", "optional": true }
]
  • The settings show a table of the inputs below the command, with their descriptions, as the environment variables table. The New Language Server dialog and the settings page flag an empty required input in its row, and Apply is refused while one is left, unless the installer fills it in.
  • A server with an empty required input isn't started: the LSP Consoles say which input is missing, instead of a start that fails with an error that doesn't point to it.
  • An installer sets an input instead of the whole command, e.g. "setInput": {"installpath": "${output.dir}/${output.file.name}"} in place of configureServer. Today configureServer with "update": true overwrites the command, so a change that the user made, as an extra argument, is gone after Reinstall.
  • An optional input that stays empty is left out, with its argument, as --definitions=${input:definitions}.
  • Server definitions without inputs keep working as they do today.

To decide

Related

Activity

  1. added this to the 0.30.3 milestone on Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions