[add] rex build jar
This commit is contained in:
parent
2078055d05
commit
c8e4f928b1
19 changed files with 8211 additions and 5119 deletions
|
|
@ -31438,7 +31438,13 @@ ${text}</tr>
|
|||
function createEditorView(state, parent) {
|
||||
return new EditorView({ state, parent });
|
||||
}
|
||||
class xqLinter {
|
||||
constructor(parameters) {
|
||||
this.fred=parameters;
|
||||
}
|
||||
}
|
||||
|
||||
exports.LSPClient = LSPClient;
|
||||
exports.LSPPlugin = LSPPlugin;
|
||||
exports.baseExts = baseExts;
|
||||
exports.client = client;
|
||||
|
|
@ -31450,6 +31456,7 @@ ${text}</tr>
|
|||
exports.openSearchPanel = openSearchPanel;
|
||||
exports.setDiagnostics = setDiagnostics;
|
||||
exports.simpleWebSocketTransport = simpleWebSocketTransport;
|
||||
exports.xqLinter = xqLinter;
|
||||
|
||||
return exports;
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -12,7 +12,7 @@ window.addEventListener('load', () => {
|
|||
|
||||
const view = lsp.createEditorView(undefined, document.getElementById("editor"));
|
||||
let doc = `3+1`;
|
||||
let client;
|
||||
var client;
|
||||
|
||||
|
||||
// Save content to localStorage when the page is about to unload
|
||||
|
|
@ -66,7 +66,7 @@ function connect() {
|
|||
lsp.simpleWebSocketTransport(server)
|
||||
.then(transport => {
|
||||
transport.subscribe(incoming);
|
||||
client = lsp.client(transport);
|
||||
client = new lsp.LSPClient().connect(transport);
|
||||
let plugin=lsp.languageServerSupport(client,file,"xquery")
|
||||
const doc = view.state.doc.toString();
|
||||
const state = lsp.createEditorState(doc, [...lsp.baseExts, plugin]);
|
||||
|
|
@ -89,13 +89,14 @@ function incoming(msg) {
|
|||
};
|
||||
function diags(params){
|
||||
console.log("--",params)
|
||||
let plugin= lsp.LSPPlugin.get(view)
|
||||
let plugin= lsp.LSPPlugin.get(view);
|
||||
const severities=["error" , "hint" ,"info" ,"warning"]
|
||||
//
|
||||
const diagnostics = params.diagnostics
|
||||
.map(({ range, message, severity }) => ({
|
||||
from: plugin.fromPosition( range.start,view.state.doc),
|
||||
to: plugin.fromPosition( range.end,view.state.doc),
|
||||
severity: 'error',
|
||||
|
||||
severity: severities[severity -1],
|
||||
message,
|
||||
}))
|
||||
.filter(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue