fix(lsp): clean up duplicate and unused meta type annotations

This commit is contained in:
Jongwook Choi
2024-01-16 19:19:21 -05:00
committed by Mathias Fußenegger
parent f936a962d0
commit fa9a85ae46
3 changed files with 14 additions and 21 deletions

View File

@ -159,11 +159,13 @@ function M.gen(opt)
local output = {
'--' .. '[[',
'This file is autogenerated from scripts/gen_lsp.lua',
'THIS FILE IS GENERATED by scripts/gen_lsp.lua',
'DO NOT EDIT MANUALLY',
'',
'Based on LSP protocol ' .. opt.version,
'',
'Regenerate:',
([=[nvim -l scripts/gen_lsp.lua gen --version %s --out runtime/lua/vim/lsp/_meta/protocol.lua]=]):format(
DEFAULT_LSP_VERSION
),
([=[nvim -l scripts/gen_lsp.lua gen --version %s]=]):format(DEFAULT_LSP_VERSION),
'--' .. ']]',
'',
'---@meta',
@ -171,12 +173,9 @@ function M.gen(opt)
'',
'---@alias lsp.null nil',
'---@alias uinteger integer',
'---@alias lsp.decimal number',
'---@alias decimal number',
'---@alias lsp.DocumentUri string',
'---@alias lsp.URI string',
'---@alias lsp.LSPObject table<string, lsp.LSPAny>',
'---@alias lsp.LSPArray lsp.LSPAny[]',
'---@alias lsp.LSPAny lsp.LSPObject|lsp.LSPArray|string|number|boolean|nil',
'',
}