Closed arthsmn closed 1 month ago
SMIE is the most recent – and probably best – mechanism for encoding indentation in regular Emacs major modes. However, we wouldn't use SMIE here because treesitter allows even better indentation support, and that's kinda the point of nix-ts-mode
. If there are specific indentation issues you've observed with nix-ts-mode
, feel free to open an issue (or re-title/edit this one). See also #27. Now that nixpkgs
is heading towards standardising on nixfmt
, I strongly feel we should aim to match its behaviour here.
@purcell thanks for the explanation! This issue isn't related to my problem, so I'll open a PR to address this.
I found some problems with indentation that I couldn't find in nix-mode, and it seems that they use SMIE as the indentation engine, while having a fallback for the old behaviour. Also, there's a PR to unify the methods and just fallback to the old one if SMIE isn't suitable.
Relevant PRs: https://github.com/NixOS/nix-mode/pull/79 https://github.com/NixOS/nix-mode/pull/80 https://github.com/NixOS/nix-mode/pull/86 https://github.com/NixOS/nix-mode/pull/198
Related link: https://www.gnu.org/software/emacs/manual/html_node/elisp/SMIE.html