diff options
author | Famiu Haque <famiuhaque@proton.me> | 2024-12-28 14:55:22 +0600 |
---|---|---|
committer | Lewis Russell <me@lewisr.dev> | 2025-01-14 09:34:17 +0000 |
commit | c5f93d7ab04f93db1470d58ca1f70e947e716c2b (patch) | |
tree | 27c460ef4b486f91efdb8d89bb0d731c81239273 /src/nvim/generators/gen_options.lua | |
parent | b192d58284a791c55f5ae000250fc948e9098d47 (diff) | |
download | rneovim-c5f93d7ab04f93db1470d58ca1f70e947e716c2b.tar.gz rneovim-c5f93d7ab04f93db1470d58ca1f70e947e716c2b.tar.bz2 rneovim-c5f93d7ab04f93db1470d58ca1f70e947e716c2b.zip |
refactor(options): remove code for multitype options
Problem: It was decided on Matrix chat that multitype options won't be necessary for Neovim options, and that options should only have a single canonical type. Therefore the code for supporting multitype options is unnecessary.
Solution: Remove the additional code that's used to provide multitype option support.
Diffstat (limited to 'src/nvim/generators/gen_options.lua')
-rw-r--r-- | src/nvim/generators/gen_options.lua | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/src/nvim/generators/gen_options.lua b/src/nvim/generators/gen_options.lua index c79683dc00..0298381ece 100644 --- a/src/nvim/generators/gen_options.lua +++ b/src/nvim/generators/gen_options.lua @@ -314,21 +314,6 @@ end --- @param o vim.option_meta --- @return string -local function get_type_flags(o) - local opt_types = (type(o.type) == 'table') and o.type or { o.type } - local type_flags = '0' - assert(type(opt_types) == 'table') - - for _, opt_type in ipairs(opt_types) do - assert(type(opt_type) == 'string') - type_flags = ('%s | (1 << %s)'):format(type_flags, opt_type_enum(opt_type)) - end - - return type_flags -end - ---- @param o vim.option_meta ---- @return string local function get_scope_flags(o) local scope_flags = '0' @@ -427,8 +412,8 @@ local function dump_option(i, o) if o.abbreviation then w(' .shortname=' .. cstr(o.abbreviation)) end + w(' .type=' .. opt_type_enum(o.type)) w(' .flags=' .. get_flags(o)) - w(' .type_flags=' .. get_type_flags(o)) w(' .scope_flags=' .. get_scope_flags(o)) w(' .scope_idx=' .. get_scope_idx(o)) if o.enable_if then |