@@ -75,15 +75,41 @@ NOTE: Make sure fast access keys do not overlap. If that happens, first entry in
75
75
Should error diagnostics be shown. If you are using Neovim 0.6.0 or higher, these will be shown via ` vim.diagnostic ` .<br />
76
76
77
77
#### ** win_split_mode**
78
- * type* : ` string ` <br />
78
+ * type* : ` string|function ` <br />
79
79
* default value* : ` horizontal ` <br />
80
80
Available options:
81
81
* horizontal - Always split horizontally
82
82
* vertical - Always split vertically
83
83
* auto - Determine between horizontal and vertical split depending on the current window size
84
84
85
85
This option determines how to open agenda and capture window.<br />
86
- If none of the options above suit your needs, you can provide custom command (see ` :help <mods> ` ). Here are few examples:<br />
86
+ If none of the options above suit your needs, you can provide custom command string (see ` :help <mods> ` ) or custom function:
87
+ Here are few examples:<br />
88
+
89
+ Open in float window:
90
+ ``` lua
91
+ win_split_mode = function (name )
92
+ local bufnr = vim .api .nvim_create_buf (false , true )
93
+ --- Setting buffer name is required
94
+ vim .api .nvim_buf_set_name (bufnr , name )
95
+
96
+ local fill = 0.8
97
+ local width = math.floor ((vim .o .columns * fill ))
98
+ local height = math.floor ((vim .o .lines * fill ))
99
+ local row = math.floor ((((vim .o .lines - height ) / 2 ) - 1 ))
100
+ local col = math.floor (((vim .o .columns - width ) / 2 ))
101
+
102
+ vim .api .nvim_open_win (bufnr , true , {
103
+ relative = " editor" ,
104
+ width = width ,
105
+ height = height ,
106
+ row = row ,
107
+ col = col ,
108
+ style = " minimal" ,
109
+ border = " rounded"
110
+ })
111
+ end
112
+ ```
87
113
88
114
Always open in tab:
89
115
```
@@ -100,7 +126,6 @@ Always open horizontally with specific height of 20 lines:
100
126
win_split_mode = '20split'
101
127
```
102
128
103
-
104
129
#### ** org_todo_keyword_faces**
105
130
* type* : ` table<string, string> ` <br />
106
131
* default value* : ` {} ` <br />
0 commit comments