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

Highlighting - INSERT #124

Open
NicoLaval opened this issue Jan 15, 2025 · 1 comment
Open

Highlighting - INSERT #124

NicoLaval opened this issue Jan 15, 2025 · 1 comment

Comments

@NicoLaval
Copy link

INSERT token doesn't seem to be highlighted

@Qup42
Copy link
Member

Qup42 commented Jan 17, 2025

The editor is currently based on CodeMirror. CodeMirror has a mode for SPARQL built in, but it only seems to be for Query. Given that the editor and CodeMirror might be replaced in the medium term, we have to balance the cost and benefits. @hannahbast Do you know how involved this is (i.e. on a scale of adding some CONTEXTS and completions in sparql.js to writing a new language mode for CodeMirror)?

hannahbast pushed a commit that referenced this issue Feb 13, 2025
1. The supported keywords are now defined in the "Backend defaults" and the following keywords have been added: `GRAPH`, `FROM`, `NAMED`, `WITH`, `INSERT`, `DELETE`, `DATA`.
2. At the beginning of a query, there are now also suggestions for the following templates: `INSERT DATA { ... }`, `DELETE DATA { ... }`, `DELETE WHERE { ... }`, `DELETE { ... } WHERE { ... }`, `INSERT { ... } WHERE { ... }`, `DELETE { ... } INSERT { ... } WHERE { ... }`. They only show after at least one letter of the prefix has been typed.
3. There are dynamic suggestions for these new templates as well as an automatic addition of prefix definitions at the top, just like for `SELECT` and `CONSTRUCT`.
4. Inside the `{ ... }` of an `INSERT DATA` or `DELETE DATA`, no new variable names are suggested (but if the user types a variable name that will be suggested in subsequent triples).

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

No branches or pull requests

2 participants