File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed
plugins/lsp/language-servers Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change 10
10
serverName ? name ,
11
11
package ? null ,
12
12
url ? null ,
13
- cmd ? ( cfg : null ) ,
13
+ cmd ? null ,
14
+ cmdText ? throw "cmdText is required when cmd is a function" ,
14
15
settings ? ( cfg : cfg ) ,
15
16
settingsOptions ? { } ,
16
17
extraConfig ? cfg : { } ,
78
79
cmd cfg
79
80
else
80
81
cmd ;
82
+ defaultText = lib . literalMD ''
83
+ null when `package` is null, otherwise ${
84
+ if args ? cmdText || builtins . isFunction cmd then
85
+ let
86
+ literal = lib . options . renderOptionValue cmdText ;
87
+ inherit ( literal ) text ;
88
+ in
89
+ if literal . _type == "literalMD" then
90
+ text
91
+ else if lib . hasInfix "\n " text || lib . hasInfix "``" text then
92
+ "\n \n ```\n ${ text } \n ```"
93
+ else
94
+ "`` ${ text } ``"
95
+ else if cmd == null then
96
+ "null"
97
+ else
98
+ "`[ ${ lib . concatMapStringsSep " " builtins . toJSON cmd } ]`"
99
+ }
100
+ '' ;
81
101
description = ''
82
102
A list where each entry corresponds to the blankspace delimited part of the command that
83
103
launches the server.
You can’t perform that action at this time.
0 commit comments