Giter VIP home page Giter VIP logo

Comments (4)

axelson avatar axelson commented on June 9, 2024

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.

alex88 avatar alex88 commented on June 9, 2024

@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:

Screen Shot 2020-04-11 at 7 37 09 PM

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:

Screen Shot 2020-04-11 at 7 37 20 PM

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.

axelson avatar axelson commented on June 9, 2024

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.

alex88 avatar alex88 commented on June 9, 2024

@axelson PR submitted

from vscode-elixir-ls.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.