Skip to content
This repository was archived by the owner on Feb 12, 2025. It is now read-only.

Commit b36b69c

Browse files
author
Github Actions
committed
[docgen] Update README.md
skip-checks: true
1 parent 1e529b8 commit b36b69c

File tree

2 files changed

+52
-22
lines changed

2 files changed

+52
-22
lines changed

README.md

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -128,21 +128,29 @@ require('dressing').setup({
128128

129129
-- These are passed to nvim_open_win
130130
anchor = "SW",
131-
relative = "cursor",
132-
row = 0,
133-
col = 0,
134131
border = "rounded",
132+
-- 'editor' and 'win' will default to being centered
133+
relative = "cursor",
135134

136135
-- These can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
137136
prefer_width = 40,
138-
max_width = nil,
139-
min_width = 20,
137+
width = nil,
138+
-- min_width and max_width can be a list of mixed types.
139+
-- min_width = {20, 0.2} means "the greater of 20 columns or 20% of total"
140+
max_width = { 140, 0.9 },
141+
min_width = { 20, 0.2 },
140142

141143
-- Window transparency (0-100)
142144
winblend = 10,
143145
-- Change default highlight groups (see :help winhl)
144146
winhighlight = "",
145147

148+
override = function(conf)
149+
-- This is the config that will be passed to nvim_open_win.
150+
-- Change values here to customize the layout
151+
return conf
152+
end,
153+
146154
-- see :help dressing_get_config
147155
get_config = nil,
148156
},
@@ -193,23 +201,30 @@ require('dressing').setup({
193201
builtin = {
194202
-- These are passed to nvim_open_win
195203
anchor = "NW",
196-
relative = "cursor",
197-
row = 0,
198-
col = 0,
199204
border = "rounded",
205+
-- 'editor' and 'win' will default to being centered
206+
relative = "editor",
200207

201208
-- Window transparency (0-100)
202209
winblend = 10,
203210
-- Change default highlight groups (see :help winhl)
204211
winhighlight = "",
205212

206213
-- These can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
214+
-- the min_ and max_ options can be a list of mixed types.
215+
-- max_width = {140, 0.8} means "the lesser of 140 columns or 80% of total"
207216
width = nil,
208-
max_width = 0.8,
209-
min_width = 40,
217+
max_width = { 140, 0.8 },
218+
min_width = { 40, 0.2 },
210219
height = nil,
211220
max_height = 0.9,
212-
min_height = 10,
221+
min_height = { 10, 0.2 },
222+
223+
override = function(conf)
224+
-- This is the config that will be passed to nvim_open_win.
225+
-- Change values here to customize the layout
226+
return conf
227+
end,
213228
},
214229

215230
-- Used to override format_item. See :help dressing-format

doc/dressing.txt

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,29 @@ Configure dressing.nvim by calling the setup() function.
1818
1919
-- These are passed to nvim_open_win
2020
anchor = "SW",
21-
relative = "cursor",
22-
row = 0,
23-
col = 0,
2421
border = "rounded",
22+
-- 'editor' and 'win' will default to being centered
23+
relative = "cursor",
2524
2625
-- These can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
2726
prefer_width = 40,
28-
max_width = nil,
29-
min_width = 20,
27+
width = nil,
28+
-- min_width and max_width can be a list of mixed types.
29+
-- min_width = {20, 0.2} means "the greater of 20 columns or 20% of total"
30+
max_width = { 140, 0.9 },
31+
min_width = { 20, 0.2 },
3032
3133
-- Window transparency (0-100)
3234
winblend = 10,
3335
-- Change default highlight groups (see :help winhl)
3436
winhighlight = "",
3537
38+
override = function(conf)
39+
-- This is the config that will be passed to nvim_open_win.
40+
-- Change values here to customize the layout
41+
return conf
42+
end,
43+
3644
-- see :help dressing_get_config
3745
get_config = nil,
3846
},
@@ -83,23 +91,30 @@ Configure dressing.nvim by calling the setup() function.
8391
builtin = {
8492
-- These are passed to nvim_open_win
8593
anchor = "NW",
86-
relative = "cursor",
87-
row = 0,
88-
col = 0,
8994
border = "rounded",
95+
-- 'editor' and 'win' will default to being centered
96+
relative = "editor",
9097
9198
-- Window transparency (0-100)
9299
winblend = 10,
93100
-- Change default highlight groups (see :help winhl)
94101
winhighlight = "",
95102
96103
-- These can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
104+
-- the min_ and max_ options can be a list of mixed types.
105+
-- max_width = {140, 0.8} means "the lesser of 140 columns or 80% of total"
97106
width = nil,
98-
max_width = 0.8,
99-
min_width = 40,
107+
max_width = { 140, 0.8 },
108+
min_width = { 40, 0.2 },
100109
height = nil,
101110
max_height = 0.9,
102-
min_height = 10,
111+
min_height = { 10, 0.2 },
112+
113+
override = function(conf)
114+
-- This is the config that will be passed to nvim_open_win.
115+
-- Change values here to customize the layout
116+
return conf
117+
end,
103118
},
104119
105120
-- Used to override format_item. See :help dressing-format

0 commit comments

Comments
 (0)