hauleth
Question as in the title. Are You using EditorConfig in your projects?
- Yes
- Yes, but not in Elixir projects
- No
- I didn’t know about EditorConfig
0
voters
Trending in Dev Env & Tools
Yeah, feels the same here. :confused: And I made a much bigger investment, the iMac Pro I got was $8000 at the time I bought it (2019).
...
New
Hey, have you seen this? It looks better than tmux—what do you think?
Herdr is the runtime your coding agents live on — laptop, desktop...
New
Hi all, I am writing Elixir using Zed. Often times I like to “Go to definition” on standard libraries code and check out documentation an...
New
Other Trending Topics
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #ai
- #phoenix_html
- #iex
- #graphql
- #elixirconf-us
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 8- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
axelson
I marked yes, although I don’t use it in all my projects (or even most of them). But I like having it and want to use it in more projects. Even if it is only as documentation about the expected config.
hauleth
It is more about using it anywhere. I understand that most people will not use it everywhere, because sometimes it doesn’t make sense, because internal projects not always need them.
Eiji
For me
mix format(called automatically on each file save) handles all formatting, so there is no need for such extra plugin in my editor.I understand that it’s intended for projects with more than one developer, but if I remember correctly every commit may be rejected if specified check fails which is also possible to pair with
mix formattask.NobbZ
Elixir has the formatter, hooks and CI make sure everything is well formatted.
Same for go, python, rust, or anything else the team or community agreed on a formatter to use.
Though for some languages or configstyle files there is no or linter available, there we do use editor config.
hauleth
For me it is irritating as the editor need to reload edited file after each save, which sometimes screw the undo (I have persistent undo in Vim enabled). Additionally it fires file watchers twice, so sometimes it can cause “wasted cycles” when running tests twice after each change.
Additionally
mix formatwill not work with files that aren’t UTF-8. While most editors use that by default it not always can be a case, for example Windows sometimes use UTF-16 which will crash themix format:Yes, but it will not manage all files in projects. Erlang files or Makefiles will not be formatted via
mix format. And if you configuretabstopoption then GitHub will also show files in diffs and file display with proper indentation depth.What is more, some editors (for sure Vim, but I assume that others as well) can display vertical line on the “line length limit” which is useful to write code “formatted” already, without the need for running
mix formatin the background. None of the editors I know can read.formatter.exsto do so (however I could easily implement that for Vim if needed).The for me in EditorConfig is to make it pass before even being sent to the CI, as most of these “fixes” can be applied automatically by editor (proper indentation characters, indentation width, charsets, etc.). This is also handy for
root = trueoption for a lot of tools, as this marks the “main” directory of the project and such tools can “stop” when traversing the directory tree in lookup for “root directory”.Eiji
Heh … what should I say … I recommend
Sublime Text 3I do not have a tests for each file change as it’s generally bad idea. It may be good for small bugfix, but in normal case (enhancement or new feature) which requires to add and/or modify many files it would cause unnecessary fails.
It’s why I do not use
Windowsat all. They have their own standards. Look that people in France think that French is most important and everyone should know it, but it does not changes anything in typical daily English programming …Well …
Elixirwas created for some purpose … IfErlangwould havesyntax, code, formatter and everything else fromElixirthenElixirwould not be created.But seriously …
Makefileis good example, but it’s not like that it’s used in really big percent of projects.Erlangteam could create formatter if they would like to. The better way is to create formatter for each language rather than implement support for all languages in each editor which is obvious waste of time.As said
Makefileis a different case, but it’s really one file and alone does not gives enough arguments to introduce a generic formatter.This should be able to work with
Elixirformatter. Of course not many editors know.formatter.exs, but there is really no need for that. That’s why many editors have support for plugins.NobbZ
That’s why I use the LS to format, the editor should send the buffer before save and wait for the formatter to return it and then save that as new buffer. Neither Emacs, nor visual code ever hat a problem with undo that way.
Is utf-16 even accepted by the elixir parser? So far I assumed that utf-8 were required for elixir source files.
OvermindDL1
I use
.editorconfigfiles only to keep some basics consistent for text editors that don’t know about the formatters. It’s extremely insufficient with a lot of settings though, so I have a couple changes inrustfmt.tomland similar for Elixir as well (I use freedom formatter for elixir as I like some settings changed).