Compare commits
6 Commits
93ac045c78
...
2026
| Author | SHA1 | Date | |
|---|---|---|---|
| eacc765fc9 | |||
| c4ce8f1417 | |||
| d35693b7d3 | |||
| 02ed88ae45 | |||
| 6c1831ab96 | |||
| d3533c5965 |
5
.gitignore
vendored
5
.gitignore
vendored
@@ -1,2 +1,3 @@
|
|||||||
eln-cache
|
*
|
||||||
elpa
|
!*.el
|
||||||
|
!user-lisp
|
||||||
|
|||||||
@@ -6,8 +6,9 @@
|
|||||||
;; If there is more than one, they won't work right.
|
;; If there is more than one, they won't work right.
|
||||||
'(eglot-code-action-indications '(eldoc-hint))
|
'(eglot-code-action-indications '(eldoc-hint))
|
||||||
'(package-selected-packages
|
'(package-selected-packages
|
||||||
'(cape dumb-jump exec-path-from-shell jai-mode magit move-text
|
'(cape dumb-jump dumber-jump exec-path-from-shell jai-mode magit
|
||||||
multiple-cursors yaml yaml-mode))
|
markdown-mode move-text multiple-cursors vterm yaml
|
||||||
|
yaml-mode))
|
||||||
'(package-vc-selected-packages
|
'(package-vc-selected-packages
|
||||||
'((jai-mode :url "https://github.com/valignatev/jai-mode.git"))))
|
'((jai-mode :url "https://github.com/valignatev/jai-mode.git"))))
|
||||||
(custom-set-faces
|
(custom-set-faces
|
||||||
|
|||||||
35
init.el
35
init.el
@@ -9,10 +9,6 @@
|
|||||||
|
|
||||||
(load-theme 'modus-vivendi)
|
(load-theme 'modus-vivendi)
|
||||||
|
|
||||||
(defun hgh/edit-init-file ()
|
|
||||||
(interactive)
|
|
||||||
(find-file user-init-file))
|
|
||||||
|
|
||||||
(when (string= system-type "darwin")
|
(when (string= system-type "darwin")
|
||||||
(setq dired-use-ls-dired nil)
|
(setq dired-use-ls-dired nil)
|
||||||
(setq mac-command-modifier 'control))
|
(setq mac-command-modifier 'control))
|
||||||
@@ -24,11 +20,20 @@
|
|||||||
(keymap-global-set "M-1" #'delete-other-windows)
|
(keymap-global-set "M-1" #'delete-other-windows)
|
||||||
(keymap-global-set "M-2" #'split-window-below)
|
(keymap-global-set "M-2" #'split-window-below)
|
||||||
(keymap-global-set "M-3" #'split-window-right)
|
(keymap-global-set "M-3" #'split-window-right)
|
||||||
|
|
||||||
(keymap-global-set "C-c e i" #'hgh/edit-init-file)
|
(keymap-global-set "C-c e i" #'hgh/edit-init-file)
|
||||||
|
(keymap-global-set "C-," #'hgh/duplicate-dwim)
|
||||||
|
|
||||||
|
(keymap-global-set "C-h h" #'eldoc)
|
||||||
|
|
||||||
(setq
|
(setq
|
||||||
custom-file "~/.emacs.d/custom.el"
|
custom-file "~/.emacs.d/custom.el"
|
||||||
make-backup-files nil)
|
make-backup-files nil
|
||||||
|
dired-dwim-target t)
|
||||||
|
|
||||||
|
(load-file "~/.emacs.d/utils.el")
|
||||||
|
|
||||||
|
(setq-default cursor-type 'bar)
|
||||||
|
|
||||||
(setopt
|
(setopt
|
||||||
use-short-answers t
|
use-short-answers t
|
||||||
@@ -43,6 +48,8 @@
|
|||||||
(tool-bar-mode -1)
|
(tool-bar-mode -1)
|
||||||
(scroll-bar-mode -1)
|
(scroll-bar-mode -1)
|
||||||
(global-hl-line-mode 1)
|
(global-hl-line-mode 1)
|
||||||
|
(global-eldoc-mode 1)
|
||||||
|
(global-display-line-numbers-mode 1)
|
||||||
|
|
||||||
(defun hgh/untabify-buffer ()
|
(defun hgh/untabify-buffer ()
|
||||||
(interactive)
|
(interactive)
|
||||||
@@ -65,7 +72,7 @@
|
|||||||
|
|
||||||
(use-package move-text
|
(use-package move-text
|
||||||
:bind (("M-<down>" . 'move-text-down)
|
:bind (("M-<down>" . 'move-text-down)
|
||||||
("M-<up>" . 'move-text-up)))
|
("M-<up>" . 'move-text-up)))
|
||||||
|
|
||||||
(use-package jai-mode
|
(use-package jai-mode
|
||||||
:vc (:url "https://github.com/valignatev/jai-mode.git"
|
:vc (:url "https://github.com/valignatev/jai-mode.git"
|
||||||
@@ -75,9 +82,17 @@
|
|||||||
:bind ("C-x g" . magit-status))
|
:bind ("C-x g" . magit-status))
|
||||||
|
|
||||||
(use-package multiple-cursors
|
(use-package multiple-cursors
|
||||||
:bind (("C->" . mc/mark-next-like-this)
|
:custom
|
||||||
("C-<" . mc/mark-previous-like-this)
|
(mc/always-run-for-all t)
|
||||||
("C-c C-<" . mc/mark-all-like-this)))
|
:bind (("C->" . mc/mark-next-like-this)
|
||||||
|
("C-<" . mc/mark-previous-like-this)
|
||||||
|
("C-c C-<" . mc/mark-all-like-this)
|
||||||
|
("C-c C->" . mc/mark-lines))
|
||||||
|
:init
|
||||||
|
(advice-add 'mc/mark-next-like-this :before #'hgh/set-box-cursor)
|
||||||
|
(advice-add 'mc/mark-previous-like-this :before #'hgh/set-box-cursor)
|
||||||
|
(advice-add 'mc/mark-all-like-this :before #'hgh/set-box-cursor)
|
||||||
|
(add-hook 'multiple-cursors-mode-disabled-hook #'hgh/set-bar-cursor))
|
||||||
|
|
||||||
(use-package cape
|
(use-package cape
|
||||||
:hook ((completion-at-point-functions . cape-dabbrev)
|
:hook ((completion-at-point-functions . cape-dabbrev)
|
||||||
@@ -112,3 +127,5 @@
|
|||||||
(push '(sql-mode "postgres-language-server" "lsp-proxy") eglot-server-programs))
|
(push '(sql-mode "postgres-language-server" "lsp-proxy") eglot-server-programs))
|
||||||
|
|
||||||
(use-package yaml-mode)
|
(use-package yaml-mode)
|
||||||
|
|
||||||
|
(use-package vterm)
|
||||||
|
|||||||
15
utils.el
Normal file
15
utils.el
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
;; -*- lexical-binding: t; -*-
|
||||||
|
(defun hgh/edit-init-file ()
|
||||||
|
(interactive)
|
||||||
|
(find-file user-init-file))
|
||||||
|
|
||||||
|
(defun hgh/duplicate-dwim ()
|
||||||
|
(interactive)
|
||||||
|
(duplicate-dwim)
|
||||||
|
(next-line))
|
||||||
|
|
||||||
|
(defun hgh/set-bar-cursor(&rest args)
|
||||||
|
(setq-local cursor-type 'bar))
|
||||||
|
|
||||||
|
(defun hgh/set-box-cursor(&rest args)
|
||||||
|
(setq-local cursor-type 'box))
|
||||||
Reference in New Issue
Block a user