diff options
author | Ilia Choly <ilia.choly@gmail.com> | 2024-05-31 10:48:05 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-31 16:48:05 +0200 |
commit | d62d181ce065556be51d5eda0425aa42f427cc27 (patch) | |
tree | 5c1236580e158b43ae54933dedf3e9064b56d4c0 /scripts/gen_lsp.lua | |
parent | 217828b20c9fc224c6892ce1b0129850c280f598 (diff) | |
download | rneovim-d62d181ce065556be51d5eda0425aa42f427cc27.tar.gz rneovim-d62d181ce065556be51d5eda0425aa42f427cc27.tar.bz2 rneovim-d62d181ce065556be51d5eda0425aa42f427cc27.zip |
refactor(lsp): use tuple syntax in generated protocol types (#29110)
Diffstat (limited to 'scripts/gen_lsp.lua')
-rw-r--r-- | scripts/gen_lsp.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/gen_lsp.lua b/scripts/gen_lsp.lua index 04d19f22e6..1706b39864 100644 --- a/scripts/gen_lsp.lua +++ b/scripts/gen_lsp.lua @@ -297,13 +297,13 @@ function M.gen(opt) -- TupleType elseif type.kind == 'tuple' then - local tuple = '{ ' - for i, value in ipairs(type.items) do - tuple = tuple .. '[' .. i .. ']: ' .. parse_type(value, prefix) .. ', ' + local tuple = '[' + for _, value in ipairs(type.items) do + tuple = tuple .. parse_type(value, prefix) .. ', ' end -- remove , at the end tuple = tuple:sub(0, -3) - return tuple .. ' }' + return tuple .. ']' end vim.print('WARNING: Unknown type ', type) |