Can't get intellisense working for Windows Terminal settings.json

Viewed 462

I am trying to enable intelli-sense when I am editing the settings.json of the Windows Terminal. When this file is open auto-complete mostly does not work. I can seemingly get some suggestions, but it definitely does not include everything in the schema. For example, If i go to add a new command, man listed in schema , like 'newTab' to do pop up as possible options, unlike in this video: https://www.youtube.com/watch?v=NfgAOxfv0QU

  • schema is "https://aka.ms/terminal-profiles-schema",
  • I see an "unable to resole schema. Click to Retry" error in the bottom tray of VSCode. I can click to retry but nothing happens.
  • the $schema property has a squiggle underneath it that says "Draft 2019-09 schemas are not fully supported"
  • my settings.json looks like this (the default i think)
{
    "json.schemas": [
        {
            "fileMatch": [
                "/myfile"
            ],
            "url": "schemaURL"
        }
    ],
    "[json]": {
    
        "editor.quickSuggestions": {
            "strings": true
        },
        "editor.suggest.insertMode": "replace"
    }
}

More specifically, I DO get suggestions from the schema here:

    "profiles":
    {
        
        "list":
        [
            {
                "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
                "hidden": false,
                "name": "PowerShell",
                "source": "Windows.Terminal.PowershellCore",
                "colorScheme": "Campbell Powershell",
                "padding": "8, 8, 8, 8" //suggestions work here
            },

But NOT here:


    "actions":
    [
        {"command": "xxx", "keys":"zzz"} // no completion suggestions here
    ]

In neither case do I see squigglies under properties that are not in the scheme (e.g. if I mistype padding above)

1 Answers

It appears you're facing a known issue which has been raised here https://github.com/microsoft/vscode/issues/98724. This issue is still open.

A duplicate issue contains a work around however, which may be worth trying - https://github.com/microsoft/terminal/issues/7683.

"https://github.com/microsoft/terminal/raw/e504bf21402bca34e45863370aad9fefd543c292/doc/cascadia/profiles.schema.json". That was the last version before the schema was upgraded to draft 2019-09. If you change the schema URL like that, I think it will avoid the Draft 2019-09 schemas are not yet fully supported warning in Visual Studio Code...

Further down a user reports the workaround was successful for them. Consider voting the GitHub issue!

Related