generated from IWANABETHATGUY/tower-lsp-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
131 additions
and
28 deletions.
There are no files selected for viewing
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>tower-lsp web demo</title><link rel="stylesheet" href="./assets/css/main.css"/><script type="module" src="app.bundle.js"></script><script type="module" src="editor.worker.bundle.js"></script></head><body><div id="wrapper" class="wrapper"><div id="container"><h1 id="title">Semantic Web Language Server Demonstrator</h1><p id="synopsis">This app demos an editor with language smarts (for JavaScript) by hosting the <a href="https://microsoft.github.io/monaco-editor/">Monaco</a> widget with an <a href="https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/">LSP</a> server implemented via <a href="https://github.com/ebkalderon/tower-lsp">tower-lsp</a> and <a href="https://github.com/tree-sitter/tree-sitter">tree-sitter</a>. Everything is compiled to WASM and run client-side directly in the browser; there are no separate sever-side processes or web workers used by the app code. (Monaco itself does use web workers, however).</p><p id="features"><strong>features</strong>: ⇧⌘O (macos) or ⇧⌃O (windows) opens symbol view; the <strong>syntax</strong> area shows the JavaScript syntax tree (green for valid; red for errors) parsed from <strong>editor</strong></p><div id="cell-editor" class="cell-editor"><label for="editor">Data <span class="name">turtle.ttl</span></label><div id="editor" class="editor"></div></div><div id="cell-editor2" class="cell-editor"><label for="editor2">SPARQL <span class="name">query.sq</span></label><div id="editor2" class="editor"></div></div><div id="cell-editor3" class="cell-editor"><label for="editor3">Ontology <span class="name">owl.ttl</span></label><div id="editor3" class="editor"></div></div><div id="cell-editor4" class="cell-editor"><label for="editor4">Shapes <span class="name">shacl.ttl</span></label><div id="editor4" class="editor"></div></div></div></div><div id="wrapper2"><div id="container2"><div id="cell-console"><label for="channel-console">console</label> <textarea id="channel-console" autocomplete="off" spellcheck="off" wrap="off" readonly="readonly" rows="3"></textarea></div><div id="cell-client"><label for="channel-client">message trace (client ⇒ server)</label> <textarea id="channel-client" autocomplete="off" spellcheck="off" wrap="off" readonly="readonly" rows="4"></textarea></div><div id="cell-server"><label for="channel-server">message trace (client ⇐ server)</label> <textarea id="channel-server" autocomplete="off" spellcheck="off" wrap="off" readonly="readonly" rows="4"></textarea></div><div id="cell-syntax"><label for="channel-syntax">syntax</label> <textarea id="channel-syntax" autocomplete="off" spellcheck="off" wrap="off" readonly="readonly"></textarea></div></div></div></body></html> | ||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>tower-lsp web demo</title><link rel="stylesheet" href="./assets/css/main.css"/><script type="module" src="app.bundle.js"></script><script type="module" src="editor.worker.bundle.js"></script></head><body><div id="side_panel" class="hidden"><div><h3>Keyboard Actions</h3><ul><li><span class="key">Ctrl</span> + <span class="key">Shift</span> + <span class="key">i</span> : Format</li><li><span class="key">Ctrl</span> + <span class="key">Space</span> : Complete</li><li><span class="key">Ctrl</span> + <span class="key">K</span> : Rename</li></ul></div><div><h3>Expected behaviour</h3><div class="behaviour"><h3>Autocomplete prefixes:</h3><section>Type <span class="lit">foa</span>, trigger complete, hit <span class="key small">Enter</span>.</section><section>Completed to <span class="lit">foaf:</span> and a prefix statement.</section></div><div class="behaviour"><h3>Autocomplete property:</h3><section>At predicate location, type <span class="lit">ed:</span> , trigger complete, hit <span class="key small">Enter</span>.</section><section>Complete to <span class="lit">ed:completesProperties</span> (property is defined in ontology and imported).</section></div><div class="behaviour"><h3>Autocomplete class:</h3><section>At object location with <span class="lit">rdf:type</span> as predicate type <span class="lit">ed:</span> , trigger complete, hit <span class="key small">Enter</span>.</section><section>Complete to <span class="lit">ed:Completion</span> (class is defined in ontology and imported).</section></div><div class="behaviour"><h3>Shacl shape validation:</h3><section>Two seconds after an edit, the language server is notified of a <span>save</span>. This triggers shape validations.</section><section>An <span class="lit">ed:LanguageServer</span> needs at least three features, and all features need to be <span class="lit">ed:isCool</span>.</section></div></div><div><h3>Peculiarities</h3><div class="behaviour">SWLS doesn't support the entire <span class="lit">SPARQL</span> syntax yet. It also doesn't support formatting for it.</div></div><button id="toggle">☰</button></div><div id="wrapper" class="wrapper"><div id="container"><h1 id="title">Semantic Web Language Server Demonstrator</h1><p id="synopsis">This app demos an editor with language smarts (for JavaScript) by hosting the <a href="https://microsoft.github.io/monaco-editor/">Monaco</a> widget with an <a href="https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/">LSP</a> server implemented via <a href="https://github.com/ebkalderon/tower-lsp">tower-lsp</a> and <a href="https://github.com/tree-sitter/tree-sitter">tree-sitter</a>. Everything is compiled to WASM and run client-side directly in the browser; there are no separate sever-side processes or web workers used by the app code. (Monaco itself does use web workers, however).</p><div id="cell-editor" class="cell-editor"><label for="editor">Data <span class="name">turtle.ttl</span></label><div id="editor" class="editor"></div></div><div id="cell-editor2" class="cell-editor"><label for="editor2">SPARQL <span class="name">query.sq</span></label><div id="editor2" class="editor"></div></div><div id="cell-editor3" class="cell-editor"><label for="editor3">Ontology <span class="name">owl.ttl</span></label><div id="editor3" class="editor"></div></div><div id="cell-editor4" class="cell-editor"><label for="editor4">Shapes <span class="name">shacl.ttl</span></label><div id="editor4" class="editor"></div></div></div></div><div id="wrapper2"><div id="container2"></div></div></body></html> |