Skip to content

Doesn't work on MacOS or Windows #9

Open

Description

@kshetline

I get an error that the extension failed to load. I think the problem comes down to this line of code, line 2 in text-mate.ts:

const tm = require(path.join(require.main.filename, '../../node_modules/vscode-textmate/release/main.js'));

That path simply doesn't match up to anything in the way the VSCode application on MacOS is set up. I tried to modify this project to instead use its own copy of the text-mate package via npm i vscode-textmate, but that fails spectacularly because it expects a loadGrammar function to be defined in the options passed into Registry.

Ah... I just tested this on Windows, and it's also failing there with the message:

Command 'scope-info: enable hover information' resulted in an error (command 'extension.enableScopeHover' not found)

I suspect in might be for the same reason I found on MacOS: The directory structure for the VSCode app doesn't match either. There is no node_modules directory, just a node_modules.asar file and a node_modules.asar.unpacked directory. Inside node_modules.asar.unpacked, there is no vscode-textmate directory.

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions