feat: allow doom-module-set to disable modules
This commit is contained in:
parent
c5188c4388
commit
10eb5db12d
1 changed files with 12 additions and 6 deletions
|
@ -176,14 +176,20 @@ following properties:
|
||||||
:flags [SYMBOL LIST] list of enabled category flags
|
:flags [SYMBOL LIST] list of enabled category flags
|
||||||
:path [STRING] path to category root directory
|
:path [STRING] path to category root directory
|
||||||
|
|
||||||
|
If PLIST consists of a single nil, unset and disable CATEGORY MODULE.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
(doom-module-set :lang 'haskell :flags '(+lsp))"
|
(doom-module-set :lang 'haskell :flags '(+lsp))"
|
||||||
|
(if (car plist)
|
||||||
|
(progn
|
||||||
;; Doom caches flags and features using symbol plists for fast lookups in
|
;; Doom caches flags and features using symbol plists for fast lookups in
|
||||||
;; `modulep!'. plists lack the overhead, and are much faster for datasets this
|
;; `modulep!'. plists lack the overhead, and are much faster for datasets this
|
||||||
;; small. The format of this case is (cons FEATURES FLAGS)
|
;; small. The format of this case is (cons FEATURES FLAGS)
|
||||||
(put category module (cons t (plist-get plist :flags)))
|
(put category module (cons t (plist-get plist :flags)))
|
||||||
;; But the hash table will always been Doom's formal storage for modules.
|
;; But the hash table will always been Doom's formal storage for modules.
|
||||||
(puthash (cons category module) plist doom-modules))
|
(puthash (cons category module) plist doom-modules))
|
||||||
|
(remhash (cons category module) doom-modules)
|
||||||
|
(cl-remf (symbol-plist category) module)))
|
||||||
|
|
||||||
(defun doom-module-expand-path (category module &optional file)
|
(defun doom-module-expand-path (category module &optional file)
|
||||||
"Expands a path to FILE relative to CATEGORY and MODULE.
|
"Expands a path to FILE relative to CATEGORY and MODULE.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue