File tree Expand file tree Collapse file tree 3 files changed +19
-2
lines changed
Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 5959
6060 lsp . solargraph . rubocopYaml = mkOption {
6161 example = "YAML configuration for the rubocop reporter" ;
62- type = types . lines ;
62+ type = types . codeMirrorLines "yaml" ;
6363 default = ''
6464 # Disable whitespace-related rules that don't play well with notebooks
6565 Layout/EmptyLines:
Original file line number Diff line number Diff line change 44 convertType = target : type :
55 if ( type . name == "str" ) then { type = "string" ; }
66 else if ( type . name == "separatedString" ) then { type = "lines" ; }
7+ else if ( type . name == "codeMirrorLines" ) then { type = "lines" ; codeMirrorMode = type . codeMirrorMode ; }
78 else if ( type . name == "anything" ) then { type = "any" ; }
89 else if ( type . name == "bool" ) then { type = "boolean" ; }
910 else if ( type . name == "attrs" ) then {
Original file line number Diff line number Diff line change 77
88config :
99
10- lib . evalModules {
10+ let
11+ extendedLib = lib . extend ( final : prev : {
12+ types = prev . types // {
13+ codeMirrorLines = mode : prev . mkOptionType {
14+ name = "codeMirrorLines" ;
15+ description = "string (${ mode } )" ;
16+ check = builtins . isString ;
17+ merge = prev . options . mergeEqualOption ;
18+ } // { codeMirrorMode = mode ; } ;
19+ } ;
20+ } ) ;
21+
22+ in
23+
24+ extendedLib . evalModules {
1125 specialArgs = {
26+ lib = extendedLib ;
27+
1228 nixosOptionsToSettingsSchema = pkgsStable . callPackage ./nixos-options-to-settings-schema.nix { } ;
1329 boilerplate = {
1430 attrsTitle = "Notebook attributes" ;
You can’t perform that action at this time.
0 commit comments