File tree Expand file tree Collapse file tree
docs/manual/release-notes
modules/plugins/utility/ccc Expand file tree Collapse file tree Original file line number Diff line number Diff line change 101101 - ` typst-preview.nvim ` : lazy-load.
102102 - ` vim-illuminate ` : lazy-load.
103103 - ` which-key.nvim ` : lazy-load.
104+ - ` ccc-nvim ` : lazy-load.
104105- ` plugins/git/octo-nvim ` : init.
105106
106107[ gmvar] ( https://github.com/gmvar ) :
Original file line number Diff line number Diff line change 44 ...
55} : let
66 inherit ( lib . modules ) mkIf ;
7- inherit ( lib . nvim . dag ) entryAnywhere ;
8- inherit ( lib . nvim . lua ) toLuaObject ;
7+ inherit ( lib . attrsets ) optionalAttrs ;
98 cfg = config . vim . utility . ccc ;
109in {
1110 config = mkIf cfg . enable {
12- vim . startPlugins = [ "ccc-nvim" ] ;
13-
14- vim . pluginRC . ccc = entryAnywhere ''
15- local ccc = require("ccc")
16- ccc.setup(${ toLuaObject cfg . setupOpts } )
17- '' ;
11+ vim . lazy . plugins . "ccc-nvim" =
12+ {
13+ package = "ccc-nvim" ;
14+ setupModule = "ccc" ;
15+ beforeSetup = ''local ccc = require("ccc")'' ;
16+ # Omitted CccHighliterDisable since it would only ever be called as the first command
17+ # if auto_enable was enabled, which would make the cmd option useless anyways
18+ cmd = [ "CccPick" "CccConvert" "CccHighlighterEnable" "CccHighlighterToggle" ] ;
19+ inherit ( cfg ) setupOpts ;
20+ }
21+ // optionalAttrs ( cfg . setupOpts . highlighter . auto_enable or false ) {
22+ event = [
23+ {
24+ event = "User" ;
25+ pattern = "LazyFile" ;
26+ }
27+ ] ;
28+ } ;
1829 } ;
1930}
You can’t perform that action at this time.
0 commit comments