Open mhanberg opened 6 months ago
@srcrip does this sound like the problem you were describing and if yes, a desirable solution?
Yes this is perfect, this is the general gist of what I was looking for.
Might I suggest exposing a configuration option to search only under the main module of the current application too? Or instance if you're currently in Foo.Bar search only Foo and its children? I think that could potentially speed up a lot in big projects. But you'd definitely want to be able to configure that.
can definitely scope it to just your application code, rather than all modules. probably better, as we can query for them in the database.
Description
Basically how I envision this working is if the compiler returns a "Undefined function baz/3" warning, the LSP can provide code actions for "import module
Foo.Bar
" orreplace with remote call
Foo.Bar.baz`.This could be possible when the client request code actions, to search all loaded modules and all their functions and suggest any that have the name and arity that are found in the diagnostic.
This could potentially be slow on larger projects, but can be potentially cached