File tree 1 file changed +13
-0
lines changed
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -250,6 +250,10 @@ func (o *Options) set(name string, value interface{}) OptionResult {
250
250
result .setBool (& o .Completion .CaseSensitive )
251
251
case "completeUnimported" :
252
252
result .setBool (& o .Completion .Unimported )
253
+ case "completionTimeout" :
254
+ if v , ok := result .asInt (); ok {
255
+ o .Completion .Budget = time .Duration (v ) * time .Second
256
+ }
253
257
254
258
case "hoverKind" :
255
259
hoverKind , ok := value .(string )
@@ -347,6 +351,15 @@ func (r *OptionResult) asBool() (bool, bool) {
347
351
return b , true
348
352
}
349
353
354
+ func (r * OptionResult ) asInt () (int , bool ) {
355
+ b , ok := r .Value .(int )
356
+ if ! ok {
357
+ r .errorf ("Invalid type %T for int option %q" , r .Value , r .Name )
358
+ return 0 , false
359
+ }
360
+ return b , true
361
+ }
362
+
350
363
func (r * OptionResult ) setBool (b * bool ) {
351
364
if v , ok := r .asBool (); ok {
352
365
* b = v
You can’t perform that action at this time.
0 commit comments