1
0
Fork 0

Add flycheck and eglot.

This commit is contained in:
Lorenzo Good 2026-01-04 15:08:02 -06:00
parent f3983402a9
commit da50541a32
Signed by: lorenzo
GPG key ID: 7FCD64BD81180ED0

39
init.el
View file

@ -204,6 +204,39 @@ If the new path's directories does not exist, create them."
(use-package rust-mode (use-package rust-mode
:ensure t) :ensure t)
(use-package emacs
:config
;; Treesitter gramar remap.
(setq major-mode-remap-alist
'((yaml-mode . yaml-ts-mode)
(bash-mode . bash-ts-mode)
(js2-mode . js-ts-mode)))
;; Auto wrap parens.
:hook ((prog-mode . electric-pair-mode)))
(use-package eglot
:bind ("C-S-F" . eglot-format-buffer)
;; Configure hooks to automatically turn-on eglot for selected modes
;; :hook
;; (((python-mode ruby-mode elixir-mode) . eglot))
:custom
(eglot-send-changes-idle-time 0.1)
(eglot-extend-to-xref t) ; activate Eglot in referenced non-project files
:config
(fset #'jsonrpc--log-event #'ignore) ; massive perf boost---don't log every event
;; Sometimes you need to tell Eglot where to find the language server
; (add-to-list 'eglot-server-programs
; '(haskell-mode . ("haskell-language-server-wrapper" "--lsp")))
)
(use-package flycheck
:ensure t
:init (global-flycheck-mode))
(use-package projectile (use-package projectile
:ensure t :ensure t
:config :config
@ -241,9 +274,9 @@ If the new path's directories does not exist, create them."
;; If there is more than one, they won't work right. ;; If there is more than one, they won't work right.
'(package-selected-packages '(package-selected-packages
'(company consult corfu-candidate-overlay corfu-terminal eat '(company consult corfu-candidate-overlay corfu-terminal eat
edit-indirect elcord evil gruvbox-theme json-mode edit-indirect elcord evil flycheck gruvbox-theme
kbd-mode lsp-mode magit marginalia nix-mode projectile json-mode kbd-mode lsp-mode magit marginalia nix-mode
rust-mode vertico yaml-mode))) projectile rust-mode vertico yaml-mode)))
(custom-set-faces (custom-set-faces
;; custom-set-faces was added by Custom. ;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful. ;; If you edit it by hand, you could mess it up, so be careful.