mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
I've set `lexical-binding` to `nil` in all Emacs Lisp files to suppress the warnings introduced in Emacs 31 requiring all elisp files to have a `lexical-binding` comment. This retains the default behavior of dynamic binding when no `lexical-binding` comment is present. With it set to `t` across the board, various things break, and fixing those is a task for another day.
66 lines
1.4 KiB
EmacsLisp
66 lines
1.4 KiB
EmacsLisp
;;; siren-css.el --- jimeh's Emacs Siren: css-mode configuration. -*- lexical-binding: nil; -*-
|
|
|
|
;;; Commentary:
|
|
|
|
;; Basic configuration for css-mode.
|
|
|
|
;;; Code:
|
|
|
|
(require 'siren-lsp)
|
|
|
|
(use-package css-mode
|
|
:mode "\\.css\\'"
|
|
|
|
:hook
|
|
(css-mode . siren-css-mode-setup)
|
|
|
|
:custom
|
|
(css-indent-offset 2)
|
|
|
|
:custom-face
|
|
(css-selector ((t (:inherit font-lock-keyword-face :foreground nil))))
|
|
(css-property ((t (:inherit font-lock-constant-face :foreground nil))))
|
|
|
|
:preface
|
|
(defun siren-css-mode-setup ()
|
|
(setq-local tab-width css-indent-offset)))
|
|
|
|
(when (fboundp 'css-ts-mode)
|
|
(use-package css-ts-mode
|
|
:straight (:type built-in)
|
|
:mode "\\.css\\'"
|
|
:hook
|
|
(css-ts-mode . siren-css-ts-mode-setup)
|
|
|
|
:general
|
|
(:keymaps 'css-ts-mode-map
|
|
"C-j" 'newline-and-indent)
|
|
|
|
:custom
|
|
(css-indent-offset 2)
|
|
|
|
:custom-face
|
|
(css-selector ((t (:inherit font-lock-keyword-face :foreground nil))))
|
|
(css-property ((t (:inherit font-lock-constant-face :foreground nil))))
|
|
|
|
:preface
|
|
(defun siren-css-ts-mode-setup ()
|
|
(setq-local tab-width css-indent-offset))
|
|
|
|
:config
|
|
(siren-treesit-auto-ensure-grammar 'css)))
|
|
|
|
(use-package lsp-css
|
|
:straight lsp-mode
|
|
|
|
:hook
|
|
(css-mode . siren-lsp-css-mode-setup)
|
|
(css-ts-mode . siren-lsp-css-mode-setup)
|
|
|
|
:preface
|
|
(defun siren-lsp-css-mode-setup ()
|
|
(lsp-deferred)))
|
|
|
|
(provide 'siren-css)
|
|
;;; siren-css.el ends here
|