suckle
This commit is contained in:
parent
983077017a
commit
59f4251ed8
155
config.org
155
config.org
|
@ -262,88 +262,93 @@
|
|||
*** Eglot
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package markdown-mode
|
||||
:ensure t
|
||||
:mode ("README\\.md\\'" . gfm-mode)
|
||||
:init (setq markdown-command "multimarkdown")
|
||||
:bind (:map markdown-mode-map
|
||||
("C-c C-e" . markdown-do)))
|
||||
(use-package markdown-mode
|
||||
:ensure t
|
||||
:mode ("README\\.md\\'" . gfm-mode)
|
||||
:init (setq markdown-command "multimarkdown")
|
||||
:bind (:map markdown-mode-map
|
||||
("C-c C-e" . markdown-do)))
|
||||
|
||||
(use-package eglot-booster
|
||||
:after eglot
|
||||
:ensure (eglot-booster :type git :host github :repo "jdtsmith/eglot-booster")
|
||||
:config (eglot-booster-mode))
|
||||
(use-package eglot-booster
|
||||
:after eglot
|
||||
:ensure (eglot-booster :type git :host github :repo "jdtsmith/eglot-booster")
|
||||
:config (eglot-booster-mode))
|
||||
|
||||
(use-package eglot
|
||||
:ensure nil
|
||||
:config
|
||||
(defun my-eglot-rename (newname)
|
||||
"Rename the current symbol to NEWNAME with initial input a."
|
||||
(interactive
|
||||
(list (read-from-minibuffer
|
||||
(format "Rename `%s' to: " (or (thing-at-point 'symbol t)
|
||||
(error "no symbol at point")))
|
||||
(or (thing-at-point 'symbol t) "") nil nil nil
|
||||
(symbol-name (symbol-at-point)))))
|
||||
(eglot--server-capable-or-lose :renameProvider)
|
||||
(eglot--apply-workspace-edit
|
||||
(jsonrpc-request (eglot--current-server-or-lose)
|
||||
:textDocument/rename `(,@(eglot--TextDocumentPositionParams)
|
||||
:newName ,newname))
|
||||
current-prefix-arg))
|
||||
(fset #'jsonrpc--log-event #'ignore)
|
||||
(setopt eglot-events-buffer-size 0)
|
||||
(defun eglot-format-buffer-on-save ()
|
||||
(when (not (derived-mode-p 'python-ts-mode))
|
||||
(add-hook 'before-save-hook #'eglot-format-buffer -10 t)))
|
||||
(add-hook 'eglot-managed-mode-hook #'eglot-format-buffer-on-save)
|
||||
(add-to-list 'eglot-server-programs
|
||||
'(nix-mode . ("nixd"))
|
||||
`(c++-mode . ("clangd" "--clang-tidy" "--completion-style=detailed" "--header-insertion=never")))
|
||||
:hook
|
||||
(rust-mode . eglot-ensure)
|
||||
(rust-ts-mode . eglot-ensure)
|
||||
(sh-script-mode . eglot-ensure)
|
||||
(python-mode . eglot-ensure)
|
||||
(python-ts-mode . eglot-ensure)
|
||||
(json-mode . eglot-ensure)
|
||||
(json-ts-mode . eglot-ensure)
|
||||
(nix-mode . eglot-ensure)
|
||||
(yaml-mode . eglot-ensure)
|
||||
(yaml-ts-mode . eglot-ensure)
|
||||
(c-mode . eglot-ensure)
|
||||
(c-ts-mode . eglot-ensure)
|
||||
(c++-mode . eglot-ensure)
|
||||
(c++-ts-mode . eglot-ensure)
|
||||
(c3-ts-mode . eglot-ensure)
|
||||
(rust-mode . eglot-ensure)
|
||||
(go-mode . eglot-ensure)
|
||||
(go-ts-mode . eglot-ensure))
|
||||
(use-package eglot
|
||||
:ensure nil
|
||||
:config
|
||||
(defun my-eglot-rename (newname)
|
||||
"Rename the current symbol to NEWNAME with initial input a."
|
||||
(interactive
|
||||
(list (read-from-minibuffer
|
||||
(format "Rename `%s' to: " (or (thing-at-point 'symbol t)
|
||||
(error "no symbol at point")))
|
||||
(or (thing-at-point 'symbol t) "") nil nil nil
|
||||
(symbol-name (symbol-at-point)))))
|
||||
(eglot--server-capable-or-lose :renameProvider)
|
||||
(eglot--apply-workspace-edit
|
||||
(jsonrpc-request (eglot--current-server-or-lose)
|
||||
:textDocument/rename `(,@(eglot--TextDocumentPositionParams)
|
||||
:newName ,newname))
|
||||
current-prefix-arg))
|
||||
(fset #'jsonrpc--log-event #'ignore)
|
||||
(setopt eglot-events-buffer-size 0)
|
||||
(defun eglot-format-buffer-on-save ()
|
||||
(when (not (derived-mode-p 'python-ts-mode))
|
||||
(add-hook 'before-save-hook #'eglot-format-buffer -10 t)))
|
||||
(add-hook 'eglot-managed-mode-hook #'eglot-format-buffer-on-save)
|
||||
(add-to-list 'eglot-server-programs
|
||||
'(nix-mode . ("nixd"))
|
||||
`(c++-mode . ("clangd" "--clang-tidy" "--completion-style=detailed" "--header-insertion=never")))
|
||||
:hook
|
||||
(rust-mode . eglot-ensure)
|
||||
(rust-ts-mode . eglot-ensure)
|
||||
(sh-script-mode . eglot-ensure)
|
||||
(python-mode . eglot-ensure)
|
||||
(python-ts-mode . eglot-ensure)
|
||||
(json-mode . eglot-ensure)
|
||||
(json-ts-mode . eglot-ensure)
|
||||
(nix-mode . eglot-ensure)
|
||||
(yaml-mode . eglot-ensure)
|
||||
(yaml-ts-mode . eglot-ensure)
|
||||
(c-mode . eglot-ensure)
|
||||
(c-ts-mode . eglot-ensure)
|
||||
(c++-mode . eglot-ensure)
|
||||
(c++-ts-mode . eglot-ensure)
|
||||
(c3-ts-mode . eglot-ensure)
|
||||
(rust-mode . eglot-ensure)
|
||||
(go-mode . eglot-ensure)
|
||||
(go-ts-mode . eglot-ensure))
|
||||
|
||||
(use-package rust-mode
|
||||
:ensure t)
|
||||
(add-hook 'c-mode-hook 'hide-ifdef-mode)
|
||||
(add-hook 'c++-mode-hook 'hide-ifdef-mode)
|
||||
(setq hide-ifdef-initially t)
|
||||
(setq hide-ifdef-shadow 'font-lock-comment-face)
|
||||
|
||||
(use-package tuareg
|
||||
:ensure t
|
||||
:mode ("\\.ml\\'" . tuareg-mode)
|
||||
:hook (tuareg-mode . eglot-ensure))
|
||||
(use-package rust-mode
|
||||
:ensure t)
|
||||
|
||||
(use-package merlin
|
||||
:ensure t
|
||||
:hook (tuareg-mode . merlin-mode))
|
||||
(use-package tuareg
|
||||
:ensure t
|
||||
:mode ("\\.ml\\'" . tuareg-mode)
|
||||
:hook (tuareg-mode . eglot-ensure))
|
||||
|
||||
(use-package glsl-mode
|
||||
:ensure t
|
||||
:mode ("\\.vert\\'" "\\.frag\\'" "\\.geom\\'"))
|
||||
(use-package merlin
|
||||
:ensure t
|
||||
:hook (tuareg-mode . merlin-mode))
|
||||
|
||||
(use-package eldoc-box
|
||||
:custom
|
||||
(eldoc-box-max-pixel-width 1024)
|
||||
:custom-face
|
||||
(eldoc-box-body ((t (:family "Iosevka Comfy Motion" :background "#181825" :foreground "#cdd6f4"))))
|
||||
:config
|
||||
(setq eldoc-message-function #'ignore
|
||||
eldoc-idle-delay 0))
|
||||
(use-package glsl-mode
|
||||
:ensure t
|
||||
:mode ("\\.vert\\'" "\\.frag\\'" "\\.geom\\'"))
|
||||
|
||||
(use-package eldoc-box
|
||||
:custom
|
||||
(eldoc-box-max-pixel-width 1024)
|
||||
:custom-face
|
||||
(eldoc-box-body ((t (:family "Iosevka Comfy Motion" :background "#181825" :foreground "#cdd6f4"))))
|
||||
:config
|
||||
(setq eldoc-message-function #'ignore
|
||||
eldoc-idle-delay 0))
|
||||
#+end_src
|
||||
|
||||
*** Apheleia
|
||||
|
|
Loading…
Reference in a new issue