Emacs: Difference between revisions
Phanirithvij (talk | contribs) m poll patch removed https://github.com/d12frosted/homebrew-emacs-plus/pull/746 |
Phanirithvij (talk | contribs) m mention emacs pretty-sha-path plugin under tips and tricks |
||
| Line 108: | Line 108: | ||
When using Emacs with tree-sitter support, it's recommended to install both <code>epkgs.tree-sitter-langs</code> and <code>epkgs.treesit-grammars</code>. While <code>treesit-grammars</code> handles the registration of grammars with Emacs's native tree-sitter interface, the actual grammar files will come from <code>tree-sitter-langs</code>. <code>tree-sitter-langs</code> being a MELPA package means it receives regular updates when new grammar versions are released, whereas the grammars in the tree-sitter-grammars package may lag behind in nixpkgs. The combination ensures you get both up-to-date grammars and proper integration with Emacs's built-in tree-sitter support. | When using Emacs with tree-sitter support, it's recommended to install both <code>epkgs.tree-sitter-langs</code> and <code>epkgs.treesit-grammars</code>. While <code>treesit-grammars</code> handles the registration of grammars with Emacs's native tree-sitter interface, the actual grammar files will come from <code>tree-sitter-langs</code>. <code>tree-sitter-langs</code> being a MELPA package means it receives regular updates when new grammar versions are released, whereas the grammars in the tree-sitter-grammars package may lag behind in nixpkgs. The combination ensures you get both up-to-date grammars and proper integration with Emacs's built-in tree-sitter support. | ||
<b>Bonus Tip:</b> | |||
<code>emacs.pkgs.pretty-sha-path</code> is quality of life improvement for nix, guix users. | |||
Allows toggling Guix / Nix store paths by replacing SHA-sequences with ellipsis, i.e.: | |||
<syntaxhighlight lang="bash"> | |||
/gnu/store/72f54nfp6g1hz873w8z3gfcah0h4nl9p-foo-0.1 → /gnu/store/…-foo-0.1 | |||
/nix/store/nh4n4yzb1bx7nss2rg342dz44g14m06x-bar-0.2 → /nix/store/…-bar-0.2 | |||
</syntaxhighlight> | |||
located at https://github.com/alezost/pretty-sha-path.el | |||
==== Automatic Package Management ==== | ==== Automatic Package Management ==== | ||