secondlife / secondlife/sl-vscode-plugin

Proposal: Add the ability to include external tools in the save process

Open
#13 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
33
Forks
15
Avg merge
14h 50m
Merged PRs (30d)
9

Description

The past 20+ years of scripting in sl have lead to a wealth of tools and personalized workflows.

This plugin could never accommodate them all so instead it would be nice to allow people to keep using some of their tools if they so wish.

I propose adding some configuration that the plugin would read, and during the save process, before and or after the preprocessor (enabeld or not) is run, the plugin executes given commands and takes their output.

Example

Say the following format is used for config

{
    "slVscodeEdit.externalTooling.afterPreProcessor": [
        {
            "command": "python ~/lsl/lsl-pyoptimizer/main.py --bom {inputFile}",
            "input": "file",
            "output": "std",
            "languages": ["lsl"]
        }
    ]
}

On save the plugin would :

  1. Run the built in preprocessor (if enabled)
  2. Check config for steps to run
    • Filter for ones that match langauge
  3. Find the step, check it's input and output types - If input is file save the script content to a temporary file
    • If output is file, generate a temporary filename
  4. Execute the command filling in relevant tokens and piping script through stdin if needed
  5. Read the response in std out / once command is complete from {outputFile}
  6. Continue as the script sync to the viewer as normal with the new output

This should allow scripters with more advanced workflows to implement their process, while getting the benefits of the plugin

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the save process and preprocessor integration in the TypeScript VS Code plugin. Define how configured external tools are selected by language, how file or standard-input/output modes are handled, and how the resulting script is synchronized to the viewer; done means the proposed configuration can run before or after preprocessing during save.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.