fatty 0.99.0 → 0.99.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.org +11 -29
  3. data/README.md +2207 -18
  4. data/README.org +2066 -104
  5. data/exe/fatty +236 -93
  6. data/help/help.md +233 -0
  7. data/lib/fatty/action.rb +3 -7
  8. data/lib/fatty/actionable.rb +2 -0
  9. data/lib/fatty/alert.rb +65 -39
  10. data/lib/fatty/ansi/renderer.rb +26 -6
  11. data/lib/fatty/ansi.rb +1 -0
  12. data/lib/fatty/api/alert.rb +15 -0
  13. data/lib/fatty/api/choose.rb +145 -0
  14. data/lib/fatty/api/environment.rb +12 -0
  15. data/lib/fatty/api/keytest.rb +11 -0
  16. data/lib/fatty/api/menu.rb +104 -0
  17. data/lib/fatty/api/output.rb +55 -0
  18. data/lib/fatty/api/progress.rb +24 -0
  19. data/lib/fatty/api/prompt.rb +77 -0
  20. data/lib/fatty/api/status.rb +55 -0
  21. data/lib/fatty/api.rb +38 -0
  22. data/lib/fatty/callback_environment.rb +74 -0
  23. data/lib/fatty/colors/color.rb +366 -232
  24. data/lib/fatty/colors/pairs.rb +2 -0
  25. data/lib/fatty/command.rb +78 -0
  26. data/lib/fatty/config.rb +227 -39
  27. data/lib/fatty/config_files/config.yml +4 -12
  28. data/lib/fatty/config_files/keydefs.yml +13 -23
  29. data/lib/fatty/config_files/themes/capuchin_monk.yml +140 -0
  30. data/lib/fatty/config_files/themes/catppuccin_latte.yml +140 -0
  31. data/lib/fatty/config_files/themes/catppuccin_mocha.yml +140 -0
  32. data/lib/fatty/config_files/themes/cyberpunk.yml +141 -0
  33. data/lib/fatty/config_files/themes/dracula.yml +140 -0
  34. data/lib/fatty/config_files/themes/everforest_dark.yml +140 -0
  35. data/lib/fatty/config_files/themes/gruvbox_dark.yml +140 -0
  36. data/lib/fatty/config_files/themes/gruvbox_light.yml +140 -0
  37. data/lib/fatty/config_files/themes/mono.yml +119 -47
  38. data/lib/fatty/config_files/themes/monokai.yml +140 -0
  39. data/lib/fatty/config_files/themes/nordic.yml +1 -0
  40. data/lib/fatty/config_files/themes/onedark.yml +140 -0
  41. data/lib/fatty/config_files/themes/solarized_dark.yml +1 -0
  42. data/lib/fatty/config_files/themes/solarized_light.yml +140 -0
  43. data/lib/fatty/config_files/themes/terminal.yml +67 -0
  44. data/lib/fatty/config_files/themes/tokyo_night.yml +140 -0
  45. data/lib/fatty/config_files/themes/wordperfect.yml +80 -9
  46. data/lib/fatty/core_ext/hash.rb +19 -0
  47. data/lib/fatty/core_ext/string.rb +19 -12
  48. data/lib/fatty/core_ext.rb +1 -0
  49. data/lib/fatty/curses/context.rb +86 -84
  50. data/lib/fatty/curses/event_source.rb +128 -40
  51. data/lib/fatty/curses/key_decoder.rb +77 -11
  52. data/lib/fatty/env.rb +21 -20
  53. data/lib/fatty/help.rb +1 -29
  54. data/lib/fatty/history/entry.rb +2 -0
  55. data/lib/fatty/history.rb +17 -14
  56. data/lib/fatty/input_buffer.rb +71 -47
  57. data/lib/fatty/input_field.rb +216 -149
  58. data/lib/fatty/key_event.rb +67 -66
  59. data/lib/fatty/key_map.rb +54 -16
  60. data/lib/fatty/keymaps/emacs.rb +40 -6
  61. data/lib/fatty/log_formats/json.rb +2 -0
  62. data/lib/fatty/log_formats/text.rb +2 -0
  63. data/lib/fatty/logger.rb +7 -2
  64. data/lib/fatty/markdown/ansi_renderer.rb +75 -6
  65. data/lib/fatty/markdown/render.rb +2 -3
  66. data/lib/fatty/mouse_event.rb +142 -2
  67. data/lib/fatty/output_buffer.rb +2 -0
  68. data/lib/fatty/pager.rb +158 -47
  69. data/lib/fatty/progress.rb +417 -0
  70. data/lib/fatty/renderer/curses.rb +340 -184
  71. data/lib/fatty/renderer/truecolor.rb +266 -163
  72. data/lib/fatty/renderer.rb +115 -97
  73. data/lib/fatty/screen.rb +2 -0
  74. data/lib/fatty/session/alert_session.rb +39 -21
  75. data/lib/fatty/session/isearch_session.rb +92 -38
  76. data/lib/fatty/session/keytest_session.rb +105 -85
  77. data/lib/fatty/session/modal_session.rb +38 -1
  78. data/lib/fatty/session/output_session.rb +472 -21
  79. data/lib/fatty/session/popup_session.rb +251 -134
  80. data/lib/fatty/session/prompt_session.rb +68 -26
  81. data/lib/fatty/session/search_session.rb +79 -31
  82. data/lib/fatty/session/shell_session.rb +383 -368
  83. data/lib/fatty/session/status_session.rb +167 -0
  84. data/lib/fatty/session.rb +95 -95
  85. data/lib/fatty/terminal/popup_owner.rb +14 -11
  86. data/lib/fatty/terminal.rb +515 -813
  87. data/lib/fatty/themes/loader.rb +4 -2
  88. data/lib/fatty/themes/manager.rb +4 -0
  89. data/lib/fatty/themes/registry.rb +2 -0
  90. data/lib/fatty/themes/resolver.rb +175 -162
  91. data/lib/fatty/version.rb +1 -1
  92. data/lib/fatty/viewport.rb +8 -1
  93. data/lib/fatty.rb +35 -7
  94. metadata +42 -40
  95. data/.envrc +0 -2
  96. data/.simplecov +0 -23
  97. data/.yardopts +0 -4
  98. data/CHANGELOG.md +0 -34
  99. data/Rakefile +0 -15
  100. data/TODO.org +0 -163
  101. data/examples/markdown/native-markdown.md +0 -370
  102. data/examples/markdown/ox-gfm-markdown.md +0 -373
  103. data/examples/markdown/ox-gfm-markdown.org +0 -376
  104. data/fatty.gemspec +0 -42
  105. data/lib/fatty/accept_env.rb +0 -32
  106. data/lib/fatty/config_files/help.md +0 -120
  107. data/lib/fatty/config_files/help.org +0 -124
  108. data/lib/fatty/config_files/themes/wordperfect_light.yml +0 -77
  109. data/lib/fatty/menu_env.rb +0 -22
  110. data/lib/fatty/session/input_session.rb +0 -99
  111. data/lib/fatty/sessions.rb +0 -14
  112. data/lib/fatty/terminal/progress.rb +0 -374
  113. data/lib/fatty/view/alert_view.rb +0 -14
  114. data/lib/fatty/view/cursor_view.rb +0 -18
  115. data/lib/fatty/view/input_view.rb +0 -9
  116. data/lib/fatty/view/output_view.rb +0 -9
  117. data/lib/fatty/view/status_view.rb +0 -14
  118. data/lib/fatty/view.rb +0 -33
  119. data/lib/fatty/views.rb +0 -9
  120. data/sig/fatty.rbs +0 -4
@@ -0,0 +1,140 @@
1
+ name: onedark
2
+ inherit: null
3
+ markdown_code_theme: github_dark
4
+
5
+ output:
6
+ fg: "#abb2bf"
7
+ bg: "#282c34"
8
+
9
+ input:
10
+ fg: "#abb2bf"
11
+ bg: "#3a3f4b"
12
+ attrs: [bold]
13
+
14
+ input_suggestion:
15
+ fg: "#5c6370"
16
+ bg: "#3a3f4b"
17
+ attrs: [dim]
18
+
19
+ cursor:
20
+ fg: "#282c34"
21
+ bg: "#c678dd"
22
+
23
+ region:
24
+ fg: "#282c34"
25
+ bg: "#61afef"
26
+
27
+ good:
28
+ fg: "#98c379"
29
+ bg: "#282c34"
30
+
31
+ info:
32
+ fg: "#abb2bf"
33
+ bg: "#282c34"
34
+
35
+ warn:
36
+ fg: "#282c34"
37
+ bg: "#e5c07b"
38
+
39
+ error:
40
+ fg: "#282c34"
41
+ bg: "#e06c75"
42
+
43
+ pager_status:
44
+ fg: "#282c34"
45
+ bg: "#98c379"
46
+
47
+ search_input:
48
+ fg: "#282c34"
49
+ bg: "#56b6c2"
50
+
51
+ match_current:
52
+ fg: "#282c34"
53
+ bg: "#e5c07b"
54
+
55
+ match_other:
56
+ fg: "#282c34"
57
+ bg: "#c678dd"
58
+
59
+ popup:
60
+ fg: "#abb2bf"
61
+ bg: "#3a3f4b"
62
+
63
+ popup_input:
64
+ fg: "#abb2bf"
65
+ bg: "#21252b"
66
+
67
+ popup_counts:
68
+ fg: "#282c34"
69
+ bg: "#abb2bf"
70
+
71
+ popup_selection:
72
+ fg: "#282c34"
73
+ bg: "#61afef"
74
+
75
+ popup_frame:
76
+ fg: "#56b6c2"
77
+ bg: "#3a3f4b"
78
+ border: single
79
+ corners: rounded
80
+
81
+ markdown_h1:
82
+ fg: "#c678dd"
83
+ bg: "#282c34"
84
+ attrs: [bold]
85
+
86
+ markdown_h2:
87
+ fg: "#61afef"
88
+ bg: "#282c34"
89
+ attrs: [bold]
90
+
91
+ markdown_h3:
92
+ fg: "#98c379"
93
+ bg: "#282c34"
94
+ attrs: [bold]
95
+
96
+ markdown_code:
97
+ fg: "#98c379"
98
+ bg: "#3a3f4b"
99
+
100
+ markdown_code_gutter:
101
+ fg: "#5c6370"
102
+ bg: "#3a3f4b"
103
+ attrs: [dim]
104
+
105
+ markdown_strong:
106
+ fg: "#dcdfe4"
107
+ bg: "#282c34"
108
+ attrs: [bold]
109
+
110
+ markdown_emphasis:
111
+ fg: "#abb2bf"
112
+ bg: "#282c34"
113
+ attrs: [italic]
114
+
115
+ markdown_link:
116
+ fg: "#61afef"
117
+ bg: "#282c34"
118
+ attrs: [underline]
119
+
120
+ markdown_url:
121
+ fg: "#56b6c2"
122
+ bg: "#282c34"
123
+
124
+ markdown_quote_gutter:
125
+ fg: "#5c6370"
126
+ bg: "#282c34"
127
+
128
+ markdown_highlight:
129
+ fg: "#282c34"
130
+ bg: "#e5c07b"
131
+
132
+ markdown_table_header:
133
+ fg: "#dcdfe4"
134
+ bg: "#3a3f4b"
135
+ attrs: [bold]
136
+
137
+ markdown_hrule:
138
+ fg: "#5c6370"
139
+ bg: "#282c34"
140
+ attrs: [dim]
@@ -1,5 +1,6 @@
1
1
  name: solarized_dark
2
2
  inherit: null
3
+ markdown_code_theme: solarized_dark
3
4
 
4
5
  output:
5
6
  fg: "#839496"
@@ -0,0 +1,140 @@
1
+ name: solarized_light
2
+ inherit: null
3
+ markdown_code_theme: github
4
+
5
+ output:
6
+ fg: "#657b83"
7
+ bg: "#fdf6e3"
8
+
9
+ input:
10
+ fg: "#073642"
11
+ bg: "#eee8d5"
12
+ attrs: [bold]
13
+
14
+ input_suggestion:
15
+ fg: "#93a1a1"
16
+ bg: "#eee8d5"
17
+ attrs: [dim]
18
+
19
+ cursor:
20
+ fg: "#fdf6e3"
21
+ bg: "#268bd2"
22
+
23
+ region:
24
+ fg: "#fdf6e3"
25
+ bg: "#268bd2"
26
+
27
+ good:
28
+ fg: "#859900"
29
+ bg: "#fdf6e3"
30
+
31
+ info:
32
+ fg: "#657b83"
33
+ bg: "#fdf6e3"
34
+
35
+ warn:
36
+ fg: "#073642"
37
+ bg: "#b58900"
38
+
39
+ error:
40
+ fg: "#fdf6e3"
41
+ bg: "#dc322f"
42
+
43
+ pager_status:
44
+ fg: "#fdf6e3"
45
+ bg: "#859900"
46
+
47
+ search_input:
48
+ fg: "#fdf6e3"
49
+ bg: "#268bd2"
50
+
51
+ match_current:
52
+ fg: "#073642"
53
+ bg: "#b58900"
54
+
55
+ match_other:
56
+ fg: "#073642"
57
+ bg: "#93a1a1"
58
+
59
+ popup:
60
+ fg: "#657b83"
61
+ bg: "#eee8d5"
62
+
63
+ popup_input:
64
+ fg: "#073642"
65
+ bg: "#fdf6e3"
66
+
67
+ popup_counts:
68
+ fg: "#fdf6e3"
69
+ bg: "#586e75"
70
+
71
+ popup_selection:
72
+ fg: "#fdf6e3"
73
+ bg: "#268bd2"
74
+
75
+ popup_frame:
76
+ fg: "#268bd2"
77
+ bg: "#eee8d5"
78
+ border: single
79
+ corners: rounded
80
+
81
+ markdown_h1:
82
+ fg: "#2aa198"
83
+ bg: "#fdf6e3"
84
+ attrs: [bold]
85
+
86
+ markdown_h2:
87
+ fg: "#268bd2"
88
+ bg: "#fdf6e3"
89
+ attrs: [bold]
90
+
91
+ markdown_h3:
92
+ fg: "#859900"
93
+ bg: "#fdf6e3"
94
+ attrs: [bold]
95
+
96
+ markdown_code:
97
+ fg: "#859900"
98
+ bg: "#eee8d5"
99
+
100
+ markdown_code_gutter:
101
+ fg: "#93a1a1"
102
+ bg: "#eee8d5"
103
+ attrs: [dim]
104
+
105
+ markdown_strong:
106
+ fg: "#073642"
107
+ bg: "#fdf6e3"
108
+ attrs: [bold]
109
+
110
+ markdown_emphasis:
111
+ fg: "#657b83"
112
+ bg: "#fdf6e3"
113
+ attrs: [italic]
114
+
115
+ markdown_link:
116
+ fg: "#268bd2"
117
+ bg: "#fdf6e3"
118
+ attrs: [underline]
119
+
120
+ markdown_url:
121
+ fg: "#2aa198"
122
+ bg: "#fdf6e3"
123
+
124
+ markdown_quote_gutter:
125
+ fg: "#93a1a1"
126
+ bg: "#fdf6e3"
127
+
128
+ markdown_highlight:
129
+ fg: "#073642"
130
+ bg: "#b58900"
131
+
132
+ markdown_table_header:
133
+ fg: "#073642"
134
+ bg: "#eee8d5"
135
+ attrs: [bold]
136
+
137
+ markdown_hrule:
138
+ fg: "#93a1a1"
139
+ bg: "#fdf6e3"
140
+ attrs: [dim]
@@ -1,4 +1,6 @@
1
1
  # lib/fatty/config_files/themes/terminal.yml
2
+
3
+ # This theme is meant to inherit whatever color scheme the invoking terminal uses.
2
4
  name: terminal
3
5
  inherit: null
4
6
 
@@ -88,3 +90,68 @@ popup_counts:
88
90
  fg: default
89
91
  bg: default
90
92
  attrs: [bold]
93
+
94
+ markdown_h1:
95
+ fg: default
96
+ bg: default
97
+ attrs: [bold]
98
+
99
+ markdown_h2:
100
+ fg: default
101
+ bg: default
102
+ attrs: [bold]
103
+
104
+ markdown_h3:
105
+ fg: default
106
+ bg: default
107
+ attrs: [bold]
108
+
109
+ markdown_code:
110
+ fg: default
111
+ bg: default
112
+ attrs: [reverse]
113
+
114
+ markdown_code_gutter:
115
+ fg: default
116
+ bg: default
117
+ attrs: [dim]
118
+
119
+ markdown_strong:
120
+ fg: default
121
+ bg: default
122
+ attrs: [bold]
123
+
124
+ markdown_emphasis:
125
+ fg: default
126
+ bg: default
127
+ attrs: [italic]
128
+
129
+ markdown_link:
130
+ fg: default
131
+ bg: default
132
+ attrs: [underline]
133
+
134
+ markdown_url:
135
+ fg: default
136
+ bg: default
137
+ attrs: [underline]
138
+
139
+ markdown_quote_gutter:
140
+ fg: default
141
+ bg: default
142
+ attrs: [dim]
143
+
144
+ markdown_highlight:
145
+ fg: default
146
+ bg: default
147
+ attrs: [reverse]
148
+
149
+ markdown_table_header:
150
+ fg: default
151
+ bg: default
152
+ attrs: [bold]
153
+
154
+ markdown_hrule:
155
+ fg: default
156
+ bg: default
157
+ attrs: [dim]
@@ -0,0 +1,140 @@
1
+ name: tokyo_night
2
+ inherit: null
3
+ markdown_code_theme: github_dark
4
+
5
+ output:
6
+ fg: "#c0caf5"
7
+ bg: "#1a1b26"
8
+
9
+ input:
10
+ fg: "#c0caf5"
11
+ bg: "#24283b"
12
+ attrs: [bold]
13
+
14
+ input_suggestion:
15
+ fg: "#565f89"
16
+ bg: "#24283b"
17
+ attrs: [dim]
18
+
19
+ cursor:
20
+ fg: "#1a1b26"
21
+ bg: "#bb9af7"
22
+
23
+ region:
24
+ fg: "#1a1b26"
25
+ bg: "#7aa2f7"
26
+
27
+ good:
28
+ fg: "#9ece6a"
29
+ bg: "#1a1b26"
30
+
31
+ info:
32
+ fg: "#c0caf5"
33
+ bg: "#1a1b26"
34
+
35
+ warn:
36
+ fg: "#1a1b26"
37
+ bg: "#e0af68"
38
+
39
+ error:
40
+ fg: "#1a1b26"
41
+ bg: "#f7768e"
42
+
43
+ pager_status:
44
+ fg: "#1a1b26"
45
+ bg: "#9ece6a"
46
+
47
+ search_input:
48
+ fg: "#1a1b26"
49
+ bg: "#7dcfff"
50
+
51
+ match_current:
52
+ fg: "#1a1b26"
53
+ bg: "#e0af68"
54
+
55
+ match_other:
56
+ fg: "#1a1b26"
57
+ bg: "#bb9af7"
58
+
59
+ popup:
60
+ fg: "#c0caf5"
61
+ bg: "#24283b"
62
+
63
+ popup_input:
64
+ fg: "#c0caf5"
65
+ bg: "#16161e"
66
+
67
+ popup_counts:
68
+ fg: "#1a1b26"
69
+ bg: "#c0caf5"
70
+
71
+ popup_selection:
72
+ fg: "#1a1b26"
73
+ bg: "#7aa2f7"
74
+
75
+ popup_frame:
76
+ fg: "#7dcfff"
77
+ bg: "#24283b"
78
+ border: single
79
+ corners: rounded
80
+
81
+ markdown_h1:
82
+ fg: "#bb9af7"
83
+ bg: "#1a1b26"
84
+ attrs: [bold]
85
+
86
+ markdown_h2:
87
+ fg: "#7aa2f7"
88
+ bg: "#1a1b26"
89
+ attrs: [bold]
90
+
91
+ markdown_h3:
92
+ fg: "#9ece6a"
93
+ bg: "#1a1b26"
94
+ attrs: [bold]
95
+
96
+ markdown_code:
97
+ fg: "#9ece6a"
98
+ bg: "#24283b"
99
+
100
+ markdown_code_gutter:
101
+ fg: "#565f89"
102
+ bg: "#24283b"
103
+ attrs: [dim]
104
+
105
+ markdown_strong:
106
+ fg: "#c0caf5"
107
+ bg: "#1a1b26"
108
+ attrs: [bold]
109
+
110
+ markdown_emphasis:
111
+ fg: "#c0caf5"
112
+ bg: "#1a1b26"
113
+ attrs: [italic]
114
+
115
+ markdown_link:
116
+ fg: "#7aa2f7"
117
+ bg: "#1a1b26"
118
+ attrs: [underline]
119
+
120
+ markdown_url:
121
+ fg: "#73daca"
122
+ bg: "#1a1b26"
123
+
124
+ markdown_quote_gutter:
125
+ fg: "#565f89"
126
+ bg: "#1a1b26"
127
+
128
+ markdown_highlight:
129
+ fg: "#1a1b26"
130
+ bg: "#e0af68"
131
+
132
+ markdown_table_header:
133
+ fg: "#c0caf5"
134
+ bg: "#24283b"
135
+ attrs: [bold]
136
+
137
+ markdown_hrule:
138
+ fg: "#414868"
139
+ bg: "#1a1b26"
140
+ attrs: [dim]
@@ -1,5 +1,6 @@
1
1
  name: wordperfect
