oni2 icon indicating copy to clipboard operation
oni2 copied to clipboard

Error using bracket pair colorizer 2

Open Th3Whit3Wolf opened this issue 5 years ago • 4 comments

I am unable to use Bracket Pair Colorizer 2, I was able to install Bracket Pair Colorizer without errors but it didn't work.

This seems like it should be related to themes, if not maybe there should be an update to VSCode Extension Host Integration?

[DEBUG]    +0ms Revery.FontCache : Resolving fallback for: Error: Activating extension 'CoenraadS.bracket-pair-colorizer-2' failed: Cannot find module '/tmp/.mount_oni2to7QdG/usr/bin/node_modules.asar/vscode-textmate'
Require stack:
- /home/doc/.config/oni2/extensions/CoenraadS.bracket-pair-colorizer-2-0.2.0/out/src/textMateLoader.js
- /home/doc/.config/oni2/extensions/CoenraadS.bracket-pair-colorizer-2-0.2.0/out/src/settings.js
- /home/doc/.config/oni2/extensions/CoenraadS.bracket-pair-colorizer-2-0.2.0/out/src/documentDecorationManager.js
- /home/doc/.config/oni2/extensions/CoenraadS.bracket-pair-colorizer-2-0.2.0/out/src/extension.js
- /tmp/.mount_oni2to7QdG/usr/share/node/node_modules/@onivim/vscode-exthost/out/vs/loader.js
- /tmp/.mount_oni2to7QdG/usr/share/node/node_modules/@onivim/vscode-exthost/out/bootstrap-amd.js
- /tmp/.mount_oni2to7QdG/usr/share/node/node_modules/@onivim/vscode-exthost/out/bootstrap-fork.js. at byte offset 487

OS: Arch Linux Version: 0.5.1-nightly

Th3Whit3Wolf avatar Sep 21 '20 13:09 Th3Whit3Wolf

Indent-Rainbow also successfully installs but does not work. I think this is related to the issues with Bracket Pair Colorizer.

Th3Whit3Wolf avatar Sep 22 '20 08:09 Th3Whit3Wolf

Interesting, thanks for sharing the log @Th3Whit3Wolf !

It looks like Bracket Pair Colorizer 2 actually looks at the internals of VSCode to pick the oniguruma and textmate node_modules - we might need to bundle those (and make sure the appRoot is set appropriately): https://github.com/CoenraadS/Bracket-Pair-Colorizer-2/blob/f4f5bf2795a2d4c81d4d423deca6af3533a30ff7/src/textMateLoader.ts

Past that, both the APIs use a decorations API that we don't support, yet - so we need to support this textEditor.setDecorations API: https://github.com/CoenraadS/Bracket-Pair-Colorizer-2/blob/6ab0a5656d97b1f86fb9c5b0405072aabd252990/src/documentDecoration.ts#L210

bryphe avatar Sep 24 '20 23:09 bryphe

The author of the bracket colorizer seems to have discontinued support - both bracket colorizer 1 and 2 GitHub repos are archived.

Any hope that Oni2 could support it natively? (This is also the direction VSC is taking, native rather than extension support).

jerabaul29 avatar Jun 29 '21 17:06 jerabaul29

Really missing this in my daily life - this kind of colorizer stuff for 'brackets', 'code block extent gutter indication', etc, would save a lot of pain in daily life. Hope it comes natively some day :) .

jerabaul29 avatar Aug 03 '21 20:08 jerabaul29