From 9e1837d08dc8d5d1afdb915cf082dbf8748ec39b Mon Sep 17 00:00:00 2001 From: Arjun Patel Date: Tue, 23 Jun 2026 08:59:25 -0700 Subject: [PATCH] update emacs config --- .emacs | 49 +++++++++++++++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/.emacs b/.emacs index 644b9a9..6552c82 100644 --- a/.emacs +++ b/.emacs @@ -3,20 +3,50 @@ (load-theme 'leuven-dark t) (scroll-bar-mode -1) -(set-face-attribute 'default nil :height 180) +(setq display-line-numbers-type 'visual) +(global-display-line-numbers-mode 1) + +(set-face-attribute 'default nil :height 150) (global-set-key (kbd "C-x C-b") 'ibuffer) (global-set-key (kbd "M-o") 'other-window) +(global-auto-revert-mode 1) + (setq treesit-language-source-alist '((typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src") (tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src"))) +(setq treesit-language-source-alist + '((mach "https://github.com/octalide/mach-tree-sitter"))) + +(add-to-list 'auto-mode-alist '("\\.mach\\'" . mach-ts-mode)) + +(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") + (gomod "https://github.com/camdencheek/tree-sitter-go-mod") + (dockerfile "https://github.com/camdencheek/tree-sitter-dockerfile") + (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") + (tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src") + (typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src") + (yaml "https://github.com/ikatyang/tree-sitter-yaml"))) + (setq explicit-shell-file-name "powershell.exe") (setq explicit-powershell.exe-args '("-ExecutionPolicy" "Bypass" "-NoInteractive")) (add-to-list 'auto-mode-alist '("\\.ts\\'" . typescript-ts-mode)) (add-to-list 'auto-mode-alist '("\\.tsx\\'" . tsx-ts-mode)) +(add-to-list 'auto-mode-alist '("\\.go\\'" . go-ts-mode)) (setq find-program "C:/msys64/usr/bin/find.exe" grep-program "C:/msys64/usr/bin/grep.exe") @@ -24,20 +54,3 @@ (setq explicit-shell-file-name "powershell.exe") ;; Remove default arguments that cause startup failures in Emacs buffers (setq explicit-powershell.exe-args '()) - -(unless (package-installed-p 'evil) - (package-install 'evil)) -(require 'evil) -(evil-mode -1) -(custom-set-variables - ;; custom-set-variables was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; Your init file should contain only one such instance. - ;; If there is more than one, they won't work right. - '(package-selected-packages '(evil))) -(custom-set-faces - ;; custom-set-faces was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; Your init file should contain only one such instance. - ;; If there is more than one, they won't work right. - )