mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-24 16:30:58 -05:00
BREAKING CHANGE: Moves ws-butler, dtrt-indent, and whitespace defaults out of Doom's core and into a new module. ws-butler is gated behind +trim and dtrt-indent behind +guess. Users who depend on/like these packages will need to enable the new module and their respective flags (which is the default going forward). This change is motivated by an ongoing effort to slim down Doom's core (by (re)moving non-essentials from it). This also addresses an issue where dtrt-indent would vastly increase load times for some major-modes (e.g. elixir-mode & elm-mode, see #7537) by restricting it to non-project files and non-read-only buffers AND excludign those two major modes from indent guessing. Fix: #8516 Fix: #7537
30 lines
1.2 KiB
EmacsLisp
30 lines
1.2 KiB
EmacsLisp
;;; lang/graphviz/config.el -*- lexical-binding: t; -*-
|
|
|
|
(use-package! graphviz-dot-mode
|
|
:mode "\\.\\(?:nw\\|rack\\)diag\\'"
|
|
:init
|
|
(after! org-src
|
|
(add-to-list 'org-src-lang-modes '("dot" . graphviz-dot)))
|
|
:config
|
|
(set-company-backend! 'graphviz-dot-mode 'company-graphviz-dot-backend)
|
|
(set-formatter! 'graphviz-dot #'+graphviz-formatter :modes '(graphviz-dot-mode))
|
|
|
|
(when (modulep! :checkers syntax -flymake)
|
|
(after! flycheck
|
|
(eval '(flycheck-define-checker graphviz-dot
|
|
"A checker using graphviz dot."
|
|
:command ("dot")
|
|
:standard-input t
|
|
:error-patterns ((error line-start "Error: <stdin>: " (message "syntax error in line " line (* nonl)))
|
|
;; I have no idea if this can actually be printed
|
|
(error line-start "Error: <stdin>: " (message)))
|
|
:modes graphviz-dot-mode))
|
|
(add-to-list 'flycheck-checkers 'graphviz-dot)))
|
|
|
|
(map! :map graphviz-dot-mode-map
|
|
:localleader
|
|
:desc "External view" :nv "e" #'graphviz-dot-view
|
|
:desc "Preview" :nv "p" #'graphviz-dot-preview
|
|
:prefix ("t" . "toggle")
|
|
:desc "Preview" :nv "p" #'+graphviz/toggle-preview))
|