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!)
|
||||
(use-package embark
|
||||
: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 ()
|
||||
"An embark indicator that displays keymaps using which-key.
|
||||
The which-key help message will show the type and value of the
|
||||
@ -157,10 +160,22 @@ targets."
|
||||
([remap projectile-grep] #'consult-grep)
|
||||
("C-c p" #'consult-yank-from-kill-ring))
|
||||
|
||||
(use-package consult-flycheck
|
||||
:after flycheck
|
||||
(use-package consult-eglot
|
||||
:after (consult eglot)
|
||||
: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
|
||||
:general
|
||||
|
@ -23,6 +23,9 @@
|
||||
(defun sp-wrap-angle-bracket ()
|
||||
(interactive)
|
||||
(sp-wrap-with-pair "<"))
|
||||
(defun sp-wrap-backtick ()
|
||||
(interactive)
|
||||
(sp-wrap-with-pair "`"))
|
||||
(defun sp-after-equals-p (_id action _context)
|
||||
(when (memq action '(insert navigate))
|
||||
(sp--looking-back-p "=>" 2)))
|
||||
@ -70,7 +73,8 @@
|
||||
"g{" #'sp-wrap-curly
|
||||
"g\"" #'sp-wrap-double-quote
|
||||
"g'" #'sp-wrap-single-quote
|
||||
"g<" #'sp-wrap-angle-bracket))
|
||||
"g<" #'sp-wrap-angle-bracket
|
||||
"g`" #'sp-wrap-backtick))
|
||||
|
||||
(use-package evil-smartparens
|
||||
:after (evil smartparens)
|
||||
|
@ -44,13 +44,32 @@
|
||||
:custom
|
||||
(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
|
||||
:commands (eglot)
|
||||
:config
|
||||
(add-to-list 'eglot-stay-out-of 'flymake)
|
||||
(defun my-eglot-managed-hook ()
|
||||
(if (eglot-managed-p)
|
||||
(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-to-list 'eglot-server-programs
|
||||
'(js-web-mode . ("typescript-language-server" "--stdio")))
|
||||
@ -183,9 +202,9 @@
|
||||
"Prefix keymap for eglot commands.")
|
||||
(general-def eglot-prefix-map
|
||||
"a" #'eglot-code-actions
|
||||
"r" #'eglot-reconnect
|
||||
"s" #'eglot-shutdown
|
||||
"R" #'eglot-rename
|
||||
"R" #'eglot-reconnect
|
||||
"S" #'eglot-shutdown
|
||||
"r" #'eglot-rename
|
||||
"f" #'eglot-format-buffer
|
||||
"i" #'eglot-code-action-organize-imports
|
||||
"h" #'eldoc
|
||||
@ -208,6 +227,7 @@
|
||||
(ruby-ts-mode . eglot-ensure)
|
||||
(sh-mode . eglot-ensure)
|
||||
(bash-ts-mode . eglot-ensure)
|
||||
(yaml-mode . eglot-ensure)
|
||||
:custom
|
||||
(eglot-confirm-server-initiated-edits nil)
|
||||
(eglot-connect-timeout nil))
|
||||
@ -227,19 +247,28 @@
|
||||
;; Code formatting library
|
||||
(use-package apheleia
|
||||
:straight (apheleia :host github :repo "raxod502/apheleia")
|
||||
:config
|
||||
(add-to-list 'apheleia-mode-alist '(ruby-mode . (rubocop)))
|
||||
:general
|
||||
("C-c f" #'apheleia-format-buffer))
|
||||
(prog-mode-map "C-c f" #'apheleia-format-buffer))
|
||||
|
||||
;; AI assistance
|
||||
(use-package copilot
|
||||
: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
|
||||
(prog-mode-map "C-c <tab>" #'copilot-complete)
|
||||
(copilot-completion-map "C-n" #'copilot-next-completion
|
||||
"C-p" #'copilot-previous-completion
|
||||
"C-<tab>" #'copilot-accept-completion
|
||||
"C-M-<tab>" #'copilot-accept-completion-by-word
|
||||
"C-S-<tab>" #'copilot-accept-completion-by-line
|
||||
"C-g" #'copilot-clear-overlay))
|
||||
|
||||
;; Debugger interface
|
||||
|
@ -1,7 +1,16 @@
|
||||
;; -*- lexical-binding: t; -*-
|
||||
|
||||
(defvar my-light-theme 'doom-solarized-light)
|
||||
(defvar my-dark-theme 'doom-solarized-dark)
|
||||
(defcustom my-light-theme 'doom-solarized-light
|
||||
"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))
|
||||
|
||||
@ -25,4 +34,7 @@
|
||||
|
||||
(add-hook 'after-init-hook #'theme-timer-hook)
|
||||
|
||||
(unbind-key "C-<tab>" global-map)
|
||||
(unbind-key "C-S-<tab>" global-map)
|
||||
|
||||
(provide 'init-mac)
|
||||
|
@ -164,7 +164,7 @@
|
||||
(setq org-roam-v2-ack t)
|
||||
(defvar org-roam-commands-map (make-sparse-keymap))
|
||||
(general-def org-roam-commands-map
|
||||
"l" #'org-roam-buffer-toggle
|
||||
"r" #'org-roam-buffer-toggle
|
||||
"f" #'org-roam-node-find
|
||||
"i" #'org-roam-node-insert
|
||||
"I" #'org-roam-node-insert-immediate)
|
||||
|
@ -1,6 +1,7 @@
|
||||
;; -*- lexical-binding: t; -*-
|
||||
(use-package ruby-mode
|
||||
:straight (:type built-in))
|
||||
:straight (:type built-in)
|
||||
:hook (ruby-mode . highlight-indent-guides-mode))
|
||||
|
||||
(use-package rbenv
|
||||
:hook (after-init . global-rbenv-mode))
|
||||
|
@ -22,7 +22,9 @@
|
||||
(list :command-name "apply"
|
||||
:command-line "terraform apply")
|
||||
(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 ()
|
||||
(when run-command-local-commands
|
||||
|
@ -52,6 +52,7 @@ brew "terraform-ls"
|
||||
brew "texinfo"
|
||||
brew "typescript-language-server"
|
||||
brew "vscode-langservers-extracted"
|
||||
brew "yaml-language-server"
|
||||
brew "youtube-dl"
|
||||
cask "alfred"
|
||||
cask "bartender"
|
||||
@ -67,6 +68,7 @@ cask "intellij-idea"
|
||||
cask "iterm2"
|
||||
cask "notion"
|
||||
cask "notion-calendar"
|
||||
cask "protonvpn"
|
||||
cask "railwaycat/emacsmacport/emacs-mac"
|
||||
cask "rectangle"
|
||||
cask "slack"
|
||||
|
Loading…
Reference in New Issue
Block a user