refactor: better annotations to make sumneko faster

This commit is contained in:
Folke Lemaitre 2022-12-23 08:34:55 +01:00
parent 65e903652b
commit e2bbf3deef
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
3 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,4 @@
---@class LazyUtilCore
local M = {}
---@alias LazyProfile {data: string|{[string]:string}, time: number, [number]:LazyProfile}

View File

@ -1,3 +1,4 @@
---@class LazyUtil: LazyUtilCore
local M = setmetatable({}, { __index = require("lazy.core.util") })
function M.file_exists(file)

View File

@ -17,10 +17,12 @@ local Text = require("lazy.view.text")
---@field _diagnostics LazyDiagnostic[]
---@field plugin_range table<string, {from: number, to: number}>
---@field _details? string
local M = setmetatable({}, { __index = Text })
local M = {}
---@return Render
function M.new(buf, win, padding, wrap)
local self = setmetatable({}, { __index = M })
---@type Render
local self = setmetatable({}, { __index = setmetatable(M, { __index = Text }) })
self.buf = buf
self.win = win
self.padding = padding or 0