Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SHACLC LSP implementation #50

Open
VladimirAlexiev opened this issue Mar 21, 2024 · 2 comments
Open

SHACLC LSP implementation #50

VladimirAlexiev opened this issue Mar 21, 2024 · 2 comments

Comments

@VladimirAlexiev
Copy link
Contributor

@jeswr @anneeb @kendall
Once the SHACLC grammar is unified/finalized (see 4 inputs in https://github.com/VladimirAlexiev/shacl/tree/shaclc-grammars/shacl-compact-syntax/grammar),
we'll want to implement Language Server Protocol (LSP) for it.

Stardog has made https://github.com/stardog-union/stardog-language-servers (and more in https://marketplace.visualstudio.com/items?itemName=stardog-union.vscode-stardog-languages)

It supports a bunch of semantic languages, including Turtle serialization of SHACL. LSP features currently supported include:

  • Diagnostics (error hints)
  • Hover tooltips (identifies entities in SHACL and shows "expected" symbols in the case of an error)
  • Completion suggestions for standard SHACL QNames

With a dedicated SHACLC syntax, we can add even more features, eg

  • more keywords and synonyms, eg xor, xone, >< all mean the same
  • regexp syntax check

Note to self: SPARQL LSP for Emacs: lsp-sparql.el

Stardog people: maybe it's better to move this issue to your project?

@jeswr
Copy link
Member

jeswr commented Mar 21, 2024

I've got a very basic (to the point that it might just be easier to create a new one) SHACLC LSP started over at https://github.com/jeswr/shaclc-language-server

@VladimirAlexiev
Copy link
Contributor Author

@jeswr Yours mentions these features, which nicely complement the Stardog LSP features:

  • Basic syntax highlighting for SHACL compact syntax
  • Code formatting for SHACL compact syntax
  • File icons for SHACL compact syntax

So combining your start with their approach may bring the best results!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants