bathos/Ecmascript-Sublime

LSP integration

ryanpcmcquen opened this issue · 4 comments

If I want to use the Naomi syntax package with LSP, I use a setting like this for the LSP-typescript package:

// Settings in here override those in "LSP-typescript/LSP-typescript.sublime-settings"
{
    "languages": [
        {
            "languageId": "javascript",
            "scopes": ["source.js"],
            "syntaxes": [
                "Packages/JavaScript/JavaScript.sublime-syntax",
                "Packages/Babel/JavaScript (Babel).sublime-syntax",
                "Packages/Naomi/syntaxes/naomi.fjsx15.sublime-syntax"
            ]
        },
        {
            "languageId": "javascriptreact",
            "scopes": ["source.jsx"],
            "syntaxes": [
                "Packages/User/JS Custom/Syntaxes/React.sublime-syntax",
                "Packages/Naomi/syntaxes/naomi.fjsx15.sublime-syntax"
            ]
        }
    ]
}

Where are the syntaxes stored for Ecmascript? I can't find them anywhere in the Sublime Packages directory.

If you want to use Noami for JSX you can set file-syntax association in Sublime Text. Same as other issue, open a jsx file and then go View > Syntax > Open all with current extension... and set to Naomi.

FYI that package uses Language Server Protocol to do syntax highlighting, meaning they can dynamically highlight tokens whereas we are using ST3's syntax highlighting system and our embedded languages have to be baked in.

I don't want to use Naomi, I'm just giving an example of how I got it working with LSP, since setting the syntax to 'Ecmascript' breaks the LSP plugin. @blake-regalia, I was wondering if you knew the workaround for it.

Okay, maybe I misunderstood the initial question my apologies @ryanpcmcquen . If you installed Ecmascript from PackageControl the main syntax will be at "Packages/Ecmascript/ecmascript.sublime-syntax" . The contents of the .sublime-package installed from PackageControl is just a zip of the root source code directory in this repo.

Thank you @blake-regalia, I'll try that and report back.