@@ -4,14 +4,10 @@ local ui = require('lspsaga').config.ui
44local win = {}
55
66local function make_floating_popup_options (opts )
7- vim .validate ({
8- opts = { opts , ' t' , true },
9- })
7+ vim .validate (' opts' , opts , ' table' , true )
108 opts = opts or {}
11- vim .validate ({
12- [' opts.offset_x' ] = { opts .offset_x , ' n' , true },
13- [' opts.offset_y' ] = { opts .offset_y , ' n' , true },
14- })
9+ vim .validate (' opts.offset_x' , opts .offset_x , ' number' , true )
10+ vim .validate (' opts.offset_y' , opts .offset_y , ' number' , true )
1511
1612 local anchor = ' '
1713 local row , col
124120
125121-- float window only
126122function obj :winsetconf (config )
127- validate ({
128- config = { config , ' t' },
129- })
123+ validate (' config' , config , ' table' )
130124 api .nvim_win_set_config (self .winid , config )
131125 return self
132126end
@@ -144,9 +138,7 @@ function obj:setheight(height)
144138end
145139
146140function win :new_float (float_opt , enter , force )
147- vim .validate ({
148- float_opt = { float_opt , ' t' , true },
149- })
141+ vim .validate (' float_opt' , float_opt , ' table' , true )
150142 enter = enter or false
151143
152144 self .bufnr = float_opt .bufnr or api .nvim_create_buf (false , false )
0 commit comments