emacs.d/init.el
2026-05-19 12:05:45 +02:00

78 lines
2.1 KiB
EmacsLisp

(setq custom-file "./custom")
(setq display-line-numbers-type 'relative)
(global-display-line-numbers-mode 1)
;;(tool-bar-mode 0)
(menu-bar-mode 0)
(column-number-mode 1)
(setq select-enable-clipboard t)
(setq make-backup-files nil
auto-save-default nil)
;; keys
(global-set-key (kbd "C-x c") 'comment-line)
;; packages
(require 'package)
(setq package-archives
'(("melpa" . "https://melpa.org/packages/")
("gnu" . "https://elpa.gnu.org/packages/")))
(package-initialize)
(unless package-archive-contents (package-refresh-contents))
;; install use-package if missing
(unless (package-installed-p 'use-package)
(package-install 'use-package))
;; make use-package auto-install by default
(setq use-package-always-ensure t)
(require 'use-package)
(use-package fzf
:bind
;; Don't forget to set keybinds!
:config
(setq fzf/args "-x --color bw --print-query --margin=1,0 --no-hscroll"
fzf/executable "fzf"
fzf/git-grep-args "-i --line-number %s"
;; command used for `fzf-grep-*` functions
;; example usage for ripgrep:
fzf/grep-command "rg --no-heading -nH"
;; fzf/grep-command "grep -nrH"
;; If nil, the fzf buffer will appear at the top of the window
fzf/position-bottom t
fzf/window-height 15))
(global-set-key (kbd "C-x p f") 'fzf-git-files)
(use-package tree-sitter-langs
:config
(global-undo-tree-mode))
(use-package undo-tree
:config
(global-undo-tree-mode))
;; window-management
(use-package zoom-window
:ensure t
:config
(setq zoom-window-mode-line-color "DarkGreen")
:bind ("C-x w z" . zoom-window-zoom))
;; keys
(global-set-key (kbd "C-x w l") 'windmove-right)
(global-set-key (kbd "C-x w h") 'windmove-left)
(global-set-key (kbd "C-x w j") 'windmove-down)
(global-set-key (kbd "C-x w k") 'windmove-up)
(use-package doom-themes
:config
;; Global settings (defaults)
(setq doom-themes-enable-bold t
doom-themes-enable-italic t)
(load-theme 'doom-laserwave t)
;; Enable flashing mode-line on errors
(doom-themes-visual-bell-config)
;; Corrects (and improves) org-mode's native fontification.
(doom-themes-org-config))