Closed nawordar closed 8 months ago
Hi @nawordar, thanks for the PR
Looks like all those injections of root dir ends up on the path
function.
Probably if you define a filesystem state variable for root_dir, the LSP commands can notify of root changes and avoid the propagation of the root dir argument.
I'm not sure if this is worth it, each time that I see the filesystem module my eyes suffer.
There can be a situation where there is more than one ltex-ls client running, each one with different root_dir
. Therefore, I don't think the solution with state variable would work. I could move the catch_ltex
function to a separate module (to avoid recursive imports) and call it from the path
function. What do you think?
Sorry for the long delay, I was very far from this repository. I think this is not worth it, I really need to rewrite this crap. I really appreciate your PR, thank you very much.
I don't know how I could test it so badly, but my previous PR actually never worked. Instead of taking a resolved value of
client.config.root_dir
, I was using the one fromserver_opts
, which was a function, not a string.