Open Nitrodist opened 4 years ago
It shouldn't be very difficult to implement. elixir_sense library does most of the work and it should rather work fine (I'd expect some occasional crashes as it analyses modules on the fly). A PR would definitely be welcome
It's not a full solution but https://github.com/elixir-lsp/elixir_sense/commit/6b378da5b7b1d43a0af1c8761b1a035e3929efdd is a step in the direction of building cache of completion symbols
Hello, I am a vim+coc.nvim user and I use this project (elixir-ls) to provide code-completion etc.
I want to discuss the idea of using the stale analysis data during the various compilation steps so that code completion continues to work instead of returning nothing.
In my large project, it takes 12 seconds for code-completion to work again. I'm editing a test written in a
.exs
file in this example - maybe I'm doing something wrong (I am new!), but during those 12 seconds I know that I haven't made a functional change to anything, so I'd be fine with old lookups were to still be returned after I happen to use:w
to save my work in progress. Even if it's 5 seconds, I'd rather have those 5 seconds of my life back, you know!Let's say that I write to the file and it has compilation errors. This may be common because I'll return to my work after I've saved my work to disk before having lunch. I've now returned to fix my code and I don't have access to the basic information and advantages provided by code-completion with elixir-ls.
Stale data lookups fix these issues and it would improve the utility of elixir-ls considerably.
Environment
Logs