[add] cmds
This commit is contained in:
parent
79ee6bfcb7
commit
7deb653208
3 changed files with 6 additions and 3 deletions
|
@ -1 +1 @@
|
|||
{"cells":[{"kind":2,"language":"xquery","value":"(:<:)\r\n\r\nimport module namespace docs=\"lsp/docs\" at \"/srv/basex/webapp/lsp/docs.xqm\";"},{"kind":2,"language":"xquery","value":"2+2"},{"kind":2,"language":"xquery","value":"ws:ids()"},{"kind":2,"language":"xquery","value":"let $sock:=foot(ws:ids())\r\nlet $f:=docs:list($sock)\r\nlet $t:=docs:get($sock,$f,\"textDocument\")\r\nreturn $t?text"},{"kind":2,"language":"xquery","value":"let $sock:=foot(ws:ids())\r\nlet $f:=docs:list($sock)\r\nlet $t:=docs:get($sock,$f,\"parse\")\r\nreturn $t/self::ERROR"},{"kind":2,"language":"xquery","value":"let $sock:=foot(ws:ids())\r\nlet $f:=docs:list($sock)\r\nlet $t:=docs:get($sock,$f,\"textDocument\")\r\nreturn $t"}]}
|
||||
{"cells":[{"kind":2,"language":"xquery","value":"(:<:)\r\n\r\nimport module namespace docs=\"lsp/docs\" at \"/srv/basex/webapp/lsp/docs.xqm\";"},{"kind":2,"language":"xquery","value":"2+2"},{"kind":2,"language":"xquery","value":"ws:ids()"},{"kind":2,"language":"xquery","value":"let $sock:=foot(ws:ids())\r\nlet $f:=docs:list($sock)\r\nlet $t:=docs:get($sock,$f,\"textDocument\")\r\nreturn $t?text"},{"kind":2,"language":"xquery","value":"let $sock:=foot(ws:ids())\r\nlet $f:=docs:list($sock)\r\nlet $t:=docs:get($sock,$f,\"parse\")\r\nreturn $t"},{"kind":2,"language":"xquery","value":"let $sock:=foot(ws:ids())\r\nlet $f:=docs:list($sock)\r\nlet $t:=docs:get($sock,$f,\"textDocument\")\r\nreturn $t"}]}
|
|
@ -108,6 +108,9 @@
|
|||
<button id="format" type="button" class="btn btn-light" title="Format (Shift-Alt-f)"><i
|
||||
class="bi bi-justify-left"></i></button>
|
||||
|
||||
<button id="cmd" type="button" class="btn btn-light" title="Cmd ">
|
||||
<i class="bi bi-hammer"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-light" popovertarget="popSettings" title="Settings">
|
||||
<i class="bi bi-gear"></i></button>
|
||||
</div>
|
||||
|
|
|
@ -37,7 +37,7 @@ $("search").onclick = e => lsp.openSearchPanel(view);
|
|||
|
||||
$("fullscreen").onclick = e => $("editor").requestFullscreen();
|
||||
|
||||
$("format").onclick = e => console.log("CMDS", lsp.listCommands(view));
|
||||
$("cmd").onclick = e => console.log("CMDS", lsp.listCommands(view));
|
||||
|
||||
$("lint").onclick = async e => {
|
||||
console.log("word", view.state.wordAt(1));
|
||||
|
|
Loading…
Add table
Reference in a new issue