Skip to content

Commit e8b8eba

Browse files
committed
feat(config): validate ui.position option in schema
Extends the configuration schema to include the new `ui.position` field.
1 parent fb620cd commit e8b8eba

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

lua/marksman/init.lua

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ local default_config = {
3434
},
3535
auto_save = true,
3636
max_marks = 100,
37-
search_in_ui = true,
3837
silent = false,
3938
-- minimal should be configured via ui opts
4039
minimal = false,
@@ -55,11 +54,19 @@ local default_config = {
5554
local config_schema = {
5655
auto_save = { type = "boolean" },
5756
max_marks = { type = "number", min = 1, max = 1000 },
58-
search_in_ui = { type = "boolean" },
5957
silent = { type = "boolean" },
6058
minimal = { type = "boolean" },
6159
disable_default_keymaps = { type = "boolean" },
6260
debounce_ms = { type = "number", min = 100, max = 5000 },
61+
ui = {
62+
type = "table",
63+
fields = {
64+
position = {
65+
type = "string",
66+
allowed = { "center", "top_center", "bottom_center" },
67+
},
68+
},
69+
},
6370
}
6471

6572
local config = {}
@@ -742,4 +749,3 @@ function M.setup(opts)
742749
end
743750

744751
return M
745-

0 commit comments

Comments
 (0)