Files
.emacs.d/modules/languages/siren-caddyfile.el
Jim Myhrberg 25b6493530 fix(completion/copilot): disable whitespace-mode to fix cursor placement issue
When whitespace-mode is enabled, single-line copilot completions makes
the cursor look like it's at the end of the completion rather than in
it's real position.

Issue with gifs showing the behavior is here:
https://github.com/zerolfx/copilot.el/issues/28

For the most part I should be able to live without whitespace-mode in
day to day use, and improvements to the highlight-indent-guides setup
should help.

And worst case, whitespace-mode can always be toggled easily enough.
2022-06-18 00:48:00 +01:00

34 lines
953 B
EmacsLisp

;;; siren-caddyfile.el --- jimeh's Emacs Siren: caddyfile-mode configuration.
;;; Commentary:
;; Basic configuration for caddyfile-mode.
;;; Code:
(use-package caddyfile-mode
:mode
("Caddyfile\\'" . caddyfile-mode)
("caddy\\.conf\\'" . caddyfile-mode)
("\\.caddy\\'" . caddyfile-mode)
:hook
(caddyfile-mode . siren-caddyfile-mode-setup)
:preface
(defun siren-caddyfile-mode-setup ()
(setq-local tab-width 4
indent-tabs-mode nil)
;; TODO: Fix this horrible Hock. To work around prog-mode hooks running
;; before current method, enabling whitespace-mode before the local
;; indent-tabs-mode var is set to nil. Hence we need to toggle
;; whitespace-mode off, and then on again to fix it's complaints about a
;; space indentation.
(when (bound-and-true-p whitespace-mode)
(whitespace-mode -1)
(whitespace-mode +1))))
(provide 'siren-caddyfile)
;;; siren-caddyfile.el ends here