2
2
  inherit: null
3
+ markdown_code_theme: github_dark
3
4
 
4
5
  output:
5
6
  fg: white
@@ -11,8 +12,9 @@ input:
11
12
  attrs: [bold]
12
13
 
13
14
  input_suggestion:
14
- fg: lightgray
15
+ fg: lightblue
15
16
  bg: navy
17
+ attrs: [dim]
16
18
 
17
19
  cursor:
18
20
  fg: white
@@ -23,35 +25,40 @@ region:
23
25
  bg: yellow
24
26
 
25
27
  good:
26
- fg: green
28
+ fg: lightgreen
27
29
  bg: navy
30
+ attrs: [bold]
28
31
 
29
32
  info:
30
- fg: black
33
+ fg: white
31
34
  bg: navy
32
35
 
33
36
  warn:
34
- fg: black
35
- bg: magenta
37
+ fg: orange
38
+ bg: navy
39
+ attrs: [bold]
36
40
 
37
41
  error:
38
42
  fg: white
39
43
  bg: red
44
+ attrs: [bold]
40
45
 
41
46
  pager_status:
42
47
  fg: black
43
48
  bg: lightgreen
49
+ attrs: [bold]
44
50
 
45
51
  search_input:
46
52
  fg: black
47
53
  bg: cyan
