chore(languages): tidy up buffer-local setq statements

This commit is contained in:
2022-07-18 22:20:08 +01:00
parent a3c384027d
commit 66cf3de9dc
27 changed files with 46 additions and 46 deletions

View File

@@ -18,7 +18,7 @@
:preface
(defun siren-applescript-mode-setup ()
(run-hooks 'prog-mode-hook)
(setq tab-width 4)
(setq-local tab-width 4)
(highlight-symbol-mode -1)
(subword-mode +1)))

View File

@@ -27,7 +27,7 @@
(file-exists-p (coffee-compiled-file-name (buffer-file-name)))
(coffee-cos-mode t))
(setq tab-width 2)
(setq-local tab-width 2)
(subword-mode +1)))
(provide 'siren-coffee)

View File

@@ -22,7 +22,7 @@
:preface
(defun siren-conf-mode-setup ()
(run-hooks 'prog-mode-hook)
(setq tab-width 2)))
(setq-local tab-width 2)))
(provide 'siren-conf)
;;; siren-conf.el ends here

View File

@@ -22,7 +22,7 @@
:preface
(defun siren-css-mode-setup ()
(setq tab-width 2)
(setq-local tab-width 2)
(tree-sitter-mode +1)
(prettier-js-mode)

View File

@@ -16,7 +16,7 @@
:preface
(defun siren-feature-mode-setup ()
(run-hooks 'prog-mode-hook)
(setq tab-width 2)))
(setq-local tab-width 2)))
(provide 'siren-cucumber)
;;; siren-cucumber.el ends here

View File

@@ -27,7 +27,7 @@
;; (eldoc-mode +1)
;; (siren-recompile-elc-on-save)
;; (rainbow-mode +1)
;; (setq mode-name "EL")
;; (setq-local mode-name "EL")
;; (siren-conditional-emacs-lisp-checker)
)

View File

@@ -13,9 +13,9 @@
:preface
(defun siren-groovy-mode-setup ()
(setq groovy-highlight-assignments t
groovy-indent-offset 4
tab-width 4)
(setq-local groovy-highlight-assignments t
groovy-indent-offset 4
tab-width 4)
(subword-mode +1)))

View File

@@ -12,7 +12,7 @@
:preface
(defun siren-haml-mode-setup ()
(setq tab-width 2)))
(setq-local tab-width 2)))
(provide 'siren-haml)
;;; siren-haml.el ends here

View File

@@ -28,9 +28,9 @@
(defun siren-js-mode-setup ()
"Default tweaks for `js-mode'."
(let ((width 2))
(setq js-indent-level width
indent-level width
tab-width width))
(setq-local js-indent-level width
indent-level width
tab-width width))
(tree-sitter-mode +1)
(subword-mode)

View File

@@ -27,9 +27,9 @@
"Default tweaks for `json-mode'."
(let ((width 2))
(setq js-indent-level width
json-reformat:indent-width width
tab-width width))
(setq-local js-indent-level width
json-reformat:indent-width width
tab-width width))
(tree-sitter-mode +1)))

View File

@@ -12,8 +12,8 @@
:preface
(defun siren-lua-mode-setup ()
(setq lua-indent-level 2
whitespace-action '(auto-cleanup))
(setq-local lua-indent-level 2
whitespace-action '(auto-cleanup))
(subword-mode +1)))

View File

@@ -22,7 +22,7 @@
(defun siren-makefile-mode-setup ()
(subword-mode +1)
(siren-display-indentation -1)
(setq tab-width 4))
(setq-local tab-width 4))
:init
(add-to-list 'siren-indent-sensitive-modes 'makefile-mode))

View File

