lua-language-server icon indicating copy to clipboard operation
lua-language-server copied to clipboard

Expose the Lexer/Parser to plugins

Open Frityet opened this issue 2 years ago • 1 comments

Hello, I am trying to implement teal support for the language server using the plugin feature, but this is extremely difficult mainly due to the primitiveness of lua's pattern matching compared to a full lexer. I could manually lex the file, but that would be much slower.

Frityet avatar Sep 21 '22 03:09 Frityet

You can require 'lpeglabel' in plugin.

sumneko avatar Sep 23 '22 08:09 sumneko

You can require 'lpeglabel' in plugin.

but what about the lexer present here?

Frityet avatar Sep 24 '22 04:09 Frityet

LuaParser cannot handle the syntax of Teal. What the plugin need to do is pre-converting Teal into a legal Lua syntax before loading by LuaParser.

sumneko avatar Sep 30 '22 15:09 sumneko

Hello @Frityet, has your question been answered?

carsakiller avatar Oct 28 '22 01:10 carsakiller

Aye, will close

Frityet avatar Oct 28 '22 01:10 Frityet