fix(format): correctly adjust shfmt
This commit is contained in:
parent
4ecd616cd8
commit
115bfc52a2
1 changed files with 3 additions and 6 deletions
|
@ -17,12 +17,9 @@
|
||||||
:config
|
:config
|
||||||
(set-docsets! 'sh-mode "Bash")
|
(set-docsets! 'sh-mode "Bash")
|
||||||
(set-electric! 'sh-mode :words '("else" "elif" "fi" "done" "then" "do" "esac" ";;"))
|
(set-electric! 'sh-mode :words '("else" "elif" "fi" "done" "then" "do" "esac" ";;"))
|
||||||
(after! apheleia
|
(set-formatter! 'shfmt '("shfmt" "-ci"
|
||||||
(setf (alist-get 'shfmt apheleia-formatters)
|
|
||||||
'("shfmt" "-ci"
|
|
||||||
(unless indent-tabs-mode
|
(unless indent-tabs-mode
|
||||||
(list "-i" (number-to-string tab-width)))
|
(list "-i" (number-to-string tab-width)))))
|
||||||
(list "-ln" (pcase sh-shell (`bash "bash") (`mksh "mksh") (_ "posix"))))))
|
|
||||||
|
|
||||||
(set-repl-handler! 'sh-mode #'+sh/open-repl)
|
(set-repl-handler! 'sh-mode #'+sh/open-repl)
|
||||||
(set-lookup-handlers! 'sh-mode :documentation #'+sh-lookup-documentation-handler)
|
(set-lookup-handlers! 'sh-mode :documentation #'+sh-lookup-documentation-handler)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue