[fix] severities
This commit is contained in:
parent
99a77cd5bf
commit
2d99af9389
5 changed files with 38 additions and 11 deletions
|
|
@ -9,7 +9,7 @@ var editor = ace.edit("editor", {
|
|||
useWorker: false // Disable web worker for this simple demo
|
||||
});
|
||||
|
||||
//ace.require('ace/ext/settings_menu');
|
||||
ace.require('ace/ext/settings_menu');
|
||||
editor.setTheme("ace/theme/github");
|
||||
//editor.session.setMode("ace/mode/html");
|
||||
editor.commands.addCommands([
|
||||
|
|
|
|||
|
|
@ -61,6 +61,9 @@
|
|||
</optgroup>
|
||||
</select>
|
||||
<label for="symbols">Symbols:</label><select id="symbols" disabled="disabled"></select>
|
||||
<ul id="msg" style="overflow: scroll;">
|
||||
<li>-</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="col flex-grow-1" style="overflow: auto;">
|
||||
|
|
|
|||
|
|
@ -76,7 +76,8 @@ function connect() {
|
|||
};
|
||||
|
||||
function incoming(msg) {
|
||||
const rpc=JSON.parse(msg)
|
||||
const rpc=JSON.parse(msg);
|
||||
log(rpc.method);
|
||||
switch (rpc.method) {
|
||||
case "textDocument/publishDiagnostics":
|
||||
diags(rpc.params);
|
||||
|
|
@ -87,10 +88,17 @@ function incoming(msg) {
|
|||
}
|
||||
|
||||
};
|
||||
function log(msg){
|
||||
const li = document.createElement("li");
|
||||
|
||||
li.appendChild(document.createTextNode(msg));
|
||||
const ol=document.getElementById("msg");
|
||||
ol.insertBefore(li,ol.firstChild)
|
||||
};
|
||||
function diags(params){
|
||||
console.log("--",params)
|
||||
let plugin= lsp.LSPPlugin.get(view);
|
||||
const severities=["error" , "hint" ,"info" ,"warning"]
|
||||
const severities=["error","warning" ,"info","hint" ]
|
||||
//
|
||||
const diagnostics = params.diagnostics
|
||||
.map(({ range, message, severity }) => ({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue