Skip to content

Introduce Qlue-ls & Switch from Codemirror to Monaco#156

Open
IoannisNezis wants to merge 60 commits intoqlever-dev:masterfrom
IoannisNezis:monaco
Open

Introduce Qlue-ls & Switch from Codemirror to Monaco#156
IoannisNezis wants to merge 60 commits intoqlever-dev:masterfrom
IoannisNezis:monaco

Conversation

@IoannisNezis
Copy link
Collaborator

@IoannisNezis IoannisNezis commented Jun 3, 2025

Replace Codemirror with the monaco editor.
Introduce the Qlue-ls SPARQL language server.
The Editor only has to comunicate via LSP with Qlue-ls and be pretty.

@IoannisNezis IoannisNezis changed the title Switch from Codemirror to Monaco Introduce Qlue-ls & Switch from Codemirror to Monaco Jun 25, 2025
@IoannisNezis IoannisNezis self-assigned this Jun 25, 2025
@IoannisNezis IoannisNezis added the enhancement New feature or request label Jun 25, 2025
@greenBene
Copy link

Hi @IoannisNezis :)

Hannah just showed us at a meeting this branch and it's great! The code writing feels way smoother than before!

Just two nitpicky requests based on the test instance:

  • The style (colors and font) of the monaco editor stands a bit out of the rest of the qlever UI. Are there any plans to update the style to make it more fitting?
  • I love the tooltip support when you hover over words such as PREFIX. Is there any way to extend it for all SPARQL keywords?
       PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
       PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
       SELECT * WHERE {
         ?a rdf:type rdf:Property ;
            rdfs:label ?label ;
            rdfs:comment ?comment .
       }```

@IoannisNezis
Copy link
Collaborator Author

Hey @greenBene!

The style (colors and font) of the monaco editor stands a bit out of the rest of the qlever UI. Are there any plans to update the style to make it more fitting?

Yes, further styling the editor is planned but currently not really a priority.

I love the tooltip support when you hover over words such as PREFIX. Is there any way to extend it for all SPARQL keywords?

Yes, there is. These tooltips are provided by the hover capability of the language server "Qlue-ls".
Here is the source code: https://github.com/IoannisNezis/Qlue-ls/blob/main/src/server/message_handler/hover/documentation.rs

Adding tooltips is very straight forward, feel free to contribute :)

Bonus request that might be highly out of scope: Would it be possible to show the comments for properties and classes if they are documented within the knowledge graph?

This is actually well within scope and already implemented.
When a IRI is hovered a SPARQL request is used to retrieve the shown hover content.
These hover queries can be configured per backend and can retrieve anything in the KG.

* master:
  Add API to obtain backend info with the Django REST framework (qlever-dev#174)
  Format all `.py` files using `ruff` + add `pyproject.toml` (qlever-dev#175)
  Update links in footer
  Bump `Qlue-ls` version to 0.15.0 (qlever-dev#172)
  Trim final newline after `Format` + thousand separators in `Details` box
  Escape backslashes in queries for `Share` dialog (qlever-dev#160)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants