@@ -7,6 +7,7 @@ Table of Contents *cyberdream-table-of-contents*
7
7
- Installation | cyberdream-installation |
8
8
- Usage | cyberdream-usage |
9
9
- Configuring | cyberdream-configuring |
10
+ - Recipes | cyberdream--recipes |
10
11
- Contributing | cyberdream-contributing |
11
12
1. Links | cyberdream-links |
12
13
@@ -126,6 +127,35 @@ their default values:
126
127
<
127
128
128
129
130
+ RECIPES *cyberdream--recipes*
131
+
132
+ Include these alongside the `setup` function to add additional functionality to
133
+ the theme.
134
+
135
+
136
+ MAP A KEY TO TOGGLE BETWEEN LIGHT AND DARK MODE
137
+
138
+ >lua
139
+ -- Add a custom keybinding to toggle the colorscheme
140
+ vim.api.nvim_set_keymap("n", "<leader> tt", ":CyberdreamToggleMode<CR> ", { noremap = true, silent = true })
141
+ <
142
+
143
+
144
+ CREATE AN AUTOCMD TO HOOK INTO THE TOGGLE EVENT AND RUN CUSTOM CODE
145
+
146
+ >lua
147
+ -- The event data property will contain a string with either "default" or "light" respectively
148
+ vim.api.nvim_create_autocmd("User", {
149
+ pattern = "CyberdreamToggleMode",
150
+ callback = function(event)
151
+ -- Your custom code here!
152
+ -- For example, notify the user that the colorscheme has been toggled
153
+ print("Switched to " .. event.data .. " mode!")
154
+ end,
155
+ })
156
+ <
157
+
158
+
129
159
CONTRIBUTING *cyberdream-contributing*
130
160
131
161
Pull requests are welcome. If a plugin you use is not supported, please open an
@@ -137,6 +167,7 @@ feedback, please open an issue.
137
167
138
168
1. *image*: https://github.com/scottmckendry/cyberdream.nvim/assets/39483124/55ad863e-11e6-4539-bf67-118ea328fb5b
139
169
2. *image*: https://github.com/scottmckendry/cyberdream.nvim/assets/39483124/387a32f3-da38-4e96-b1e6-ea55591ec9ae
170
+ 3. *image*: https://github.com/scottmckendry/cyberdream.nvim/assets/39483124/c0188d60-d62b-4a15-965d-a19757c484e6
140
171
141
172
Generated by panvimdoc <https://github.com/kdheepak/panvimdoc >
142
173
0 commit comments