Closed eilvelia closed 1 year ago
this is caused by the OCMAL LSP sending invalid symbols with ranges far past the end of the file.
For example:
{"deprecated":false,"kind":12,"location":{"range":{"end":{"character":59,"line":1900},"start":{"character":0,"line":1887}},"uri":"file:///home/pascalkuthe/git/ocaml-edn/src/edn_read.mll"},"name":"__ocaml_lex_read_comment_rec"}
was send by the server but edn_read.mll
only has about 90 lines.
I will add some extra redundancy here so we at least won't crash but the best you will get here is <file not found>
. This is ultimately a bug in the LS and should be reported to them.
Thanks, it looks like the lsp server reports symbols that are present in generated files and not in the actual source files. There are already some existing issues and PRs like https://github.com/ocaml/ocaml-lsp/pull/1097, I'll look into that. Nevertheless, fixing the panic would indeed be helpful so that even in the presence of invalid symbols I can fuzzy-search over the valid ones without randomly crashing if invalid one gets in the way. file not found
is ok, since the symbols aren't really there anyway.
the panic is fixed in https://github.com/helix-editor/helix/pull/8265
Edit https://github.com/prepor/ocaml-edn/blob/12e54ae9deefbbd69299b74f966724a231a50df4/src/edn.ml (happens on other projects too), press
space S
to open the picker, holddown
, helix crashes closer to the end of the list.~/.cache/helix/helix.log
The log is too long for GitHub: https://pastebin.com/mPGhahyWPlatform
macOS, nix
Terminal Emulator
kitty 0.29.2
Helix Version
both helix master ccabfee3811bdcc8372beaae777a98fd36e2657e and helix 23.05 (7f5940be)