Updating Doom Emacs.

This commit is contained in:
Derek Taylor
2020-06-19 22:43:40 -05:00
parent 0f664d532a
commit a5c86c514a
453 changed files with 13527 additions and 12455 deletions

View File

@@ -1,19 +1,45 @@
#+TITLE: :lang sh
#+TITLE: lang/sh
#+DATE: December 19, 2015
#+SINCE: v0.7
#+STARTUP: inlineimages
* Table of Contents :TOC:
- [[#description][Description]]
- [[#module-flags][Module Flags]]
- [[#plugins][Plugins]]
- [[#hacks][Hacks]]
- [[#prerequisites][Prerequisites]]
- [[#features][Features]]
- [[#configuration][Configuration]]
- [[#troubleshooting][Troubleshooting]]
* Description
This module adds support for shell scripting languages.
+ Code completion (company-shell)
+ Syntax Checking (flycheck)
+ Added variable interpolation fontification
* Table of Contents :TOC:
- [[#install][Install]]
- [[#dependencies][Dependencies]]
** Module Flags
+ =+lsp= Enables LSP support for sh-mode. This requires the =:tools lsp= module
to be enabled and [[https://github.com/mads-hartmann/bash-language-server][bash-language-server]] to be installed on your system.
+ =+fish= Add syntax highlighting for fish script files.
** Plugins
+ [[https://github.com/Alexander-Miller/company-shell][company-shell]]* (=:completion company=)
+ [[https://github.com/wwwjfy/emacs-fish][fish-mode]]* (=+fish=)
* Install
** Dependencies
This module has several soft dependencies:
** Hacks
+ Interpolated variables are fontified.
+ ~shellcheck~ Enables shell script linting.
+ ~bashdb~ Enables debugging for bash scripts.
+ ~zshdb~ Enables debugging for zsh scripts.
* Prerequisites
This module has several optional dependencies:
+ [[https://github.com/koalaman/shellcheck][shellcheck]]: Enables advanced shell script linting.
+ [[https://github.com/mads-hartmann/bash-language-server][bash-language-server]]: Enables LSP support (with =+lsp= flag).
+ With the =:tools debugger= module
+ [[http://bashdb.sourceforge.net/][bashdb]]: Enables debugging for bash scripts
+ [[https://github.com/rocky/zshdb][zshdb]]: Enables debugging for zsh scripts
* TODO Features
* TODO Configuration
* TODO Troubleshooting

View File

@@ -11,12 +11,15 @@
;;; Packages
(use-package! sh-script ; built-in
:mode ("\\.zunit\\'" . sh-mode)
:mode ("\\.\\(?:zunit\\|env\\)\\'" . sh-mode)
:mode ("/bspwmrc\\'" . sh-mode)
:config
(set-electric! 'sh-mode :words '("else" "elif" "fi" "done" "then" "do" "esac" ";;"))
(set-repl-handler! 'sh-mode #'+sh/open-repl)
(when (featurep! +lsp)
(add-hook 'sh-mode-local-vars-hook #'lsp!))
(setq sh-indent-after-continuation 'always)
;; [pedantry intensifies]
@@ -52,6 +55,7 @@
(use-package! company-shell
:when (featurep! :completion company)
:unless (featurep! +lsp)
:after sh-script
:config
(set-company-backend! 'sh-mode '(company-shell company-files))

View File

@@ -1,5 +1,5 @@
;;; lang/sh/doctor.el -*- lexical-binding: t; -*-
(when (featurep! :tools flycheck)
(when (featurep! :checkers syntax)
(unless (executable-find "shellcheck")
(warn! "Couldn't find shellcheck. Shell script linting will not work")))

View File

@@ -2,7 +2,7 @@
;;; lang/sh/packages.el
(when (featurep! :completion company)
(package! company-shell))
(package! company-shell :pin "52f3bf26b74adc30a275f5f4290a1fc72a6876ff"))
(when (featurep! +fish)
(package! fish-mode))
(package! fish-mode :pin "db257db81058b0b12f788c324c264cc59b9a5bf4"))