Skip to content

Commit 6b239fb

Browse files
committed
refactor: mark class as exact and inherit a parent class
1 parent 289b027 commit 6b239fb

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

lua/peter/util/lsp.lua

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,19 @@
22
---@class peter.util.lsp
33
local M = {}
44

5-
---@class peter.util.lsp.ResolveSpec
5+
---@class (exact) peter.util.lsp.ResolveSpec
66
---@field builtin peter.util.lsp.FunctionSpec vim.lsp.buf.*
77
---@field snacks? peter.util.lsp.FunctionSpec Snacks.picker.*
88
---
99
---@alias peter.util.lsp.FunctionSpec string|peter.util.lsp.FunctionSource
1010
---
11-
---@class peter.util.lsp.FunctionSource Define a function with config.
11+
---@class (exact) peter.util.lsp.FunctionSource Define a function with config.
1212
---@field name string Basename of function to call.
1313
---@field opts? table Options table to configure the function's behaviour.
1414

15-
---@alias peter.util.lsp.KeymapOpts vim.keymap.set.Opts|{has?:string|string[], mode?:string|string[]}
15+
---@class (exact) peter.util.lsp.KeymapOpts : vim.keymap.set.Opts
16+
---@field has? string|string[]
17+
---@field mode? string|string[]
1618

1719
--[[ ---------------------------------------------------------------------- ]]
1820
--
@@ -202,7 +204,7 @@ end
202204
---@param bufnr integer
203205
---@param lhs string
204206
---@param rhs function
205-
---@param opts? vim.keymap.set.Opts|{has?:string|string[], mode?:string|string[]}
207+
---@param opts? peter.util.lsp.KeymapOpts
206208
function M.set_keymap(client, bufnr, lhs, rhs, opts)
207209
opts = opts or {}
208210

0 commit comments

Comments
 (0)