From 0c34d5369defb092d2cc77bd0de1abd5007ed4d7 Mon Sep 17 00:00:00 2001 From: Mountain Man <43313373+MountainMan1312@users.noreply.github.com> Date: Mon, 22 May 2023 02:12:35 -0400 Subject: Use `flycheck` in `sh-mode` buffers --- init.el | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/init.el b/init.el index 4807df0..8d9152b 100644 --- a/init.el +++ b/init.el @@ -809,9 +809,11 @@ ;; a mistake. ;; --------------------------------- -;; Flycheck +;; Flycheck is activated by specific language modes. +;; See `:hook's in language modes below to see which ones use it. (use-package flycheck - :straight t) + :straight t + :defer t) ;; --------------------------------- @@ -838,6 +840,26 @@ :hook (emacs-lisp-mode . flycheck-mode)) +;; --------------------------------- +;; sh / Bash +;; ---------- +;; Scripts for POSIX Shell and Bash. +;; +;; NOTE: The first time you use this +;; configuration, you must run +;; `M-x lsp-install-server RET bash-ls RET' +;; --------------------------------- + +;; Configure sh-mode +(use-package sh-mode + :hook (sh-mode . flycheck-mode)) + +;; Configure LSP for sh / Bash +(use-package lsp-mode + :config + (setq lsp-bash-highlight-parsing-errors t)) + + ;; --------------------------------------------------------------------- -- cgit v1.2.3