3 ms·
Are pegs easier for syntax highlighting or LSPs?
by fithisux 1y ago
Are pegs easier for syntax highlighting or LSPs?
- conartist6 1y agoThey're not really the same kind of thing. LSP is a carrier format, but it doesn't know or care how you parse things, whether it's with PEGs or an earley parser or shift reduce or whatever
- fithisux 1y agoYes I know, but are they making LSP server construction easier?
- veqq 1y agohttps://janetdocs.org/ https://janetdocs.org/ does (server side) syntax highlighting through hiccup-lexer which converts janet-peg's tokens to hiccup: https://github.com/sogaiu/janet-peg https://github.com/sogaiu/janet-peg The LSP used on vscode works with PEGs also: https://github.com/CFiggers/janet-lsp/blob/ca526aee35c60bcf511cc9475f876385b0b111a4/src/parser.janet#L47 https://github.com/CFiggers/janet-lsp/blob/ca526aee35c60bcf5...