File tree Expand file tree Collapse file tree 1 file changed +26
-2
lines changed Expand file tree Collapse file tree 1 file changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -252,15 +252,39 @@ Should error diagnostics be shown. If you are using Neovim 0.6.0 or higher, thes
252
252
253
253
WIN_SPLIT_MODE *orgmode-win_split_mode*
254
254
255
- type: `string`
255
+ type: `string|function `
256
256
default value: `horizontal`
257
257
Available options:
258
258
* horizontal - Always split horizontally
259
259
* vertical - Always split vertically
260
260
* auto - Determine between horizontal and vertical split depending on the current window size
261
261
262
262
This option determines how to open agenda and capture window.
263
- If none of the options above suit your needs, you can provide custom command (see `:help <mods>`). Here are few examples:
263
+ If none of the options above suit your needs, you can provide custom command string (see `:help <mods>`) or custom function:
264
+ Here are few examples:
265
+
266
+ Open in float window:
267
+ >
268
+ win_split_mode = function(name)
269
+ local bufnr = vim.api.nvim_create_buf(false, true)
270
+ --- Setting buffer name is required
271
+ vim.api.nvim_buf_set_name(bufnr, name)
272
+ local fill = 0.8
273
+ local width = math.floor((vim.o.columns * fill))
274
+ local height = math.floor((vim.o.lines * fill))
275
+ local row = math.floor((((vim.o.lines - height) / 2) - 1))
276
+ local col = math.floor(((vim.o.columns - width) / 2))
277
+ vim.api.nvim_open_win(bufnr, true, {
278
+ relative = "editor",
279
+ width = width,
280
+ height = height,
281
+ row = row,
282
+ col = col,
283
+ style = "minimal",
284
+ border = "rounded"
285
+ })
286
+ end
287
+ <
264
288
265
289
Always open in tab:
266
290
>
You can’t perform that action at this time.
0 commit comments