Skip to content
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

Extension seems to not start in VSCode remote container (devcontainer) #97

Open
altdsoy opened this issue Jul 22, 2024 · 5 comments
Open

Comments

@altdsoy
Copy link

altdsoy commented Jul 22, 2024

Hello,
I am running my Elixir project within a container using VS Code remote container extension (devcontainer) with the ElixirLS extension.
I wanted to try NextLS... However, I can't get it working.
I checked in the troubleshooting section but was not able to find anything obvious..
The integrated terminal output I have for is not labeled Next LS but elixir-tools.vscode (not sure if this is relevant)..
And I only have the following log:
[info] files: undefined..
Also epmd is running..
I can't find anything in there ~/.cache/elixir-tools/nextls/bin/ which is the default value of the Installation Directory setting..
But it seems the extension is installed here ~/.vscode-server/extensions/elixir-tools.elixir-tools-0.15.1/bin
I tried to change the Installation Directory setting to this but without success..

What do I do wrong?
I'm running in Alpine Linux fwiw..

@mhanberg
Copy link
Contributor

[info] files: undefined..

this log is showing that it couldn't find a mix.exs file in the root of the project.

there might be something related to the remote container extension that i'm not accounting for, will need some investigation

@mhanberg mhanberg transferred this issue from elixir-tools/next-ls Jul 22, 2024
@altdsoy
Copy link
Author

altdsoy commented Jul 22, 2024

Well.. This is true as my Elixir Project is not in the root directory.. So I guess there's no equivalent of ElixirLS.projectDir option then?
Do I need to open VS Code in that sub-directory?

Actually I may have introduced some XY problem and here is my real question (sorry)..

My root folder is a poncho directory with a few apps, each within their own sub-directory...
I simply assumed ElixirLS was not able to handle poncho apps so I naively tried NextLS thinking maybe it'll just works...
But I guess, there is the same limitation here?

@mhanberg
Copy link
Contributor

mhanberg commented Jul 22, 2024

can you try and open each sub directory as a workspace folder?

I think you can quickly test this with code --add path/to/app1 --add path/to/app2 --new-window

@altdsoy
Copy link
Author

altdsoy commented Jul 22, 2024

Okay because the way each VS Code windows is tied to a running container I had to still open my root directory as it contains the related files for the devcontainer settings..
But I added one of the child app folder into the workspace..
It seems this time it triggered the installation of the last NextLS etc.
But I was still getting errors when I wanted to just start with formatting an Elixir file:
Request textDocument/formatting failed.
It seems it was still trying to do stuff in the initial root workspace..

So I removed as well that initial root workspace and with only one workspace dir (that has the mix.exs file at its root) the formatter was working without error...

But I am still unable to get code completion, etc.

Am I missing some other settings?

@mhanberg
Copy link
Contributor

You have to enable completions in the settings.

Could you provide a repro project with the dev container config, etc ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants