w3c/shacl

SHACLC LSP implementation

VladimirAlexiev opened this issue · 2 comments

@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?

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

@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!