diff options
| author | Mountain Man <43313373+MountainMan1312@users.noreply.github.com> | 2023-05-22 02:12:35 -0400 |
|---|---|---|
| committer | Mountain Man <43313373+MountainMan1312@users.noreply.github.com> | 2023-05-22 02:12:35 -0400 |
| commit | 0c34d5369defb092d2cc77bd0de1abd5007ed4d7 (patch) | |
| tree | 7b72dcfa8d2f2e2ae4976dd62a3a20db8c1e849a | |
| parent | Add `.cache/` to `.gitignore` (diff) | |
| download | mmosmacs-0c34d5369defb092d2cc77bd0de1abd5007ed4d7.tar.gz mmosmacs-0c34d5369defb092d2cc77bd0de1abd5007ed4d7.tar.bz2 mmosmacs-0c34d5369defb092d2cc77bd0de1abd5007ed4d7.zip | |
Use `flycheck` in `sh-mode` buffers
| -rw-r--r-- | init.el | 26 |
1 files changed, 24 insertions, 2 deletions
| @@ -809,9 +809,11 @@ | |||
| 809 | ;; a mistake. | 809 | ;; a mistake. |
| 810 | ;; --------------------------------- | 810 | ;; --------------------------------- |
| 811 | 811 | ||
| 812 | ;; Flycheck | 812 | ;; Flycheck is activated by specific language modes. |
| 813 | ;; See `:hook's in language modes below to see which ones use it. | ||
| 813 | (use-package flycheck | 814 | (use-package flycheck |
| 814 | :straight t) | 815 | :straight t |
| 816 | :defer t) | ||
| 815 | 817 | ||
| 816 | 818 | ||
| 817 | ;; --------------------------------- | 819 | ;; --------------------------------- |
| @@ -838,6 +840,26 @@ | |||
| 838 | :hook (emacs-lisp-mode . flycheck-mode)) | 840 | :hook (emacs-lisp-mode . flycheck-mode)) |
| 839 | 841 | ||
| 840 | 842 | ||
| 843 | ;; --------------------------------- | ||
| 844 | ;; sh / Bash | ||
| 845 | ;; ---------- | ||
| 846 | ;; Scripts for POSIX Shell and Bash. | ||
| 847 | ;; | ||
| 848 | ;; NOTE: The first time you use this | ||
| 849 | ;; configuration, you must run | ||
| 850 | ;; `M-x lsp-install-server RET bash-ls RET' | ||
| 851 | ;; --------------------------------- | ||
| 852 | |||
| 853 | ;; Configure sh-mode | ||
| 854 | (use-package sh-mode | ||
| 855 | :hook (sh-mode . flycheck-mode)) | ||
| 856 | |||
| 857 | ;; Configure LSP for sh / Bash | ||
| 858 | (use-package lsp-mode | ||
| 859 | :config | ||
| 860 | (setq lsp-bash-highlight-parsing-errors t)) | ||
| 861 | |||
| 862 | |||
| 841 | 863 | ||
| 842 | 864 | ||
| 843 | ;; --------------------------------------------------------------------- | 865 | ;; --------------------------------------------------------------------- |