Skip to content

Commit

Permalink
fix: limit bind of winny/shellcheck-disable-at-line to sh-mode-map
Browse files Browse the repository at this point in the history
  • Loading branch information
winny- committed Sep 9, 2024
1 parent 2cc8024 commit 0b08341
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions configuration.org
Original file line number Diff line number Diff line change
Expand Up @@ -2108,7 +2108,8 @@ This unwraps a paragraph into one line.
Create a line similar to =# shellcheck disable=SC1234= above the current line
in order to calm down Shellcheck.
#+begin_src emacs-lisp
(require 'cl)
(require 'cl) ; for cl-loop
(require 'sh-script) ; For sh-mode-map

(defun winny--extract-shellcheck-error (err)
(and-let* (((eq (flycheck-error-checker err) 'sh-shellcheck)))
Expand All @@ -2129,7 +2130,7 @@ in order to calm down Shellcheck.
(newline-and-indent)))))
(add-hook 'sh-mode-hook
(defun winny--bind-shellcheck-disable ()
(global-set-key (kbd "C-c ! k") 'winny/shellcheck-disable-at-line)))
(define-key sh-mode-map (kbd "C-c ! k") 'winny/shellcheck-disable-at-line)))
#+end_src
** Snippets
Using [[https://github.com/joaotavora/yasnippet][Yasnippets]]. See the [[http://joaotavora.github.io/yasnippet/][documentation]].
Expand Down

0 comments on commit 0b08341

Please sign in to comment.