lem icon indicating copy to clipboard operation
lem copied to clipboard

Fix tmLanguage implementation to work with (most) of the vscode extensions

Open Sasanidas opened this issue 2 years ago • 4 comments

So, the code that handle the tmLanguages grammars (that for now, only seems lo work for sql-mode) seems fairy complete, and it does work for SQL well.

The thing is, when trying to load any new tmLanguage grammar, it doesn work as expected in most of the ones that I tried (lua, html, clojure).

Each ones gives a different reason, but seems like a combination on the limitations of cl-ppcre compare to the regex engine that vscode is using.

One of the examples is the error that the lua grammar triggers https://github.com/lem-project/lem/issues/1155 .

What can be a nice solution for this problem? :thinking:

Sasanidas avatar Nov 17 '23 15:11 Sasanidas

These are the extension that I'm refering to https://github.com/microsoft/vscode/tree/main/extensions (inside there is a folder called syntaxes that contains the tmLanguage grammar)

Sasanidas avatar Nov 17 '23 15:11 Sasanidas

Hmmm, have we entered a phase where we should create our own regex library...

cxxxr avatar Nov 17 '23 15:11 cxxxr

I guess if VSCode can parse the expression correctly, I don't see why we can't (maybe there is a C library that we can build a wrapper).

Maybe we have to build it, but I think it maybe an overkill. Maybe a fork of cl-ppcre? Not sure... :thinking:

Sasanidas avatar Nov 17 '23 19:11 Sasanidas

Is there a need or can treesitter be leaned on here?

elken avatar Jan 12 '24 13:01 elken