Skip to content

PublishDiagnostics not sent when inserting whitespace or comments with Helix #10628

Closed
@kirawi

Description

@kirawi

helix-editor/helix#701
Log:

2021-10-24T18:11:44.609 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":11,"line":2},"start":{"character":11,"line":2}},"text":" "}],"textDocument":{"uri":"file:///C:/Users/there/Desktop/derp/src/main.rs","version":38}}}
2021-10-24T18:11:44.610 helix_lsp::transport [ERROR] err <- "[INFO rust_analyzer::main_loop] handle_event(Notification { method: \"textDocument/didChange\" })\n"
2021-10-24T18:11:44.697 helix_lsp::transport [ERROR] err <- "[INFO rust_analyzer::main_loop] handle_event(Diagnostics([(FileId(0), [])]))\n"
(No PublishDiagnostics?)
2021-10-24T18:11:48.620 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":12,"line":2},"start":{"character":12,"line":2}},"text":"a"}],"textDocument":{"uri":"file:///C:/Users/there/Desktop/derp/src/main.rs","version":39}}}
2021-10-24T18:11:48.620 helix_lsp::transport [ERROR] err <- "[INFO rust_analyzer::main_loop] handle_event(Notification { method: \"textDocument/didChange\" })\n"
2021-10-24T18:11:48.684 helix_lsp::transport [ERROR] err <- "[INFO rust_analyzer::main_loop] handle_event(Diagnostics([(FileId(0), [Diagnostic { range: Range { start: Position { line: 2, character: 13 }, end: Position { line: 2, character: 13 } }, severity: Some(Error), code: Some(String(\"syntax-error\")), code_description: Some(CodeDescription { href: Url { scheme: \"https\", cannot_be_a_base: false, username: \"\", password: None, host: Some(Domain(\"rust-analyzer.github.io\")), port: None, path: \"/manual.html\", query: None, fragment: Some(\"syntax-error\") } }), source: Some(\"rust-analyzer\"), message: \"Syntax Error: expected SEMICOLON\", related_information: None, tags: None, data: None }])]))\n"
2021-10-24T18:11:48.685 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///c:/Users/there/Desktop/derp/src/main.rs","diagnostics":[{"range":{"start":{"line":2,"character":13},"end":{"line":2,"character":13}},"severity":1,"code":"syntax-error","codeDescription":{"href":"https://rust-analyzer.github.io/manual.html#syntax-error"},"source":"rust-analyzer","message":"Syntax Error: expected SEMICOLON"},{"range":{"start":{"line":3,"character":4},"end":{"line":3,"character":9}},"severity":1,"code":"E0425","codeDescription":{"href":"https://doc.rust-lang.org/error-index.html#E0425"},"source":"rustc","message":"cannot find function `error` in this scope\nnot found in this scope"},{"range":{"start":{"line":0,"character":4},"end":{"line":0,"character":25}},"severity":2,"code":"unused_imports","source":"rustc","message":"unused import: `std::process::Command`\n`#[warn(unused_imports)]` on by default","relatedInformation":[{"location":{"uri":"file:///c:/Users/there/Desktop/derp/src/main.rs","range":{"start":{"line":0,"character":0},"end":{"line":0,"character":26}}},"message":"remove the whole `use` item"}],"tags":[1]},{"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":26}},"severity":4,"code":"unused_imports","source":"rustc","message":"remove the whole `use` item","relatedInformation":[{"location":{"uri":"file:///c:/Users/there/Desktop/derp/src/main.rs","range":{"start":{"line":0,"character":4},"end":{"line":0,"character":25}}},"message":"original diagnostic"}]}],"version":39}}

The file is the same as the one in the video in the linked issue. I'm assuming it's something we're doing wrong, but I don't know what.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions