From 0049390e894edec86b2edc6c2e8704c3868d74a9 Mon Sep 17 00:00:00 2001 From: Tobias Ostner Date: Sat, 6 Apr 2024 10:36:35 +0200 Subject: [PATCH] Install treesit-auto --- .config/nix/modules/host-users-personal.nix | 18 +++++++++++++++++ .config/nix/modules/host-users-work.nix | 18 +++++++++++++++++ .emacs.d/init.el | 22 +++++++-------------- 3 files changed, 43 insertions(+), 15 deletions(-) create mode 100644 .config/nix/modules/host-users-personal.nix create mode 100644 .config/nix/modules/host-users-work.nix diff --git a/.config/nix/modules/host-users-personal.nix b/.config/nix/modules/host-users-personal.nix new file mode 100644 index 0000000..e277761 --- /dev/null +++ b/.config/nix/modules/host-users-personal.nix @@ -0,0 +1,18 @@ +{ pkgs, ... }: +let + hostname = "TobAir"; + username = "tobi"; +in +{ + networking.hostName = hostname; + networking.computerName = hostname; + system.defaults.smb.NetBIOSName = hostname; + + users.users."${username}" = { + home = "/Users/${username}"; + description = "Tobias Ostner"; + shell = pkgs.zshInteractive; + }; + + nix.settings.trusted-users = [ username ]; +} diff --git a/.config/nix/modules/host-users-work.nix b/.config/nix/modules/host-users-work.nix new file mode 100644 index 0000000..4e8a05e --- /dev/null +++ b/.config/nix/modules/host-users-work.nix @@ -0,0 +1,18 @@ +{ pkgs, ... }: +let + hostname = "TobWorkJambit"; + username = "tobi"; +in +{ + networking.hostName = hostname; + networking.computerName = hostname; + system.defaults.smb.NetBIOSName = hostname; + + users.users."${username}" = { + home = "/Users/${username}"; + description = "Tobias Ostner"; + shell = pkgs.zshInteractive; + }; + + nix.settings.trusted-users = [ username ]; +} diff --git a/.emacs.d/init.el b/.emacs.d/init.el index e9764d0..84abce3 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -263,21 +263,6 @@ (set-selection-coding-system 'utf-8) (prefer-coding-system 'utf-8) - (setq treesit-language-source-alist - '((bash "https://github.com/tree-sitter/tree-sitter-bash") - (cmake "https://github.com/uyha/tree-sitter-cmake") - (css "https://github.com/tree-sitter/tree-sitter-css") - (elisp "https://github.com/Wilfred/tree-sitter-elisp") - (go "https://github.com/tree-sitter/tree-sitter-go") - (html "https://github.com/tree-sitter/tree-sitter-html") - (javascript "https://github.com/tree-sitter/tree-sitter-javascript" "master" "src") - (json "https://github.com/tree-sitter/tree-sitter-json") - (make "https://github.com/alemuller/tree-sitter-make") - (markdown "https://github.com/ikatyang/tree-sitter-markdown") - (python "https://github.com/tree-sitter/tree-sitter-python") - (toml "https://github.com/tree-sitter/tree-sitter-toml") - (yaml "https://github.com/ikatyang/tree-sitter-yaml"))) - (require 'epg) (setq epg-pinentry-mode 'loopback) @@ -651,6 +636,13 @@ (use-package terraform-mode) +(use-package treesit-auto + :custom + (treesit-auto-install 'prompt) + :config + (treesit-auto-add-to-auto-mode-alist 'all) + (global-treesit-auto-mode)) + (use-package yaml-mode) (use-package vertico