Treesitter grammar

This commit is contained in:
Aleksandr Lebedev 2025-02-08 21:53:50 +01:00
parent 3ffc4695bf
commit 1b389ab25a
2 changed files with 24 additions and 14 deletions

View file

@ -61,6 +61,8 @@
- [[#sudo-edit][SUDO EDIT]]
- [[#language-support][Language support]]
- [[#nix][Nix]]
- [[#cmake][CMake]]
- [[#global-treesitter][Global treesitter]]
- [[#nerd-icons][Nerd Icons]]
- [[#nerd-icons-completion][Nerd Icons Completion]]
- [[#buffer-move][Buffer Move]]
@ -1051,18 +1053,22 @@ Vterm is a terminal emulator within Emacs. The 'shell-file-name' setting sets t
Emacs has built-in programming language modes for Lisp, Scheme, DSSSL, Ada, ASM, AWK, C, C++, Fortran, Icon, IDL (CORBA), IDLWAVE, Java, Javascript, M4, Makefiles, Metafont, Modula2, Object Pascal, Objective-C, Octave, Pascal, Perl, Pike, PostScript, Prolog, Python, Ruby, Simula, SQL, Tcl, Verilog, and VHDL. Other languages will require you to install additional modes.
** Nix
#+begin_src emacs-lisp
(use-package nix-mode
:ensure t
:mode ("\\.nix\\'" "\\.nix.in\\'"))
(use-package nix-drv-mode
:ensure nix-mode
:mode "\\.drv\\'")
(use-package nix-shell
:ensure nix-mode
:commands (nix-shell-unpack nix-shell-configure nix-shell-build))
(use-package nix-repl
:ensure nix-mode
:commands (nix-repl))
(use-package nix-ts-mode
:ensure t
:mode "\\.nix\\'")
#+end_src
** CMake
#+begin_src emacs-lisp
(add-to-list 'auto-mode-alist '("CMakeLists\\.txt\\'" . cmake-ts-mode))
(add-to-list 'auto-mode-alist '("\\.cmake\\'" . cmake-ts-mode))
#+end_src
** Global treesitter
#+begin_src emacs-lisp
(use-package treesit-auto
:ensure t
:demand t
:config
(global-treesit-auto-mode))
#+end_src
* Nerd Icons
#+begin_src emacs-lisp

View file

@ -53,7 +53,7 @@
# This can also include extra executables to be run by Emacs (linters,
# language servers, formatters, etc)
extraEmacsPackages = epkgs:
with pkgs; [
(with pkgs; [
#nerd-fonts.jetbrains-mono
#jetbrains-mono
unzip
@ -61,7 +61,11 @@
imagemagick
fontconfig
freetype
];
] ++ (with epkgs;[
tree-sitter
tree-sitter-langs
treesit-grammars.with-all-grammars
]));
# Optionally override derivations.
override = final: prev: {