Skip to content

Add support for Nix, Typst, and Vhdl#389

Open
WiredMic wants to merge 5 commits intoeditorconfig:masterfrom
WiredMic:master
Open

Add support for Nix, Typst, and Vhdl#389
WiredMic wants to merge 5 commits intoeditorconfig:masterfrom
WiredMic:master

Conversation

@WiredMic
Copy link

I have tested all of them.

@monnier
Copy link
Collaborator

monnier commented Feb 15, 2026

Any chance you can get those modes to add support for EditorConfig instead?

(meson-mode meson-indent-basic)
(mips-mode mips-tab-width)
(mustache-mode mustache-basic-offset)
(nix-ts-mode nix-ts-mode-indent-offset)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If nix-ts-mode followed the convention of using FOO-indent-offset (instead of FOO-mode-indent-offset), your patch would not be needed. So I suggest a bug report to the nix-ts-mode maintainers.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have send a bug report upstream.
nix-community/nix-ts-mode#69

Copy link

@purcell purcell Feb 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Stefan, I'm a committer on nix-ts-mode, and I could conceivably help get this changed via aliasing and deprecation, but I've seen the same pattern in other popular modes out there, e.g. toml-ts-mode. It seems strange to require the -mode- not to be there, as that is a reasonable part of a variable name. I personally think it would be better to adjust the heuristic here.

"Set VHDL indentation to SIZE and handle its custom indent-tabs-mode."
`((vhdl-basic-offset . ,size)
(vhdl-indent-tabs-mode . ,indent-tabs-mode)))

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you have (vhdl-indent-tabs-mode . ,indent-tabs-mode) here?
As for vhdl-basic-offset it should be auto-discovered by editorconfig--default-indent-size-function.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vhdl-indent-tabs-mode overrides indent-tabs-mode , so if it is not also set then it can override a configuration with space.

vhdl-indent-tabs-mode is a variable defined in ‘vhdl-mode.el’.

Its value is nil

Non-nil means indentation can insert tabs.
Overrides local variable ‘indent-tabs-mode’.

From line 4471.

      If option `vhdl-indent-tabs-mode' is nil, spaces are used instead of
    tabs.  \\[tabify] and \\[untabify] allow the conversion of spaces to
    tabs and vice versa.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants