mirror of https://github.com/folke/lazy.nvim.git
refactor: better annotations to make sumneko faster
This commit is contained in:
parent
65e903652b
commit
e2bbf3deef
|
@ -1,3 +1,4 @@
|
||||||
|
---@class LazyUtilCore
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
---@alias LazyProfile {data: string|{[string]:string}, time: number, [number]:LazyProfile}
|
---@alias LazyProfile {data: string|{[string]:string}, time: number, [number]:LazyProfile}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
---@class LazyUtil: LazyUtilCore
|
||||||
local M = setmetatable({}, { __index = require("lazy.core.util") })
|
local M = setmetatable({}, { __index = require("lazy.core.util") })
|
||||||
|
|
||||||
function M.file_exists(file)
|
function M.file_exists(file)
|
||||||
|
|
|
@ -17,10 +17,12 @@ local Text = require("lazy.view.text")
|
||||||
---@field _diagnostics LazyDiagnostic[]
|
---@field _diagnostics LazyDiagnostic[]
|
||||||
---@field plugin_range table<string, {from: number, to: number}>
|
---@field plugin_range table<string, {from: number, to: number}>
|
||||||
---@field _details? string
|
---@field _details? string
|
||||||
local M = setmetatable({}, { __index = Text })
|
local M = {}
|
||||||
|
|
||||||
|
---@return Render
|
||||||
function M.new(buf, win, padding, wrap)
|
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.buf = buf
|
||||||
self.win = win
|
self.win = win
|
||||||
self.padding = padding or 0
|
self.padding = padding or 0
|
||||||
|
|
Loading…
Reference in New Issue