48
54
 
49
55
  match_current:
50
- fg: black
56
+ fg: white
51
57
  bg: red
58
+ attrs: [bold]
52
59
 
53
60
  match_other:
54
- fg: grey
61
+ fg: black
55
62
  bg: pink
56
63
 
57
64
  popup:
@@ -61,17 +68,81 @@ popup:
61
68
  popup_input:
62
69
  fg: white
63
70
  bg: navy
71
+ attrs: [bold]
64
72
 
65
73
  popup_counts:
66
74
  fg: navy
67
75
  bg: red
76
+ attrs: [bold]
68
77
 
69
78
  popup_selection:
70
79
  fg: navy
71
80
  bg: yellow
81
+ attrs: [bold]
72
82
 
73
83
  popup_frame:
74
- fg: navy
75
- bg: yellow
84
+ fg: yellow
85
+ bg: navy
76
86
  border: single
77
87
  corners: rounded
88
+
89
+ markdown_h1:
90
+ fg: red
91
+ bg: yellow
92
+ attrs: [bold]
93
+
94
+ markdown_h2:
95
+ fg: black
96
+ bg: pink
97
+ attrs: [bold]
98
+
99
+ markdown_h3:
100
+ fg: lightgreen
101
+ bg: navy
102
+ attrs: [bold]
103
+
104
+ markdown_code:
105
+ fg: orange
106
+ bg: navy
107
+
108
+ markdown_code_gutter:
109
+ fg: lightblue
110
+ bg: navy
111
+ attrs: [dim]
112
+
113
+ markdown_strong:
114
+ fg: white
115
+ bg: navy
116
+ attrs: [bold]
117
+
118
+ markdown_emphasis:
119
+ fg: white
120
+ bg: navy
121
+ attrs: [underline]
122
+
123
+ markdown_link:
124
+ fg: cyan
125
+ bg: navy
126
+ attrs: [underline]
127
+
128
+ markdown_url:
129
+ fg: lightblue
130
+ bg: navy
131
+
132
+ markdown_quote_gutter:
133
+ fg: bisque
134
+ bg: navy
135
+
136
+ markdown_highlight:
137
+ fg: navy
138
+ bg: yellow
139
+
140
+ markdown_table_header:
141
+ fg: navy
142
+ bg: yellow
143
+ attrs: [bold]
144
+
145
+ markdown_hrule:
146
+ fg: lightblue
147
+ bg: navy
148
+ attrs: [dim]
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Fatty
4
+ module CoreExt
5
+ module Hash
6
+ refine ::Hash do
7
+ def deep_merge(other)
8
+ merge(other) do |_key, old_value, new_value|
9
+ if old_value.is_a?(::Hash) && new_value.is_a?(::Hash)
10
+ old_value.deep_merge(new_value)
11
+ else
12
+ new_value
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -2,20 +2,27 @@
2
2
 
3
3
  # These can be used to add "roles" to strings so that they can be styled
4
4
  # according to the theme.
5
- class String
6
- def fatty_good
7
- { text: self, role: :good }
8
- end
9
5
 
10
- def fatty_info
11
- { text: self, role: :info }
12
- end
6
+ module Fatty
7
+ module CoreExt
8
+ module String
9
+ refine ::String do
10
+ def fatty_good
11
+ { text: self, role: :good }
12
+ end
13
13
 
14
- def fatty_warn
15
- { text: self, role: :warn }
16
- end
14
+ def fatty_info
15
+ { text: self, role: :info }
16
+ end
17
+
18
+ def fatty_warn
19
+ { text: self, role: :warn }
20
+ end
17
21
 
18
- def fatty_error
19
- { text: self, role: :error }
22
+ def fatty_error
23
+ { text: self, role: :error }
24
+ end
25
+ end
26
+ end
20
27
  end
21
28
  end
@@ -1,3 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "core_ext/string"
4
+ require_relative "core_ext/hash"