Skip to content

Texlab crashes sometimes when using it with nvim #1499

@tmke8

Description

@tmke8

I see this in the lsp.log file:

[ERROR][2025-11-10 23:12:57] ...p/_transport.lua:36     "rpc"   "texlab"        "stderr"        "\nthread 'main' panicked at crates
/texlab/src/server.rs:396:77:\ncalled `Option::unwrap()` on a `None` value\nnote: run with `RUST_BACKTRACE=1` environment variable
to display a backtrace\n"

It seems to come from this line:

let range = document.line_index.offset_lsp_range(range).unwrap();

I don't really know what exactly triggers it. From my perspective it seems to happen randomly. If I can do something to debug this further, let me know.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions