From d6b799b602f8fee22a7b14d30f6afa70d4de468a Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Fri, 22 Mar 2024 20:03:04 -0400 Subject: [PATCH] home-manager: added treemacs and emacs IDE optimizations --- home/shell.nix | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/home/shell.nix b/home/shell.nix index 89024e30..21f81ec8 100644 --- a/home/shell.nix +++ b/home/shell.nix @@ -17,15 +17,48 @@ org-bullets org-journal org-roam - nix-mode + nix-mode + treemacs ]) ); package = pkgs.emacs-nox; extraConfig = '' + ; 4 spaces > tabs. (setq-default indent-tabs-mode nil) (setq-default tab-width 4) (setq indent-line-function 'insert-tab) + + ; xterm mouse mode (xterm-mouse-mode 1) + + ; Enable line numbers + (global-display-line-numbers-mode 1) + (global-hl-line-mode t) + + ; Enable mouse scrolling + (global-set-key (kbd "") 'previous-line) + (global-set-key (kbd "") 'next-line) + + ; Enable tabs + (tab-bar-mode 1) + (setq tab-bar-show 1) + (setq tab-bar-new-tab-choice "*dashboard*") + + ; Enable treemacs + (add-hook 'emacs-startup-hook 'treemacs) + (setq treemacs-width 25) + (treemacs-resize-icons 16) ; Adjust the icon size according to your preference + (setq treemacs-follow-mode t) ; Enable follow mode + (setq treemacs-filewatch-mode t) ; Enable file watch mode + (setq treemacs-fringe-indicator-mode t) ; Enable fringe indicator mode + (setq treemacs-git-mode 'simple) ; Set git mode to simple + (setq treemacs-git-integration t) ; Enable git integration + (setq treemacs-show-hidden-files t) ; Show hidden files + (setq treemacs-icons-dired-mode t) ; Use icons in dired buffers + + ; Enable column 80 line for coding + (setq-default fill-column 80) + (add-hook 'prog-mode-hook #'display-fill-column-indicator-mode) ''; }; @@ -75,4 +108,4 @@ run-shell ${pkgs.tmuxPlugins.battery}/share/tmux-plugins/battery/battery.tmux ''; }; -} \ No newline at end of file +}