These are tools that you need to add. But the most elemental code formatting is not here, it is in the widely supported .editorconfig file. - Source: dev.to / 14 days ago
Hello, Maybe you should check this project: https://editorconfig.org/ Regards,. - Source: Hacker News / 4 months ago
Editorconfigchecker. A linter that checks files for compliance with editorconfig rules. Another linter that helps maintain consistency in the format of all files. - Source: dev.to / 5 months ago
Oh, yeah, we had that issue too and solved it pretty successfully with `.editorconfig` (shareable between VScode and IntelliJ, https://editorconfig.org/) combined with `prettier`. Each IDE is configured to: - Not reformat code on its own - Ignore whitespace - Run `prettier` as a pre-commit hook Those settings are saved to `.editorconfig` where possible, or to each IDE's repo-specific folder (e.g. `.idea`). Then in... - Source: Hacker News / 6 months ago
I am aware of .editorconfig, and one day that may be the correct answer but the specification does not support every element of the styles of both oss and css. Source: 7 months ago
I dunno who downvoted your question, but I believe you can use .editorconfig to set that up for you. Source: 11 months ago
.editorconfig is supported by many editors and can help maintain sanity across projects with different whitespace requirements. Source: 11 months ago
I prefer tabs, but I reckon it's very subjective. IMHO the best option is to specify your choices in a .editorconfig file and have them carried over across editors. Beside the consistency benefits, that also allows you to specify different indentation styles based on file types, if you need to. The added benefit is that if people disagrees with your indentation choice, they can just modify the .editorconfig file... Source: about 1 year ago
Along with .gitignore, one of the first files to show up in my repos is .editorconfig -- https://editorconfig.org. Source: about 1 year ago
I suspect what might be helpful is to look into https://editorconfig.org and the Emacs plugin and set the desired indentation for your various files there. Source: about 1 year ago
EditorConfig is a tool that defines coding styles for multiple editors and IDEs, this will be somewhat of a fallback for users who don't have prettier formatting in their editor and prettier does support .editorconfig by default so there is no reason to not have it. - Source: dev.to / about 1 year ago
.editorconfig is a configuration file that sets regular editor properties, for example, charset or indent_size. More about that file can be found here. - Source: dev.to / about 1 year ago
For more information about the file format and supported properties, please see https://editorconfig.org. Source: about 1 year ago
You can just configure globally how to format: Https://editorconfig.org/. Source: about 1 year ago
Other options: use Tim Pope's vim-sleuth (which automatically detects the indent width of files and sets up 'shiftwidth' and 'expandtab' accordingly) or EditorConfig (which is used to set 'shiftwidth' based on the .editorconfig file). Source: about 1 year ago
I recommend you to use a .editorconfig file for different formatting on different filetypes. There you can specify also the kind of the quotes, the indent-size, etc. And you don't need extra arguments to pass in the settings. Neovim supports Editorconfig by default. See here -> Neovim docs. Source: about 1 year ago
Also neovim suports editorconfig so a good place For project specific settings will be. Source: about 1 year ago
It's an open standard supported by a lot of IDEs. Source: about 1 year ago
As another comment said, editor settings contain personal preferences. If you want to enforce coding styles, consider using editorconfig: https://editorconfig.org/ . This works with many other text editors. Source: about 1 year ago
For those who haven't heard of Editorconfig, it's a standard to configure some aspects of the editor in a INI-like file, like tab width, file encoding, use of spaces/tabs, etc. a lot of editors already support directly or via plugins, which it's really handy for those who work with people using other text editors. Source: over 1 year ago
I also find ktlint to be awful. Softer measures like EditorConfig or committing whatever IDE config to the repo is much more reasonable. Source: over 1 year ago
Do you know an article comparing EditorConfig to other products?
Suggest a link to a post with product alternatives.
This is an informative page about EditorConfig. You can review and discuss the product here. The primary details have not been verified within the last quarter, and they might be outdated. If you think we are missing something, please use the means on this page to comment or suggest changes. All reviews and comments are highly encouranged and appreciated as they help everyone in the community to make an informed choice. Please always be kind and objective when evaluating a product and sharing your opinion.