huibosa
Begin learning elixir recently, and i was setup the elixirls in neovim following this guide. I could get most of the lsp elixirls feature work, such as doc hover, snippet, autocompletion, and so on, but I found I just can’t get the autocompeletion work for local module in another file. I’ll describe my problem as follows:
I’ve got two files in same directory, person.exs and main.exs:


which can be seen from the pictures that the autocompeletion source for module Person failed in main.exs. However, when I move the statements to person.exs`, I could get the expected autocompeletion:

At first I thought this would be a lack of implementation of something in elixirls, but when I switch to vscode, where I’ve installed the elixirls viscose extension, finding that the autocompeletion works as ecpected:

To give you more information:
- Neovim version: v0.9.2
- Elixirs version: v0.16.0
- OS: mac
Trending in Questions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #hex
- #security










Showing Posts 1 to 2- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
TunkShif
Autocompletion for files outside a mix project should only be limited to the current open file. So you can’t get auto completion from “person.exs” in “main.exs”. And I’ve tested it in both Neovim and VSCode.
Can you reupload those broken images if I misunderstood something?
huibosa
Thanks for your generous help. Since the forum system tells me that the new user can’t upload a picture, I’ve get the help from the github issue.
Furtherly, for any beginner like me from other languages who wants to get the autocompletion in a “single-file-script”, I recommend just move the code snippets inside the module, like the
run()function below: