The LSP server does not handle file names with non ASCII characters
When, in Emacs, I want to look at a file f.lp located in /d1/d2/../dn/, I get no feedback if one of the directory di contains non-ascii characters.
@gabrielhdt do you think that this is related to the Emacs mode?
It comes from the LSP server, if we have a look in the logs,
$ tail lambdapi_lsp_log.txt
"textDocument": { "uri": "file:///tmp/%CE%B7/f.lp" },
"position": { "line": 0, "character": 5 }
}
}
[[BT]]: Raised at file "hashtbl.ml", line 194, characters 13-28
Called from file "src/lsp/lp_lsp.ml", line 124, characters 61-90
Called from file "src/lsp/lp_lsp.ml", line 291, characters 18-33
Called from file "src/lsp/lp_lsp.ml", line 378, characters 6-44
[process_input]: Not_found
Thanks Gabriel. @ejgallego would it be difficult to fix this?
Oh, I removed the file:// to get the file path, but I did not realise it was percent-encoded. I do not have non-ascii characters on my own files... I can try to fix that if you want. Ideally, it would be nice to implement or use a function that converts a URI into an absolute file path.
Yes, please. Thank you @rlepigre !
Yup, you can find many convenient functions in https://github.com/ocaml/ocaml-lsp so need to roll our own.
This problem seems to be solved now. Perhaps thanks to one of @firewall2142 's contributions.
Hi @fblanqui. Can we close this issue as the problem is solved? (I tried with Vscode and it works fine too)
Perfect. Thank you.