@@ -16,7 +16,7 @@
:preface
(defun siren-nginx-mode-setup ()
(setq tab-width 4)))
(setq-local tab-width 4)))
(use-package company-nginx
:hook

View File

@@ -16,7 +16,7 @@
:preface
(defun siren-plantuml-mode-setup ()
(setq tab-width 2)))
(setq-local tab-width 2)))
(provide 'siren-plantuml)
;;; siren-plantuml.el ends here

View File

@@ -19,7 +19,8 @@
:preface
(defun siren-protobuf-mode-setup ()
(run-hooks 'prog-mode-hook)
(setq tab-width 2)
(setq-local tab-width 2)
(c-add-style "siren" '((c-basic-offset . 2)
(indent-tabs-mode . nil)) t)

View File

@@ -23,7 +23,7 @@
:preface
(defun siren-rust-mode-setup ()
(setq rust-format-on-save t)
(setq-local rust-format-on-save t)
(tree-sitter-mode +1)
(lsp-deferred)

View File

@@ -36,8 +36,7 @@
:preface
(defun siren-sh-mode-setup ()
(setq tab-width 2
whitespace-action '(auto-cleanup))
(setq-local tab-width 2)
(subword-mode +1)
(tree-sitter-mode +1)))

View File

@@ -15,7 +15,7 @@
:preface
(defun siren-sql-mode-setup ()
(setq tab-width 2)))
(setq-local tab-width 2)))
(use-package lsp-sqls
:straight lsp-mode

View File

@@ -16,7 +16,7 @@
:preface
(defun siren-ssh-config-mode-setup ()
(run-hooks 'prog-mode-hook)
(setq tab-width 2)))
(setq-local tab-width 2)))
(provide 'siren-ssh-config)
;;; siren-ssh-config.el ends here

View File

@@ -15,7 +15,7 @@
:preface
(defun siren-thrift-mode-setup ()
(run-hooks 'prog-mode-hook)
(setq tab-width 2)
(setq-local tab-width 2)
(subword-mode +1)))

View File

@@ -17,7 +17,7 @@
:preface
(defun siren-toml-mode-setup ()
(run-hooks 'prog-mode-hook)
(setq tab-width 2)
(setq-local tab-width 2)
(prettier-js-mode)))
(provide 'siren-toml)

View File

@@ -27,9 +27,9 @@
:preface
(defun siren-typescript-mode-setup ()
(let ((width 2))
(setq typescript-indent-level width
indent-level width
tab-width width))
(setq-local typescript-indent-level width
indent-level width
tab-width width))
(lsp-deferred)
(subword-mode +1)
@@ -49,8 +49,8 @@
(interactive)
(tide-setup)
(setq flycheck-check-syntax-automatically '(save mode-enabled)
company-tooltip-align-annotations t)
(setq-local flycheck-check-syntax-automatically '(save mode-enabled)
company-tooltip-align-annotations t)
(tree-sitter-mode +1)
(prettier-js-mode +1)

View File

@@ -34,7 +34,7 @@
:preface
(defun siren-web-mode-setup ()
"Default tweaks for `web-mode'."
(setq tab-width 2)
(setq-local tab-width 2)
(when (version< emacs-version "27.0")
(siren-display-fill-column -1))

View File

@@ -21,7 +21,7 @@
:preface
(defun siren-xml-setup ()
(run-hooks 'prog-mode-hook)
(setq tab-width 2)
(setq-local tab-width 2)
(prettier-js-mode)))
(provide 'siren-xml)

View File

@@ -22,8 +22,8 @@
(defun siren-yaml-mode-setup ()
(run-hooks 'prog-mode-hook)
(setq tab-width 2)
(subword-mode +1)))
(setq-local tab-width 2)
(subword-mode t)))
(use-package lsp-yaml
:straight lsp-mode

View File

@@ -20,7 +20,7 @@
;; Highlight indentation if we are not indenting with real tabs.
(if (not indent-tabs-mode)
(siren-display-indentation 1))
(siren-display-indentation t))
(hl-line-mode t)
(whitespace-mode t))

View File

@@ -89,13 +89,13 @@
org-emphasis-regexp-components)
(auto-fill-mode t)
(siren-display-fill-column)
(siren-display-indentation)
(siren-display-line-numbers)
(flyspell-mode)
(smartparens-mode +1)
(visual-line-mode +1)
(whitespace-mode +1))
(siren-display-fill-column t)
(siren-display-indentation t)
(siren-display-line-numbers t)
(flyspell-mode t)
(smartparens-mode t)
(visual-line-mode t)
(whitespace-mode t))
:config
(require 'org-mouse)