feat(lsp): add snippet support and refactor completion into Item class
This commit is contained in:
@@ -25,7 +25,7 @@ end, REFRESH_DEBOUNCE_MS)
|
||||
---@class ow.lsp.codelens.Row
|
||||
---@field row integer
|
||||
---@field ready lsp.CodeLens[]
|
||||
---@field pending integer count of unresolved lenses still in flight
|
||||
---@field pending integer
|
||||
local Row = {}
|
||||
Row.__index = Row
|
||||
|
||||
@@ -44,7 +44,7 @@ function Row:await()
|
||||
self.pending = self.pending + 1
|
||||
end
|
||||
|
||||
---@param resolved lsp.CodeLens?
|
||||
---@param resolved? lsp.CodeLens
|
||||
function Row:resolved(resolved)
|
||||
self.pending = self.pending - 1
|
||||
if resolved then
|
||||
@@ -52,9 +52,6 @@ function Row:resolved(resolved)
|
||||
end
|
||||
end
|
||||
|
||||
--- Paint this row's extmark. Preserves the previous extmark while any lens
|
||||
--- on the row is still resolving so the user doesn't see a partial row
|
||||
--- (e.g. "refs" without "impls").
|
||||
---@param buf integer
|
||||
function Row:render(buf)
|
||||
if not vim.api.nvim_buf_is_valid(buf) then
|
||||
@@ -161,7 +158,6 @@ function State.new(buf)
|
||||
}, State)
|
||||
end
|
||||
|
||||
--- Paint every row and drop extmarks on rows that are no longer present.
|
||||
function State:render()
|
||||
if not vim.api.nvim_buf_is_valid(self.buf) then
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user