fix(filetype): add typing and dry (#24573)

This commit is contained in:
Lewis Russell
2023-08-08 16:36:06 +01:00
committed by GitHub
parent 61ed45486d
commit c6c21db82b
5 changed files with 822 additions and 946 deletions

View File

@ -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' },