Comments (4)
In the case where I have multiple projects (e.g. I usually open both the frontend and backend) and the elixir project is not first (backend first then frontend), the formatter doesn't seem to respect the .formatter.exs file.
Can you explain exactly how you're opening the multiple projects? Is the elixir project not at the root of the workspace? Are there multiple elixir projects?
After moving the project in the 2nd+ position it adds the parenthesis:
What exactly do you mean by moving the project?
I apologize if these are basic questions, but I don't use VSCode as my primary editor.
from vscode-elixir-ls.
@axelson sure! No worries my bad for not explaining those properly.
Imagine this folder structure:
Desktop
| frontend
| backend
if I only open the backend folder, everything is working properly, formatter works fine as expected.
If I then do File > Add folder to Workspace
and I select the frontend folder I end up in this situation:
so my editor has two open folders, backend first and then frontend (look at the sidebar). Saving and/or manually formatting the file works fine.
If I switch the backend and frontend positions like this:
you can see that now the formatter added the parenthesis to the code, like it's not picking the formatter configuration from the project.
from vscode-elixir-ls.
Thanks for the detailed instructions! Okay, this seems like a subset of #58, I'll leave it open for now since it's possible this could be fixed before adding general support for multiple project folders. But the workaround is to open a new editor instance for each project. PR's are of course welcome, although they may involve significant work to https://github.com/elixir-lsp/elixir-ls/ to handle multiple project directories simultaneously (but if we're scoping that to just formatting it is probably significantly easier).
from vscode-elixir-ls.
@axelson PR submitted
from vscode-elixir-ls.
Related Issues (20)
- VSCode it keeps telling me: Could not find Hex HOT 1
- @doc on hover quit showing recently HOT 2
- Honor .formatter.exs line_length in editor.ruler HOT 4
- Running wallaby `feature` tests in VS Code HOT 3
- Confusing / harmful directions about debug_info in the README HOT 1
- Header must provide a Content-Length property error in VSCode HOT 24
- All testcases run from VS Code on Windows are always passed HOT 5
- elixirls crashes whenever I open VSCode HOT 2
- Completions broke? HOT 13
- Syntax highlighting broken in "Darcula theme for Elixir" HOT 4
- Hit return on "handle_call" completion insert extra "do" and "end" HOT 2
- elixir command check is invalid HOT 2
- Slow Formatting on First Save of Lengthy HEEx Templates
- elixir extension not supported HOT 4
- Feature request: Send to REPL/Terminal HOT 2
- Suggestion Problem HOT 1
- debugging with "Debug Test" option gets killed after a minute
- Wrong textmate scope for __MODULE__ with function call HOT 2
- How to Pass "--no-start" flag to the "mix test" command? HOT 4
- Memory and High CPU Usage HOT 43
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-elixir-ls.