mirror of
https://codeberg.org/ultra/nixos-dotfiles.git
synced 2024-11-26 15:43:08 +02:00
139 lines
4.1 KiB
EmacsLisp
139 lines
4.1 KiB
EmacsLisp
(let ((indent 2))
|
|
(setq standard-indent indent)
|
|
(setq-default indent-tabs-mode nil)
|
|
(setq-default tab-width 2)
|
|
(setq c-basic-offset indent))
|
|
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
|
|
(load (expand-file-name "~/.quicklisp/slime-helper.el"))
|
|
(setq inferior-lisp-program "sbcl")
|
|
(defun font-size-to-height (size) (* 10 size))
|
|
(let ((font-size 14))
|
|
(set-face-attribute 'default nil :height (font-size-to-height font-size)))
|
|
(setq mastodon-instance-url "https://shonk.phite.ro"
|
|
mastodon-active-user "graphite")
|
|
(evil-mode 1)
|
|
(add-hook 'lisp-mode 'parinfer-rust-mode)
|
|
(require 'bshell)
|
|
(add-hook 'eshell-load-hook #'eat-eshell-mode)
|
|
(add-hook 'eshell-load-hook #'eat-eshell-visual-command-mode)
|
|
; (load (expand-file-name "~/.emacs.d/everblush-theme.el"))
|
|
(load-theme 'uwu)
|
|
(if (window-system)
|
|
(set-frame-size (selected-frame) 1000 800))
|
|
;; (add-hook 'c++-mode-hook 'irony-mode)
|
|
;; (add-hook 'c-mode-hook 'irony-mode)
|
|
;; (add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options)
|
|
(add-hook 'emacs-lisp-mode-hook 'parinfer-rust-mode)
|
|
|
|
;(push 'hotfuzz completion-styles)
|
|
|
|
(setq vertico-cycle t)
|
|
(setq vertico-resize t)
|
|
(keymap-global-set "C-j" #'vertico-next-group)
|
|
(keymap-global-set "C-k" #'vertico-previous-group)
|
|
; (keymap-global-set "<tab>" #'vertico-insert)
|
|
(add-hook 'text-mode-hook (lambda ()
|
|
(keymap-set text-mode-map "<tab>" #'vertico-insert)))
|
|
(vertico-mode)
|
|
|
|
(savehist-mode)
|
|
|
|
(marginalia-mode 1)
|
|
|
|
|
|
(keymap-global-set "M-s M-g" #'consult-grep)
|
|
(keymap-global-set "M-s M-f" #'consult-find)
|
|
(keymap-global-set "M-s M-o" #'consult-outline)
|
|
(keymap-global-set "M-s M-l" #'consult-line)
|
|
(keymap-global-set "M-s M-b" #'consult-buffer)
|
|
(keymap-global-set "M-s M-m" #'consult-man)
|
|
|
|
|
|
(setq corfu-cycle t)
|
|
(setq corfu-auto t)
|
|
;(corfu-separator ?\s)
|
|
(global-corfu-mode)
|
|
|
|
(keymap-global-set "C-\\" #'eat)
|
|
|
|
(add-hook 'eat-mode-hook (lambda () (evil-mode nil)))
|
|
(evil-set-initial-state 'eat-mode 'emacs)
|
|
(setq evil-move-beyond-eol t)
|
|
|
|
(recentf-mode 1)
|
|
(setq recentf-max-menu-items 25)
|
|
(setq recentf-max-saved-items 25)
|
|
(keymap-global-set "C-x C-r" #'recentf)
|
|
|
|
(use-package lambda-line
|
|
:straight (:type git :host github :repo "lambda-emacs/lambda-line")
|
|
:custom
|
|
(lambda-line-line-position 'bottom)
|
|
(lambda-line-abbrev t)
|
|
(lambda-line-hspace " ")
|
|
(lambda-line-prefix t)
|
|
(lambda-line-prefix-padding nil)
|
|
(lambda-line-status-invert nil)
|
|
(lambda-line-gui-ro-symbol " ⨂") ;; symbols
|
|
(lambda-line-gui-mod-symbol " ⬤")
|
|
(lambda-line-gui-rw-symbol " ◯")
|
|
:config
|
|
(lambda-line-mode)
|
|
(when (eq lambda-line-position 'top)
|
|
(setq-default mode-line-format (list "%_"))
|
|
(setq mode-line-format (list "%_"))))
|
|
|
|
;; tab bar
|
|
(setq-default tab-bar-show 1)
|
|
(tab-bar-mode)
|
|
|
|
;; doom-modeline
|
|
(doom-modeline-mode 1)
|
|
(setq doom-modeline-height 15)
|
|
|
|
;; treesitter
|
|
(add-hook 'c-mode-hook (c-ts-mode))
|
|
(add-hook 'c++-mode-hook (c++-ts-mode))
|
|
|
|
;; eglot
|
|
(with-eval-after-load 'eglot
|
|
(add-to-list 'eglot-server-programs
|
|
'(c-mode "/home/ultra/.nix-profile/bin/clangd")
|
|
'(c++-mode "/home/ultra/.nix-profile/bin/clangd")))
|
|
(add-hook 'c-mode-hook 'eglot-ensure)
|
|
(add-hook 'c-ts-mode-hook 'eglot-ensure)
|
|
(add-hook 'c++-ts-mode-hook 'eglot-ensure)
|
|
|
|
;; which-key
|
|
(which-key-setup-minibuffer)
|
|
(setq which-key-idle-delay 2000)
|
|
(setq which-key-idle-secondary-delay 0.05)
|
|
(which-key-mode)
|
|
|
|
(with-eval-after-load 'org
|
|
(require 'edraw-org)
|
|
(edraw-org-setup-default))
|
|
|
|
(add-hook 'prog-mode-hook 'rainbow-delimiters-mode)
|
|
|
|
(add-hook 'prog-mode-hook 'rainbow-mode)
|
|
|
|
(add-hook 'eshell-mode-hook #'esh-autosuggest-mode)
|
|
;(define-key eshell-mode-map [remap eshell-pcomplete] 'helm-esh-pcomplete)
|
|
|
|
|
|
(dashboard-setup-startup-hook)
|
|
(add-hook 'server-after-make-frame-hook #'dashboard-open)
|
|
|
|
(add-hook 'prog-mode-hook #'sublimity-mode)
|
|
|
|
(add-hook 'prog-mode-hook #'linum-relative-on)
|
|
|
|
(add-hook 'prog-mode-hook #'display-line-numbers-mode)
|
|
|
|
(setq completion-styles '(orderless basic)
|
|
completion-category-defaults nil
|
|
completion-category-overrides '((file (styles basic partial-completion))))
|
|
|
|
(setq pulsar-pulse t
|
|
pulsar-delay 0.055)
|