You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using PureScript for work, and we use 2 spaces for indentation in every PureScript module. However, in some modules - especially the test modules - helix wrongfully decides that 4 spaces would be a better fit given the current formatting.
Here is a minimal code example that illustrates the result:
Note how the first describe is "in between" two indentation levels in the 4 space indentation.
This would not be as much of an issue if I could save the file without redetecting the indentation style (maybe this has something to do with auto-format?). More annoyingly is that 2-space indentation is declared as the default for PureScript in languages.toml. It would be very nice if it was possible to disable the auto-detection of indentation style on a language basis.
The text was updated successfully, but these errors were encountered:
I have tried inverting the priority between auto_detect_indent_style and the languages.toml-file (so that languages.toml has the top priority), on my fork of helix here: https://github.com/NomisIV/helix. This solves my issue, but likely creates others. Any suggestions on a better fix? I'd be happy to help implement this
The indentation heuristic should probably have minimum limits on it so we don't guess wrong for small files where there isn't enough information to figure out the actual indent scheme
I'm using PureScript for work, and we use 2 spaces for indentation in every PureScript module. However, in some modules - especially the test modules - helix wrongfully decides that 4 spaces would be a better fit given the current formatting.
Here is a minimal code example that illustrates the result:
Note how the first
describe
is "in between" two indentation levels in the 4 space indentation.This would not be as much of an issue if I could save the file without redetecting the indentation style (maybe this has something to do with auto-format?). More annoyingly is that 2-space indentation is declared as the default for PureScript in languages.toml. It would be very nice if it was possible to disable the auto-detection of indentation style on a language basis.
The text was updated successfully, but these errors were encountered: