From 34ac75b32927328a0c691c5bda987c0fdb5ce9eb Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Wed, 5 Apr 2023 17:19:53 +0100 Subject: refactor: rename local API alias from a to api Problem: Codebase inconsistently binds vim.api onto a or api. Solution: Use api everywhere. a as an identifier is too short to have at the module level. --- runtime/lua/vim/_meta.lua | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'runtime/lua/vim/_meta.lua') diff --git a/runtime/lua/vim/_meta.lua b/runtime/lua/vim/_meta.lua index 104f29c4c0..e3ad4d76c9 100644 --- a/runtime/lua/vim/_meta.lua +++ b/runtime/lua/vim/_meta.lua @@ -1,4 +1,4 @@ -local a = vim.api +local api = vim.api -- TODO(tjdevries): Improve option metadata so that this doesn't have to be hardcoded. -- Can be done in a separate PR. @@ -30,7 +30,7 @@ end local options_info = setmetatable({}, { __index = function(t, k) - local info = a.nvim_get_option_info(k) + local info = api.nvim_get_option_info(k) info.metatype = get_option_metatype(k, info) rawset(t, k, info) return rawget(t, k) @@ -74,12 +74,12 @@ local function new_opt_accessor(handle, scope) return new_opt_accessor(k, scope) end opt_validate(k, scope) - return a.nvim_get_option_value(k, { [scope] = handle or 0 }) + return api.nvim_get_option_value(k, { [scope] = handle or 0 }) end, __newindex = function(_, k, v) opt_validate(k, scope) - return a.nvim_set_option_value(k, v, { [scope] = handle or 0 }) + return api.nvim_set_option_value(k, v, { [scope] = handle or 0 }) end, }) end @@ -91,10 +91,10 @@ vim.wo = new_opt_accessor(nil, 'win') -- this ONLY sets the global option. like `setglobal` vim.go = setmetatable({}, { __index = function(_, k) - return a.nvim_get_option_value(k, { scope = 'global' }) + return api.nvim_get_option_value(k, { scope = 'global' }) end, __newindex = function(_, k, v) - return a.nvim_set_option_value(k, v, { scope = 'global' }) + return api.nvim_set_option_value(k, v, { scope = 'global' }) end, }) @@ -102,10 +102,10 @@ vim.go = setmetatable({}, { -- it has no additional metamethod magic. vim.o = setmetatable({}, { __index = function(_, k) - return a.nvim_get_option_value(k, {}) + return api.nvim_get_option_value(k, {}) end, __newindex = function(_, k, v) - return a.nvim_set_option_value(k, v, {}) + return api.nvim_set_option_value(k, v, {}) end, }) @@ -488,7 +488,7 @@ local function create_option_accessor(scope) -- opt[my_option] = value _set = function(self) local value = convert_value_to_vim(self._name, self._info, self._value) - a.nvim_set_option_value(self._name, value, { scope = scope }) + api.nvim_set_option_value(self._name, value, { scope = scope }) end, get = function(self) @@ -526,7 +526,7 @@ local function create_option_accessor(scope) return setmetatable({}, { __index = function(_, k) - return make_option(k, a.nvim_get_option_value(k, {})) + return make_option(k, api.nvim_get_option_value(k, {})) end, __newindex = function(_, k, v) -- cgit From 4e6356559c8cd44dbcaa765d1f39e176064526ec Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 22 Jun 2023 03:44:51 -0700 Subject: test: spellcheck :help (vimdoc) files #24109 Enforce consistent terminology (defined in `gen_help_html.lua:spell_dict`) for common misspellings. This does not spellcheck English in general (perhaps a future TODO, though it may be noisy). --- runtime/lua/vim/_meta.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/lua/vim/_meta.lua') diff --git a/runtime/lua/vim/_meta.lua b/runtime/lua/vim/_meta.lua index e3ad4d76c9..913f1fe203 100644 --- a/runtime/lua/vim/_meta.lua +++ b/runtime/lua/vim/_meta.lua @@ -239,7 +239,7 @@ local to_vim_value = { end, } ---- Convert a lua value to a vimoption_T value +--- Convert a Lua value to a vimoption_T value local function convert_value_to_vim(name, info, value) if value == nil then return vim.NIL @@ -250,7 +250,7 @@ local function convert_value_to_vim(name, info, value) return to_vim_value[info.metatype](info, value) end --- Map of OptionType to functions that take vimoption_T values and convert to lua values. +-- Map of OptionType to functions that take vimoption_T values and convert to Lua values. -- Each function takes (info, vim_value) -> lua_value local to_lua_value = { boolean = passthrough, -- cgit From c379d72c490544b3a56eb0e52ce3c8ef740051d8 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Fri, 7 Jul 2023 16:37:36 +0100 Subject: feat(lua): allow vim.wo to be double indexed (#20288) * feat(lua): allow vim.wo to be double indexed Problem: `vim.wo` does not implement `setlocal` Solution: Allow `vim.wo` to be double indexed Co-authored-by: Christian Clason --- runtime/lua/vim/_meta.lua | 53 +++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 9 deletions(-) (limited to 'runtime/lua/vim/_meta.lua') diff --git a/runtime/lua/vim/_meta.lua b/runtime/lua/vim/_meta.lua index 913f1fe203..41e6e8be86 100644 --- a/runtime/lua/vim/_meta.lua +++ b/runtime/lua/vim/_meta.lua @@ -67,25 +67,60 @@ local function opt_validate(option_name, target_scope) end end -local function new_opt_accessor(handle, scope) +local function new_buf_opt_accessor(bufnr) return setmetatable({}, { __index = function(_, k) - if handle == nil and type(k) == 'number' then - return new_opt_accessor(k, scope) + if bufnr == nil and type(k) == 'number' then + return new_buf_opt_accessor(k) end - opt_validate(k, scope) - return api.nvim_get_option_value(k, { [scope] = handle or 0 }) + opt_validate(k, 'buf') + return api.nvim_get_option_value(k, { buf = bufnr or 0 }) end, __newindex = function(_, k, v) - opt_validate(k, scope) - return api.nvim_set_option_value(k, v, { [scope] = handle or 0 }) + opt_validate(k, 'buf') + return api.nvim_set_option_value(k, v, { buf = bufnr or 0 }) end, }) end -vim.bo = new_opt_accessor(nil, 'buf') -vim.wo = new_opt_accessor(nil, 'win') +vim.bo = new_buf_opt_accessor() + +local function new_win_opt_accessor(winid, bufnr) + return setmetatable({}, { + __index = function(_, k) + if bufnr == nil and type(k) == 'number' then + if winid == nil then + return new_win_opt_accessor(k) + else + return new_win_opt_accessor(winid, k) + end + end + + if bufnr ~= nil and bufnr ~= 0 then + error('only bufnr=0 is supported') + end + + opt_validate(k, 'win') + -- TODO(lewis6991): allow passing both buf and win to nvim_get_option_value + return api.nvim_get_option_value(k, { + scope = bufnr and 'local' or nil, + win = winid or 0, + }) + end, + + __newindex = function(_, k, v) + opt_validate(k, 'win') + -- TODO(lewis6991): allow passing both buf and win to nvim_set_option_value + return api.nvim_set_option_value(k, v, { + scope = bufnr and 'local' or nil, + win = winid or 0, + }) + end, + }) +end + +vim.wo = new_win_opt_accessor() -- vim global option -- this ONLY sets the global option. like `setglobal` -- cgit From d0b612f360125785eb95afaa51620c5c7695e381 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Sun, 16 Jul 2023 09:27:39 +0100 Subject: refactor: rename _meta.lua to _options.lua --- runtime/lua/vim/_meta.lua | 575 ---------------------------------------------- 1 file changed, 575 deletions(-) delete mode 100644 runtime/lua/vim/_meta.lua (limited to 'runtime/lua/vim/_meta.lua') diff --git a/runtime/lua/vim/_meta.lua b/runtime/lua/vim/_meta.lua deleted file mode 100644 index 41e6e8be86..0000000000 --- a/runtime/lua/vim/_meta.lua +++ /dev/null @@ -1,575 +0,0 @@ -local api = vim.api - --- TODO(tjdevries): Improve option metadata so that this doesn't have to be hardcoded. --- Can be done in a separate PR. -local key_value_options = { - fillchars = true, - fcs = true, - listchars = true, - lcs = true, - winhighlight = true, - winhl = true, -} - ---- Convert a vimoption_T style dictionary to the correct OptionType associated with it. ----@return string -local function get_option_metatype(name, info) - if info.type == 'string' then - if info.flaglist then - return 'set' - elseif info.commalist then - if key_value_options[name] then - return 'map' - end - return 'array' - end - return 'string' - end - return info.type -end - -local options_info = setmetatable({}, { - __index = function(t, k) - local info = api.nvim_get_option_info(k) - info.metatype = get_option_metatype(k, info) - rawset(t, k, info) - return rawget(t, k) - end, -}) - -vim.env = setmetatable({}, { - __index = function(_, k) - local v = vim.fn.getenv(k) - if v == vim.NIL then - return nil - end - return v - end, - - __newindex = function(_, k, v) - vim.fn.setenv(k, v) - end, -}) - -local function opt_validate(option_name, target_scope) - local scope = options_info[option_name].scope - if scope ~= target_scope then - local scope_to_string = { buf = 'buffer', win = 'window' } - error( - string.format( - [['%s' is a %s option, not a %s option. See ":help %s"]], - option_name, - scope_to_string[scope] or scope, - scope_to_string[target_scope] or target_scope, - option_name - ) - ) - end -end - -local function new_buf_opt_accessor(bufnr) - return setmetatable({}, { - __index = function(_, k) - if bufnr == nil and type(k) == 'number' then - return new_buf_opt_accessor(k) - end - opt_validate(k, 'buf') - return api.nvim_get_option_value(k, { buf = bufnr or 0 }) - end, - - __newindex = function(_, k, v) - opt_validate(k, 'buf') - return api.nvim_set_option_value(k, v, { buf = bufnr or 0 }) - end, - }) -end - -vim.bo = new_buf_opt_accessor() - -local function new_win_opt_accessor(winid, bufnr) - return setmetatable({}, { - __index = function(_, k) - if bufnr == nil and type(k) == 'number' then - if winid == nil then - return new_win_opt_accessor(k) - else - return new_win_opt_accessor(winid, k) - end - end - - if bufnr ~= nil and bufnr ~= 0 then - error('only bufnr=0 is supported') - end - - opt_validate(k, 'win') - -- TODO(lewis6991): allow passing both buf and win to nvim_get_option_value - return api.nvim_get_option_value(k, { - scope = bufnr and 'local' or nil, - win = winid or 0, - }) - end, - - __newindex = function(_, k, v) - opt_validate(k, 'win') - -- TODO(lewis6991): allow passing both buf and win to nvim_set_option_value - return api.nvim_set_option_value(k, v, { - scope = bufnr and 'local' or nil, - win = winid or 0, - }) - end, - }) -end - -vim.wo = new_win_opt_accessor() - --- vim global option --- this ONLY sets the global option. like `setglobal` -vim.go = setmetatable({}, { - __index = function(_, k) - return api.nvim_get_option_value(k, { scope = 'global' }) - end, - __newindex = function(_, k, v) - return api.nvim_set_option_value(k, v, { scope = 'global' }) - end, -}) - --- vim `set` style options. --- it has no additional metamethod magic. -vim.o = setmetatable({}, { - __index = function(_, k) - return api.nvim_get_option_value(k, {}) - end, - __newindex = function(_, k, v) - return api.nvim_set_option_value(k, v, {}) - end, -}) - ----@brief [[ ---- vim.opt, vim.opt_local and vim.opt_global implementation ---- ---- To be used as helpers for working with options within neovim. ---- For information on how to use, see :help vim.opt ---- ----@brief ]] - ---- Preserves the order and does not mutate the original list -local function remove_duplicate_values(t) - local result, seen = {}, {} - for _, v in ipairs(t) do - if not seen[v] then - table.insert(result, v) - end - - seen[v] = true - end - - return result -end - --- Check whether the OptionTypes is allowed for vim.opt --- If it does not match, throw an error which indicates which option causes the error. -local function assert_valid_value(name, value, types) - local type_of_value = type(value) - for _, valid_type in ipairs(types) do - if valid_type == type_of_value then - return - end - end - - error( - string.format( - "Invalid option type '%s' for '%s', should be %s", - type_of_value, - name, - table.concat(types, ' or ') - ) - ) -end - -local function passthrough(_, x) - return x -end - -local function tbl_merge(left, right) - return vim.tbl_extend('force', left, right) -end - -local function tbl_remove(t, value) - if type(value) == 'string' then - t[value] = nil - else - for _, v in ipairs(value) do - t[v] = nil - end - end - - return t -end - -local valid_types = { - boolean = { 'boolean' }, - number = { 'number' }, - string = { 'string' }, - set = { 'string', 'table' }, - array = { 'string', 'table' }, - map = { 'string', 'table' }, -} - --- Map of functions to take a Lua style value and convert to vimoption_T style value. --- Each function takes (info, lua_value) -> vim_value -local to_vim_value = { - boolean = passthrough, - number = passthrough, - string = passthrough, - - set = function(info, value) - if type(value) == 'string' then - return value - end - - if info.flaglist and info.commalist then - local keys = {} - for k, v in pairs(value) do - if v then - table.insert(keys, k) - end - end - - table.sort(keys) - return table.concat(keys, ',') - else - local result = '' - for k, v in pairs(value) do - if v then - result = result .. k - end - end - - return result - end - end, - - array = function(info, value) - if type(value) == 'string' then - return value - end - if not info.allows_duplicates then - value = remove_duplicate_values(value) - end - return table.concat(value, ',') - end, - - map = function(_, value) - if type(value) == 'string' then - return value - end - - local result = {} - for opt_key, opt_value in pairs(value) do - table.insert(result, string.format('%s:%s', opt_key, opt_value)) - end - - table.sort(result) - return table.concat(result, ',') - end, -} - ---- Convert a Lua value to a vimoption_T value -local function convert_value_to_vim(name, info, value) - if value == nil then - return vim.NIL - end - - assert_valid_value(name, value, valid_types[info.metatype]) - - return to_vim_value[info.metatype](info, value) -end - --- Map of OptionType to functions that take vimoption_T values and convert to Lua values. --- Each function takes (info, vim_value) -> lua_value -local to_lua_value = { - boolean = passthrough, - number = passthrough, - string = passthrough, - - array = function(info, value) - if type(value) == 'table' then - if not info.allows_duplicates then - value = remove_duplicate_values(value) - end - - return value - end - - -- Empty strings mean that there is nothing there, - -- so empty table should be returned. - if value == '' then - return {} - end - - -- Handles unescaped commas in a list. - if string.find(value, ',,,') then - local left, right = unpack(vim.split(value, ',,,')) - - local result = {} - vim.list_extend(result, vim.split(left, ',')) - table.insert(result, ',') - vim.list_extend(result, vim.split(right, ',')) - - table.sort(result) - - return result - end - - if string.find(value, ',^,,', 1, true) then - local left, right = unpack(vim.split(value, ',^,,', true)) - - local result = {} - vim.list_extend(result, vim.split(left, ',')) - table.insert(result, '^,') - vim.list_extend(result, vim.split(right, ',')) - - table.sort(result) - - return result - end - - return vim.split(value, ',') - end, - - set = function(info, value) - if type(value) == 'table' then - return value - end - - -- Empty strings mean that there is nothing there, - -- so empty table should be returned. - if value == '' then - return {} - end - - assert(info.flaglist, 'That is the only one I know how to handle') - - if info.flaglist and info.commalist then - local split_value = vim.split(value, ',') - local result = {} - for _, v in ipairs(split_value) do - result[v] = true - end - - return result - else - local result = {} - for i = 1, #value do - result[value:sub(i, i)] = true - end - - return result - end - end, - - map = function(info, raw_value) - if type(raw_value) == 'table' then - return raw_value - end - - assert(info.commalist, 'Only commas are supported currently') - - local result = {} - - local comma_split = vim.split(raw_value, ',') - for _, key_value_str in ipairs(comma_split) do - local key, value = unpack(vim.split(key_value_str, ':')) - key = vim.trim(key) - - result[key] = value - end - - return result - end, -} - ---- Converts a vimoption_T style value to a Lua value -local function convert_value_to_lua(info, option_value) - return to_lua_value[info.metatype](info, option_value) -end - -local prepend_methods = { - number = function() - error("The '^' operator is not currently supported for") - end, - - string = function(left, right) - return right .. left - end, - - array = function(left, right) - for i = #right, 1, -1 do - table.insert(left, 1, right[i]) - end - - return left - end, - - map = tbl_merge, - set = tbl_merge, -} - ---- Handles the '^' operator -local function prepend_value(info, current, new) - return prepend_methods[info.metatype]( - convert_value_to_lua(info, current), - convert_value_to_lua(info, new) - ) -end - -local add_methods = { - number = function(left, right) - return left + right - end, - - string = function(left, right) - return left .. right - end, - - array = function(left, right) - for _, v in ipairs(right) do - table.insert(left, v) - end - - return left - end, - - map = tbl_merge, - set = tbl_merge, -} - ---- Handles the '+' operator -local function add_value(info, current, new) - return add_methods[info.metatype]( - convert_value_to_lua(info, current), - convert_value_to_lua(info, new) - ) -end - -local function remove_one_item(t, val) - if vim.tbl_islist(t) then - local remove_index = nil - for i, v in ipairs(t) do - if v == val then - remove_index = i - end - end - - if remove_index then - table.remove(t, remove_index) - end - else - t[val] = nil - end -end - -local remove_methods = { - number = function(left, right) - return left - right - end, - - string = function() - error('Subtraction not supported for strings.') - end, - - array = function(left, right) - if type(right) == 'string' then - remove_one_item(left, right) - else - for _, v in ipairs(right) do - remove_one_item(left, v) - end - end - - return left - end, - - map = tbl_remove, - set = tbl_remove, -} - ---- Handles the '-' operator -local function remove_value(info, current, new) - return remove_methods[info.metatype](convert_value_to_lua(info, current), new) -end - -local function create_option_accessor(scope) - local option_mt - - local function make_option(name, value) - local info = assert(options_info[name], 'Not a valid option name: ' .. name) - - if type(value) == 'table' and getmetatable(value) == option_mt then - assert(name == value._name, "must be the same value, otherwise that's weird.") - - value = value._value - end - - return setmetatable({ - _name = name, - _value = value, - _info = info, - }, option_mt) - end - - option_mt = { - -- To set a value, instead use: - -- opt[my_option] = value - _set = function(self) - local value = convert_value_to_vim(self._name, self._info, self._value) - api.nvim_set_option_value(self._name, value, { scope = scope }) - end, - - get = function(self) - return convert_value_to_lua(self._info, self._value) - end, - - append = function(self, right) - self._value = add_value(self._info, self._value, right) - self:_set() - end, - - __add = function(self, right) - return make_option(self._name, add_value(self._info, self._value, right)) - end, - - prepend = function(self, right) - self._value = prepend_value(self._info, self._value, right) - self:_set() - end, - - __pow = function(self, right) - return make_option(self._name, prepend_value(self._info, self._value, right)) - end, - - remove = function(self, right) - self._value = remove_value(self._info, self._value, right) - self:_set() - end, - - __sub = function(self, right) - return make_option(self._name, remove_value(self._info, self._value, right)) - end, - } - option_mt.__index = option_mt - - return setmetatable({}, { - __index = function(_, k) - return make_option(k, api.nvim_get_option_value(k, {})) - end, - - __newindex = function(_, k, v) - make_option(k, v):_set() - end, - }) -end - -vim.opt = create_option_accessor() -vim.opt_local = create_option_accessor('local') -vim.opt_global = create_option_accessor('global') -- cgit From 642586977158b44c007177169d3091840a72a8fd Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Tue, 1 Aug 2023 18:03:33 +0100 Subject: feat(lua): add meta file for vim submodules (#24525) --- runtime/lua/vim/_meta.lua | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 runtime/lua/vim/_meta.lua (limited to 'runtime/lua/vim/_meta.lua') diff --git a/runtime/lua/vim/_meta.lua b/runtime/lua/vim/_meta.lua new file mode 100644 index 0000000000..839830294e --- /dev/null +++ b/runtime/lua/vim/_meta.lua @@ -0,0 +1,26 @@ +--- @meta + +--- The following modules are loaded specially in _init_packages.lua + +vim.F = require('vim.F') +vim._watch = require('vim._watch') +vim.diagnostic = require('vim.diagnostic') +vim.filetype = require('vim.filetype') +vim.fs = require('vim.fs') +vim.health = require('vim.health') +vim.highlight = require('vim.highlight') +vim.iter = require('vim.iter') +vim.keymap = require('vim.keymap') +vim.loader = require('vim.loader') +vim.lsp = require('vim.lsp') +vim.re = require('vim.re') +vim.secure = require('vim.secure') +vim.ui = require('vim.ui') +vim.version = require('vim.version') + +local uri = require('vim.uri') + +vim.uri_from_fname = uri.uri_from_fname +vim.uri_from_bufnr = uri.uri_from_bufnr +vim.uri_to_fname = uri.uri_to_fname +vim.uri_to_bufnr = uri.uri_to_bufnr -- cgit From c0beb8173fe2f8a8f71cd5a3a6cdfed145a1d973 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Mon, 7 Aug 2023 16:27:53 +0100 Subject: feat: add .luarc.json (#24592) --- runtime/lua/vim/_meta.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'runtime/lua/vim/_meta.lua') diff --git a/runtime/lua/vim/_meta.lua b/runtime/lua/vim/_meta.lua index 839830294e..5e4f390ca3 100644 --- a/runtime/lua/vim/_meta.lua +++ b/runtime/lua/vim/_meta.lua @@ -1,5 +1,8 @@ --- @meta +---@type uv +vim.uv = ... + --- The following modules are loaded specially in _init_packages.lua vim.F = require('vim.F') @@ -15,6 +18,7 @@ vim.loader = require('vim.loader') vim.lsp = require('vim.lsp') vim.re = require('vim.re') vim.secure = require('vim.secure') +vim.treesitter = require('vim.treesitter') vim.ui = require('vim.ui') vim.version = require('vim.version') -- cgit From 877d04d0fb83b5fc602dbab22b58f26a793ec236 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Sat, 16 Sep 2023 23:10:30 +0100 Subject: feat(lua): add vim.func._memoize Memoizes a function, using a custom function to hash the arguments. Private for now until: - There are other places in the codebase that could benefit from this (e.g. LSP), but might require other changes to accommodate. - Invalidation of the cache needs to be controllable. Using weak tables is an acceptable invalidation policy, but it shouldn't be the only one. - I don't think the story around `hash_fn` is completely thought out. We may be able to have a good default hash_fn by hashing each argument, so basically a better 'concat'. --- runtime/lua/vim/_meta.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'runtime/lua/vim/_meta.lua') diff --git a/runtime/lua/vim/_meta.lua b/runtime/lua/vim/_meta.lua index 5e4f390ca3..ddd0a0eb49 100644 --- a/runtime/lua/vim/_meta.lua +++ b/runtime/lua/vim/_meta.lua @@ -10,6 +10,7 @@ vim._watch = require('vim._watch') vim.diagnostic = require('vim.diagnostic') vim.filetype = require('vim.filetype') vim.fs = require('vim.fs') +vim.func = require('vim.func') vim.health = require('vim.health') vim.highlight = require('vim.highlight') vim.iter = require('vim.iter') -- cgit From f1775da07fe48da629468bcfcc2a8a6c4c3f40ed Mon Sep 17 00:00:00 2001 From: Maria José Solano Date: Fri, 20 Oct 2023 23:51:26 -0700 Subject: feat(lsp): add snippet API (#25301) --- runtime/lua/vim/_meta.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'runtime/lua/vim/_meta.lua') diff --git a/runtime/lua/vim/_meta.lua b/runtime/lua/vim/_meta.lua index ddd0a0eb49..e3b99f6b3d 100644 --- a/runtime/lua/vim/_meta.lua +++ b/runtime/lua/vim/_meta.lua @@ -19,6 +19,7 @@ vim.loader = require('vim.loader') vim.lsp = require('vim.lsp') vim.re = require('vim.re') vim.secure = require('vim.secure') +vim.snippet = require('vim.snippet') vim.treesitter = require('vim.treesitter') vim.ui = require('vim.ui') vim.version = require('vim.version') -- cgit