-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing support for opening single files outside mix project #307
Comments
Yeah, I agree. I think we'd just want to add a note to the README for now. It would probably be a considerable undertaking and impact many portions of the project. |
There's an (arguably minor but legitimate) case for a mode where some elixir-ls functions work outside a project, without the "No Mixfile found" warning. |
|
@lukaszsamson what do you think about marking this as fixed and extracting "investigate compiling & loading .exs file for better completions and diagnostic messages" and "investigate building and loading deps via Mix.install" to separate issues? I think those are different than supporting single files. Although I suppose in that case we should remove the "No Mixfile found" warning as @javobalazs mentions. |
@axelson I extracted the issues and updated this one.
The warning is already removed |
I may be misunderstanding the result of this issue. I created some
When I open an
Why do I need a mixfile for code that is in a single file and not using any mix functionality? Is this not the issue discussed here? Should I open a new issue? |
You are not opening a single file. You are opening a directory that is not a mix project hence you get the warning. Nothing is wrong here. |
I am not sure I understand. In detail I do:
How am I not opening a single file? Good to know that it is just a warning though. However, I do apparently see some linting from the language server, when I introduce syntax errors. Emacs does underline things and put red exclamation marks in the gutter. So the language server must be doing something and Emacs communicating with it. I still need to figure out completions though. I guess all is as it should be then? |
Yes. You open a directory with exs files that is not a mix project. Some mix projects have unusual directory layout and require special configuration. This warning is an attempts to discover such cases. Since you don't have a mix project you can disregard it. Technically, what a language server considers one file is what it gets passed in |
OK thank you for confirming! Sorry for the confusion. |
https://elixirforum.com/t/vscode-autocomplete-doesnt-work-for-mix-created-projects/32624/13?u=lukaszsamson
I'm not shure we should support it. If not then it needs to be addressed in the readme
Edit:
Due to numerous request and upcoming better support for .exs scripts in elixir 1.12 I think we should support it.
Here's the short list of issues that need to be taken care of:
investigate compiling & loading .exs file for better completions and diagnostic messages(tracked in Compiler diagnostics for .exs files #89)investigate building and loading deps via(tracked in Investigate building and loading deps via Mix.install #654)Mix.install
The text was updated successfully, but these errors were encountered: