Replace lsp-mode and flycheck with eglot, flymake
This commit is contained in:
parent
b70d2d5dd7
commit
84e6fe876c
97
init.el
97
init.el
@ -436,6 +436,20 @@ This overrides the default `display-startup-echo-area-message' function."
|
||||
:bind
|
||||
("C-c n" . display-line-numbers-mode))
|
||||
|
||||
;; ---------------------------------- ;;
|
||||
;; eglot
|
||||
;; ---------------------------------- ;;
|
||||
|
||||
(editor-feature eglot
|
||||
"Integrates LSP client features into Emacs."
|
||||
:config
|
||||
;; Remove the mode-line segment that Eglot adds
|
||||
(setq mode-line-misc-info (assoc-delete-all 'eglot--managed-mode mode-line-misc-info))
|
||||
:hook
|
||||
(gdscript-mode . eglot-ensure)
|
||||
(js-mode-hook . eglot-ensure)
|
||||
(typescript-mode-hook . eglot-ensure))
|
||||
|
||||
;; ---------------------------------- ;;
|
||||
;; elec-pair
|
||||
;; ---------------------------------- ;;
|
||||
@ -583,6 +597,19 @@ have been closed."
|
||||
:hook
|
||||
(before-save-hook . delete-trailing-whitespace))
|
||||
|
||||
;; ---------------------------------- ;;
|
||||
;; flymake
|
||||
;; ---------------------------------- ;;
|
||||
|
||||
(editor-feature flymake
|
||||
"Provides universal on-the-fly syntax checking."
|
||||
:custom
|
||||
(flymake-no-changes-timeout 2 "Wait for 2 seconds of idle time before invoking any checkers")
|
||||
:hook
|
||||
(prog-mode-hook . flymake-mode)
|
||||
:bind
|
||||
("C-c e" . flymake-show-buffer-diagnostics))
|
||||
|
||||
;; ---------------------------------- ;;
|
||||
;; frame
|
||||
;; ---------------------------------- ;;
|
||||
@ -1124,29 +1151,15 @@ DOCSTRING is an optional form that is discarded upon expansion."
|
||||
(eshell-mode-hook . fish-completion-mode))
|
||||
|
||||
;; ---------------------------------- ;;
|
||||
;; flycheck
|
||||
;; flymake-kondor
|
||||
;; ---------------------------------- ;;
|
||||
|
||||
(external-package flycheck
|
||||
"Enables on-the-fly syntax checking for supported languages."
|
||||
:custom
|
||||
(flycheck-idle-change-delay 2 "Wait for 2 seconds of idling before invoking any checkers")
|
||||
(flycheck-check-syntax-automatically '(save idle-change mode-enabled))
|
||||
:hook
|
||||
(prog-mode-hook . flycheck-mode)
|
||||
:bind
|
||||
("C-c e" . flycheck-list-errors))
|
||||
|
||||
;; ---------------------------------- ;;
|
||||
;; flycheck-clj-kondo
|
||||
;; ---------------------------------- ;;
|
||||
|
||||
(external-package flycheck-clj-kondo
|
||||
"Integrates clj-kondo as a flycheck checker for Clojure buffers."
|
||||
(external-package flymake-kondor
|
||||
"Integrates clj-kondo as a flymake checker for Clojure buffers."
|
||||
:when
|
||||
(executable-find "clj-kondo")
|
||||
:hook
|
||||
(clojure-mode-hook . (lambda () (require 'flycheck-clj-kondo))))
|
||||
(clojure-mode-hook . flymake-kondor-setup))
|
||||
|
||||
;; ---------------------------------- ;;
|
||||
;; fussy
|
||||
@ -1258,54 +1271,6 @@ DOCSTRING is an optional form that is discarded upon expansion."
|
||||
:hook
|
||||
(prog-mode-hook . ligature-mode))
|
||||
|
||||
;; ---------------------------------- ;;
|
||||
;; lsp-mode
|
||||
;; ---------------------------------- ;;
|
||||
|
||||
(external-package lsp-mode
|
||||
"Provides Language Server Protocol support and integration."
|
||||
:custom
|
||||
(lsp-eldoc-enable-hover nil "Do not print symbol eldoc information in the echo area")
|
||||
(lsp-signature-auto-activate nil "Do not display function signature docs in the echo area")
|
||||
(lsp-headerline-breadcrumb-enable nil "Do not display a file/function breadcrumb headerline")
|
||||
(lsp-modeline-code-actions-enable nil "Do not display suggested code actions in the mode line")
|
||||
:commands
|
||||
(lsp
|
||||
lsp-deferred)
|
||||
:hook
|
||||
(css-mode-hook . lsp-deferred)
|
||||
(gdscript-mode-hook . lsp-deferred)
|
||||
(js-mode-hook . lsp-deferred)
|
||||
(json-mode-hook . lsp-deferred)
|
||||
(rust-mode-hook . lsp-deferred)
|
||||
(typescript-mode-hook . lsp-deferred)
|
||||
(web-mode-hook . lsp-deferred))
|
||||
|
||||
;; ---------------------------------- ;;
|
||||
;; lsp-ui
|
||||
;; ---------------------------------- ;;
|
||||
|
||||
(external-package lsp-ui
|
||||
"Provides higher-level UI integration of LSP features for `lsp-mode'."
|
||||
:config
|
||||
(setq lsp-ui-doc-border (face-background 'lsp-ui-doc-background))
|
||||
:custom
|
||||
(lsp-ui-imenu-enable nil "Disable automatic activation of imenu side window")
|
||||
(lsp-ui-peek-always-show t "Always show peek popup, even with only one entry")
|
||||
(lsp-ui-doc-enable nil "Disable automatic activation of documentation elements")
|
||||
(lsp-ui-doc-max-width 50 "Limit documentation popup width to 50 columns")
|
||||
(lsp-ui-doc-max-height 10 "Limit documentation popup height to 10 lines")
|
||||
(lsp-ui-doc-header t "Show documentation header displaying the symbol name")
|
||||
(lsp-ui-doc-position 'top "Show documentation popups at the top of the window")
|
||||
(lsp-ui-doc-alignment 'window "Align documentation popups with the window, not the frame")
|
||||
(lsp-ui-doc-include-signature t "Show object signature/type in the documentation popup")
|
||||
(lsp-ui-doc-show-with-cursor t "Enable displaying documentation of symbols under the cursor")
|
||||
:bind
|
||||
(:map lsp-ui-mode-map
|
||||
("M-," . lsp-ui-doc-mode)
|
||||
("M-." . lsp-ui-peek-find-definitions)
|
||||
("M-?" . lsp-ui-peek-find-references)))
|
||||
|
||||
;; ---------------------------------- ;;
|
||||
;; magit
|
||||
;; ---------------------------------- ;;
|
||||
|
Loading…
Reference in New Issue
Block a user