From c6c21db82b31ea43ce878ab3725dcd901db1e7a1 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Tue, 8 Aug 2023 16:36:06 +0100 Subject: fix(filetype): add typing and dry (#24573) --- runtime/lua/vim/_editor.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'runtime/lua/vim/_editor.lua') diff --git a/runtime/lua/vim/_editor.lua b/runtime/lua/vim/_editor.lua index 6182270708..d81464a3ca 100644 --- a/runtime/lua/vim/_editor.lua +++ b/runtime/lua/vim/_editor.lua @@ -428,10 +428,17 @@ vim.cmd = setmetatable({}, { end, }) +--- @class vim.var_accessor +--- @field [string] any +--- @field [integer] vim.var_accessor + -- These are the vim.env/v/g/o/bo/wo variable magic accessors. do local validate = vim.validate + --- @param scope string + --- @param handle? false|integer + --- @return vim.var_accessor local function make_dict_accessor(scope, handle) validate({ scope = { scope, 's' }, -- cgit