Compare commits
15 Commits
9dfffe3654
...
fa0f619a43
Author | SHA1 | Date | |
---|---|---|---|
fa0f619a43 | |||
ba6c7cb66f | |||
0124fa4071 | |||
30c22902b3 | |||
b57a368179 | |||
cf2bae52ef | |||
20a3d96799 | |||
3ad9aaffef | |||
d578fcfaa7 | |||
4bae080f9f | |||
3c27867e14 | |||
3fd69b75c5 | |||
0c44cc4b31 | |||
f0d987dfe2 | |||
9a7a320f8a |
@ -62,6 +62,9 @@
|
|||||||
;; Embark adds context actions to completion candidates (and other things!)
|
;; Embark adds context actions to completion candidates (and other things!)
|
||||||
(use-package embark
|
(use-package embark
|
||||||
:config
|
:config
|
||||||
|
;; Make sure identifier at point is the first target
|
||||||
|
(setq embark-target-finders (remove 'embark-target-identifier-at-point embark-target-finders))
|
||||||
|
(add-to-list 'embark-target-finders 'embark-target-identifier-at-point)
|
||||||
(defun embark-which-key-indicator ()
|
(defun embark-which-key-indicator ()
|
||||||
"An embark indicator that displays keymaps using which-key.
|
"An embark indicator that displays keymaps using which-key.
|
||||||
The which-key help message will show the type and value of the
|
The which-key help message will show the type and value of the
|
||||||
@ -157,10 +160,22 @@ targets."
|
|||||||
([remap projectile-grep] #'consult-grep)
|
([remap projectile-grep] #'consult-grep)
|
||||||
("C-c p" #'consult-yank-from-kill-ring))
|
("C-c p" #'consult-yank-from-kill-ring))
|
||||||
|
|
||||||
(use-package consult-flycheck
|
(use-package consult-eglot
|
||||||
:after flycheck
|
:after (consult eglot)
|
||||||
:general
|
:general
|
||||||
(flycheck-command-map "!" #'consult-flycheck))
|
(eglot-prefix-map "s" #'consult-eglot-symbols))
|
||||||
|
|
||||||
|
(use-package consult-org-roam
|
||||||
|
:after (consult org-roam)
|
||||||
|
:config
|
||||||
|
(consult-org-roam-mode 1)
|
||||||
|
:custom
|
||||||
|
(consult-org-roam-grep-func #'consult-ripgrep)
|
||||||
|
(consult-org-roam-buffer-after-buffers t)
|
||||||
|
:general
|
||||||
|
(org-roam-commands-map "b" #'consult-org-roam-backlinks
|
||||||
|
"B" #'consult-org-roam-backlinks-recursive
|
||||||
|
"l" #'consult-org-roam-forward-links))
|
||||||
|
|
||||||
(use-package embark-consult
|
(use-package embark-consult
|
||||||
:general
|
:general
|
||||||
|
@ -23,6 +23,9 @@
|
|||||||
(defun sp-wrap-angle-bracket ()
|
(defun sp-wrap-angle-bracket ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(sp-wrap-with-pair "<"))
|
(sp-wrap-with-pair "<"))
|
||||||
|
(defun sp-wrap-backtick ()
|
||||||
|
(interactive)
|
||||||
|
(sp-wrap-with-pair "`"))
|
||||||
(defun sp-after-equals-p (_id action _context)
|
(defun sp-after-equals-p (_id action _context)
|
||||||
(when (memq action '(insert navigate))
|
(when (memq action '(insert navigate))
|
||||||
(sp--looking-back-p "=>" 2)))
|
(sp--looking-back-p "=>" 2)))
|
||||||
@ -70,7 +73,8 @@
|
|||||||
"g{" #'sp-wrap-curly
|
"g{" #'sp-wrap-curly
|
||||||
"g\"" #'sp-wrap-double-quote
|
"g\"" #'sp-wrap-double-quote
|
||||||
"g'" #'sp-wrap-single-quote
|
"g'" #'sp-wrap-single-quote
|
||||||
"g<" #'sp-wrap-angle-bracket))
|
"g<" #'sp-wrap-angle-bracket
|
||||||
|
"g`" #'sp-wrap-backtick))
|
||||||
|
|
||||||
(use-package evil-smartparens
|
(use-package evil-smartparens
|
||||||
:after (evil smartparens)
|
:after (evil smartparens)
|
||||||
|
@ -44,13 +44,32 @@
|
|||||||
:custom
|
:custom
|
||||||
(xref-prompt-for-identifier nil))
|
(xref-prompt-for-identifier nil))
|
||||||
|
|
||||||
|
;; Inline syntax checking
|
||||||
|
(use-package flymake
|
||||||
|
:straight (:type built-in)
|
||||||
|
:config
|
||||||
|
(defvar flymake-map (make-sparse-keymap)
|
||||||
|
"Keymap for flymake commands.")
|
||||||
|
(general-def flymake-map
|
||||||
|
"n" #'flymake-goto-next-error
|
||||||
|
"p" #'flymake-goto-prev-error
|
||||||
|
"b" #'flymake-show-diagnostics-buffer
|
||||||
|
"l" #'consult-flymake
|
||||||
|
"a" #'flymake-show-project-diagnostics)
|
||||||
|
(leader-def-key "e" flymake-map)
|
||||||
|
:hook (prog-mode . flymake-mode))
|
||||||
|
|
||||||
|
|
||||||
|
;; LSP client
|
||||||
(use-package eglot
|
(use-package eglot
|
||||||
:commands (eglot)
|
:commands (eglot)
|
||||||
:config
|
:config
|
||||||
|
(add-to-list 'eglot-stay-out-of 'flymake)
|
||||||
(defun my-eglot-managed-hook ()
|
(defun my-eglot-managed-hook ()
|
||||||
(if (eglot-managed-p)
|
(if (eglot-managed-p)
|
||||||
(setq-local corfu-preview-current nil)
|
(setq-local corfu-preview-current nil)
|
||||||
(kill-local-variable 'corfu-preview-current)))
|
(kill-local-variable 'corfu-preview-current))
|
||||||
|
(add-hook 'flymake-diagnostic-functions 'eglot-flymake-backend nil t))
|
||||||
(add-hook 'eglot-managed-mode-hook #'my-eglot-managed-hook)
|
(add-hook 'eglot-managed-mode-hook #'my-eglot-managed-hook)
|
||||||
(add-to-list 'eglot-server-programs
|
(add-to-list 'eglot-server-programs
|
||||||
'(js-web-mode . ("typescript-language-server" "--stdio")))
|
'(js-web-mode . ("typescript-language-server" "--stdio")))
|
||||||
@ -183,9 +202,9 @@
|
|||||||
"Prefix keymap for eglot commands.")
|
"Prefix keymap for eglot commands.")
|
||||||
(general-def eglot-prefix-map
|
(general-def eglot-prefix-map
|
||||||
"a" #'eglot-code-actions
|
"a" #'eglot-code-actions
|
||||||
"r" #'eglot-reconnect
|
"R" #'eglot-reconnect
|
||||||
"s" #'eglot-shutdown
|
"S" #'eglot-shutdown
|
||||||
"R" #'eglot-rename
|
"r" #'eglot-rename
|
||||||
"f" #'eglot-format-buffer
|
"f" #'eglot-format-buffer
|
||||||
"i" #'eglot-code-action-organize-imports
|
"i" #'eglot-code-action-organize-imports
|
||||||
"h" #'eldoc
|
"h" #'eldoc
|
||||||
@ -208,6 +227,7 @@
|
|||||||
(ruby-ts-mode . eglot-ensure)
|
(ruby-ts-mode . eglot-ensure)
|
||||||
(sh-mode . eglot-ensure)
|
(sh-mode . eglot-ensure)
|
||||||
(bash-ts-mode . eglot-ensure)
|
(bash-ts-mode . eglot-ensure)
|
||||||
|
(yaml-mode . eglot-ensure)
|
||||||
:custom
|
:custom
|
||||||
(eglot-confirm-server-initiated-edits nil)
|
(eglot-confirm-server-initiated-edits nil)
|
||||||
(eglot-connect-timeout nil))
|
(eglot-connect-timeout nil))
|
||||||
@ -227,19 +247,28 @@
|
|||||||
;; Code formatting library
|
;; Code formatting library
|
||||||
(use-package apheleia
|
(use-package apheleia
|
||||||
:straight (apheleia :host github :repo "raxod502/apheleia")
|
:straight (apheleia :host github :repo "raxod502/apheleia")
|
||||||
|
:config
|
||||||
|
(add-to-list 'apheleia-mode-alist '(ruby-mode . (rubocop)))
|
||||||
:general
|
:general
|
||||||
("C-c f" #'apheleia-format-buffer))
|
(prog-mode-map "C-c f" #'apheleia-format-buffer))
|
||||||
|
|
||||||
;; AI assistance
|
;; AI assistance
|
||||||
(use-package copilot
|
(use-package copilot
|
||||||
:straight (:host github :repo "copilot-emacs/copilot.el" :files ("dist" "*.el"))
|
:straight (:host github :repo "copilot-emacs/copilot.el" :files ("dist" "*.el"))
|
||||||
:hook (prog-mode . copilot-mode)
|
:hook ((prog-mode . copilot-mode)
|
||||||
|
(yaml-mode . copilot-mode)
|
||||||
|
(json-mode . copilot-mode)
|
||||||
|
(forge-post-mode . copilot-mode)
|
||||||
|
(git-commit-mode . copilot-mode))
|
||||||
|
:config
|
||||||
|
(add-to-list 'warning-suppress-types '(copilot))
|
||||||
:general
|
:general
|
||||||
(prog-mode-map "C-c <tab>" #'copilot-complete)
|
(prog-mode-map "C-c <tab>" #'copilot-complete)
|
||||||
(copilot-completion-map "C-n" #'copilot-next-completion
|
(copilot-completion-map "C-n" #'copilot-next-completion
|
||||||
"C-p" #'copilot-previous-completion
|
"C-p" #'copilot-previous-completion
|
||||||
"C-<tab>" #'copilot-accept-completion
|
"C-<tab>" #'copilot-accept-completion
|
||||||
"C-M-<tab>" #'copilot-accept-completion-by-word
|
"C-M-<tab>" #'copilot-accept-completion-by-word
|
||||||
|
"C-S-<tab>" #'copilot-accept-completion-by-line
|
||||||
"C-g" #'copilot-clear-overlay))
|
"C-g" #'copilot-clear-overlay))
|
||||||
|
|
||||||
;; Debugger interface
|
;; Debugger interface
|
||||||
|
@ -1,7 +1,16 @@
|
|||||||
;; -*- lexical-binding: t; -*-
|
;; -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
(defvar my-light-theme 'doom-solarized-light)
|
(defcustom my-light-theme 'doom-solarized-light
|
||||||
(defvar my-dark-theme 'doom-solarized-dark)
|
"My light theme."
|
||||||
|
:type 'symbol
|
||||||
|
:group 'personal
|
||||||
|
:options (custom-available-themes))
|
||||||
|
|
||||||
|
(defcustom my-dark-theme 'doom-solarized-dark
|
||||||
|
"My dark theme."
|
||||||
|
:type 'symbol
|
||||||
|
:group 'personal
|
||||||
|
:options (custom-available-themes))
|
||||||
|
|
||||||
(defun mac-appearance () (plist-get (mac-application-state) :appearance))
|
(defun mac-appearance () (plist-get (mac-application-state) :appearance))
|
||||||
|
|
||||||
@ -25,4 +34,7 @@
|
|||||||
|
|
||||||
(add-hook 'after-init-hook #'theme-timer-hook)
|
(add-hook 'after-init-hook #'theme-timer-hook)
|
||||||
|
|
||||||
|
(unbind-key "C-<tab>" global-map)
|
||||||
|
(unbind-key "C-S-<tab>" global-map)
|
||||||
|
|
||||||
(provide 'init-mac)
|
(provide 'init-mac)
|
||||||
|
@ -164,7 +164,7 @@
|
|||||||
(setq org-roam-v2-ack t)
|
(setq org-roam-v2-ack t)
|
||||||
(defvar org-roam-commands-map (make-sparse-keymap))
|
(defvar org-roam-commands-map (make-sparse-keymap))
|
||||||
(general-def org-roam-commands-map
|
(general-def org-roam-commands-map
|
||||||
"l" #'org-roam-buffer-toggle
|
"r" #'org-roam-buffer-toggle
|
||||||
"f" #'org-roam-node-find
|
"f" #'org-roam-node-find
|
||||||
"i" #'org-roam-node-insert
|
"i" #'org-roam-node-insert
|
||||||
"I" #'org-roam-node-insert-immediate)
|
"I" #'org-roam-node-insert-immediate)
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
;; -*- lexical-binding: t; -*-
|
;; -*- lexical-binding: t; -*-
|
||||||
(use-package ruby-mode
|
(use-package ruby-mode
|
||||||
:straight (:type built-in))
|
:straight (:type built-in)
|
||||||
|
:hook (ruby-mode . highlight-indent-guides-mode))
|
||||||
|
|
||||||
(use-package rbenv
|
(use-package rbenv
|
||||||
:hook (after-init . global-rbenv-mode))
|
:hook (after-init . global-rbenv-mode))
|
||||||
|
@ -22,7 +22,9 @@
|
|||||||
(list :command-name "apply"
|
(list :command-name "apply"
|
||||||
:command-line "terraform apply")
|
:command-line "terraform apply")
|
||||||
(list :command-name "destroy"
|
(list :command-name "destroy"
|
||||||
:command-line "terraform destroy"))))
|
:command-line "terraform destroy")
|
||||||
|
(list :command-name "format"
|
||||||
|
:command-line "terraform fmt -recursive"))))
|
||||||
|
|
||||||
(defun run-command-recipe-local ()
|
(defun run-command-recipe-local ()
|
||||||
(when run-command-local-commands
|
(when run-command-local-commands
|
||||||
|
@ -52,6 +52,7 @@ brew "terraform-ls"
|
|||||||
brew "texinfo"
|
brew "texinfo"
|
||||||
brew "typescript-language-server"
|
brew "typescript-language-server"
|
||||||
brew "vscode-langservers-extracted"
|
brew "vscode-langservers-extracted"
|
||||||
|
brew "yaml-language-server"
|
||||||
brew "youtube-dl"
|
brew "youtube-dl"
|
||||||
cask "alfred"
|
cask "alfred"
|
||||||
cask "bartender"
|
cask "bartender"
|
||||||
@ -67,6 +68,7 @@ cask "intellij-idea"
|
|||||||
cask "iterm2"
|
cask "iterm2"
|
||||||
cask "notion"
|
cask "notion"
|
||||||
cask "notion-calendar"
|
cask "notion-calendar"
|
||||||
|
cask "protonvpn"
|
||||||
cask "railwaycat/emacsmacport/emacs-mac"
|
cask "railwaycat/emacsmacport/emacs-mac"
|
||||||
cask "rectangle"
|
cask "rectangle"
|
||||||
cask "slack"
|
cask "slack"
|
||||||
|
Loading…
Reference in New Issue
Block a user