Soufflé Language Server #2350
Replies: 23 comments 10 replies
-
Awesome.
…On Thu, Nov 3, 2022 at 12:16 PM Ioannis Daridis ***@***.***> wrote:
As part of my Undergraduate Thesis, I developed a Language Server and a
plugin for VS Code for Soufflé. For now, the only client supported is VS
Code, but since it is based on LSP it is trivial to extend support for all
major source-code editors.
https://github.com/jdaridis/souffle-lsp-plugin
https://marketplace.visualstudio.com/items?itemName=i-daridis.souffle-lang-server
—
Reply to this email directly, view it on GitHub
<#2350>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAC3OOJIRCZ4WGQWEEPPJLDWGONJJANCNFSM6AAAAAARWAV2AQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Impressive! |
Beta Was this translation helpful? Give feedback.
-
Great work ! I'm just testing this extension right now and noticed it's lacking syntax highlight for keywords/strings, and it's nice the goto definition and other niceties. |
Beta Was this translation helpful? Give feedback.
-
And looking at the parser https://github.com/jdaridis/souffle-lsp-plugin/blob/master/grammar/Souffle.g4 I can see it's missing some new added elements like:
|
Beta Was this translation helpful? Give feedback.
-
Thank you for pointing out the need to use/install the other vscode plugin. |
Beta Was this translation helpful? Give feedback.
-
I just tested using https://www.bottlecaps.de/convert/ to convert and generate railroad diagram from your https://github.com/jdaridis/souffle-lsp-plugin/blob/master/grammar/Souffle.g4 and it works fine, I'm comparing now the railroad diagram generated from both yours and mine that doesn't include the detailed lex data like yours. |
Beta Was this translation helpful? Give feedback.
-
I noticed that you have
There is a reason for it ? |
Beta Was this translation helpful? Give feedback.
-
I think that you already answered it, thank you ! |
Beta Was this translation helpful? Give feedback.
-
Also you are missing something in
Actual souffle:
|
Beta Was this translation helpful? Give feedback.
-
I think that the grammar is okay now. |
Beta Was this translation helpful? Give feedback.
-
How do you test it ? |
Beta Was this translation helpful? Give feedback.
-
When I developed it, I set the parser to bail out and throw an exception when it fails and catch the exception, incrementing an error counter. |
Beta Was this translation helpful? Give feedback.
-
I'm testing it in vscodium with the source file shown bellow and noticed it can't recognize the rule
|
Beta Was this translation helpful? Give feedback.
-
Thank you again for your great work so far ! |
Beta Was this translation helpful? Give feedback.
-
A suggestion for an improvement showing the
The tool-tip shown when hover over
Would be nice to show the full |
Beta Was this translation helpful? Give feedback.
-
Thank you for reply ! |
Beta Was this translation helpful? Give feedback.
-
Thank you again for reply !
|
Beta Was this translation helpful? Give feedback.
-
I have updated the README file with some of the caveats the server has (eg save to reparse, comment style, etc) |
Beta Was this translation helpful? Give feedback.
-
@jdaridis FYI, I have a relatively complete tree-sitter grammar for Souffle available here: https://github.com/langston-barrett/tree-sitter-souffle. One of the nice things about tree-sitter is that it gives you parse trees even in the presence of syntax errors, which is great for editor integrations. Not sure if ANTLR has a similar capability. Awesome work on the language server! |
Beta Was this translation helpful? Give feedback.
-
Hi, I may share this tool if that can be of any inspiration. |
Beta Was this translation helpful? Give feedback.
-
That's an interesting idea. I will look into it. For the time being, I added a code action to reformat the documentation comments from |
Beta Was this translation helpful? Give feedback.
-
Just added integration with souffle-lint. |
Beta Was this translation helpful? Give feedback.
-
I have created a fork under souffle-lang for visibility. |
Beta Was this translation helpful? Give feedback.
-
As part of my Undergraduate Thesis, I developed a Language Server and a plugin for VS Code for Soufflé. For now, the only client supported is VS Code, but since it is based on LSP it is trivial to extend support for all major source-code editors.
https://github.com/jdaridis/souffle-lsp-plugin
https://marketplace.visualstudio.com/items?itemName=i-daridis.souffle-lang-server
Beta Was this translation helpful? Give feedback.
All reactions