Skip to content

Commit 09579e0

Browse files
committed
Add racket-langserver settings to enable UI configuration
This allows the current settings of `racket-langserver` to be configured via VS Code settings UI. They will also be properly highlighted as "known" settings in the JSON view. Please note that you will need to write the settings in "dotted" form for the VS Code UI to recognise them: ``` { "racket-langserver.resyntax.enable": true, "racket-langserver.formatting.documentFormatter": "fixw", } ``` Fixes #164
1 parent 345b62a commit 09579e0

1 file changed

Lines changed: 127 additions & 84 deletions

File tree

‎package.json‎

Lines changed: 127 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -98,94 +98,137 @@
9898
"path": "./syntaxes/rhombus.tmLanguage.json"
9999
}
100100
],
101-
"configuration": {
102-
"title": "Magic Racket",
103-
"properties": {
104-
"magicRacket.languageServer.enabled": {
105-
"type": "boolean",
106-
"default": true,
107-
"markdownDescription": "Enable language server support. It is recommended to leave this turned on.",
108-
"order": 0
109-
},
110-
"magicRacket.languageServer.command": {
111-
"type": "string",
112-
"default": "racket",
113-
"markdownDescription": "Path to the executable that is used to launch the Racket language server.",
114-
"order": 1
115-
},
116-
"magicRacket.languageServer.arguments": {
117-
"type": "array",
118-
"items": {
119-
"type": "string"
101+
"configuration": [
102+
{
103+
"title": "Magic Racket",
104+
"properties": {
105+
"magicRacket.languageServer.enabled": {
106+
"type": "boolean",
107+
"default": true,
108+
"markdownDescription": "Enable language server support. It is recommended to leave this turned on.",
109+
"order": 0
120110
},
121-
"default": [
122-
"--lib",
123-
"racket-langserver"
124-
],
125-
"markdownDescription": "Arguments passed to the language server executable set in `#magicRacket.languageServer.command#`.",
126-
"order": 2
127-
},
128-
"magicRacket.trace.server": {
129-
"scope": "window",
130-
"type": "string",
131-
"enum": [
132-
"off",
133-
"messages",
134-
"verbose"
135-
],
136-
"default": "off",
137-
"description": "Enable tracing of the communication between VS Code and the language server.",
138-
"order": 3
139-
},
140-
"magicRacket.general.racketPath": {
141-
"type": "string",
142-
"default": "racket",
143-
"markdownDescription": "Path to the Racket executable that is used both to open REPLs and to run files."
144-
},
145-
"magicRacket.general.racoPath": {
146-
"type": "string",
147-
"default": "raco",
148-
"markdownDescription": "Path to the `raco` executable that is used to run tests."
149-
},
150-
"magicRacket.REPL.arguments": {
151-
"type": "array",
152-
"items": {
153-
"type": "string"
111+
"magicRacket.languageServer.command": {
112+
"type": "string",
113+
"default": "racket",
114+
"markdownDescription": "Path to the executable that is used to launch the Racket language server.",
115+
"order": 1
154116
},
155-
"default": [
156-
"--repl"
157-
],
158-
"markdownDescription": "Arguments passed into `#magicRacket.general.racketPath#` when launching a REPL."
159-
},
160-
"magicRacket.REPL.title": {
161-
"type": "string",
162-
"default": "REPL ($name)",
163-
"markdownDescription": "Template string for the title of Racket REPLs. Variable `$name` will get replaced by the file name."
164-
},
165-
"magicRacket.outputTerminal.numberOfOutputTerminals": {
166-
"type": "string",
167-
"enum": [
168-
"one",
169-
"many"
170-
],
171-
"default": "one",
172-
"enumDescriptions": [
173-
"Runs every file in the same output terminal",
174-
"Runs each file in its own output terminal"
175-
]
176-
},
177-
"magicRacket.outputTerminal.sharedOutputTerminalTitle": {
178-
"type": "string",
179-
"default": "Racket Output",
180-
"markdownDescription": "Specifies the title of the the shared output terminal."
181-
},
182-
"magicRacket.outputTerminal.outputTerminalTitle": {
183-
"type": "string",
184-
"default": "Output ($name)",
185-
"markdownDescription": "Specifies the template string for the title of the file-specific output terminal. Substring `$name` will get replaced by the file name."
117+
"magicRacket.languageServer.arguments": {
118+
"type": "array",
119+
"items": {
120+
"type": "string"
121+
},
122+
"default": [
123+
"--lib",
124+
"racket-langserver"
125+
],
126+
"markdownDescription": "Arguments passed to the language server executable set in `#magicRacket.languageServer.command#`.",
127+
"order": 2
128+
},
129+
"magicRacket.trace.server": {
130+
"scope": "window",
131+
"type": "string",
132+
"enum": [
133+
"off",
134+
"messages",
135+
"verbose"
136+
],
137+
"default": "off",
138+
"description": "Enable tracing of the communication between VS Code and the language server.",
139+
"order": 3
140+
},
141+
"magicRacket.general.racketPath": {
142+
"type": "string",
143+
"default": "racket",
144+
"markdownDescription": "Path to the Racket executable that is used both to open REPLs and to run files."
145+
},
146+
"magicRacket.general.racoPath": {
147+
"type": "string",
148+
"default": "raco",
149+
"markdownDescription": "Path to the `raco` executable that is used to run tests."
150+
},
151+
"magicRacket.REPL.arguments": {
152+
"type": "array",
153+
"items": {
154+
"type": "string"
155+
},
156+
"default": [
157+
"--repl"
158+
],
159+
"markdownDescription": "Arguments passed into `#magicRacket.general.racketPath#` when launching a REPL."
160+
},
161+
"magicRacket.REPL.title": {
162+
"type": "string",
163+
"default": "REPL ($name)",
164+
"markdownDescription": "Template string for the title of Racket REPLs. Variable `$name` will get replaced by the file name."
165+
},
166+
"magicRacket.outputTerminal.numberOfOutputTerminals": {
167+
"type": "string",
168+
"enum": [
169+
"one",
170+
"many"
171+
],
172+
"default": "one",
173+
"enumDescriptions": [
174+
"Runs every file in the same output terminal",
175+
"Runs each file in its own output terminal"
176+
]
177+
},
178+
"magicRacket.outputTerminal.sharedOutputTerminalTitle": {
179+
"type": "string",
180+
"default": "Racket Output",
181+
"markdownDescription": "Specifies the title of the the shared output terminal."
182+
},
183+
"magicRacket.outputTerminal.outputTerminalTitle": {
184+
"type": "string",
185+
"default": "Output ($name)",
186+
"markdownDescription": "Specifies the template string for the title of the file-specific output terminal. Substring `$name` will get replaced by the file name."
187+
}
188+
}
189+
},
190+
{
191+
"title": "racket-langserver",
192+
"properties": {
193+
"racket-langserver.resyntax.enable": {
194+
"type": "boolean",
195+
"default": true,
196+
"markdownDescription": "Analyse code with `resyntax` (if installed) and show refactoring actions."
197+
},
198+
"racket-langserver.formatting.documentFormatter": {
199+
"type": "string",
200+
"enum": [
201+
"fixw",
202+
"drracket",
203+
"fmt"
204+
],
205+
"default": "fixw",
206+
"markdownDescription": "The formatter to use when formatting whole documents."
207+
},
208+
"racket-langserver.formatting.indentationFormatter": {
209+
"type": "string",
210+
"enum": [
211+
"fixw",
212+
"drracket"
213+
],
214+
"default": "fixw",
215+
"markdownDescription": "The formatter to use when formatting selections / ranges and also for on-type indentation."
216+
},
217+
"racket-langserver.formatting.fmtSettings.width": {
218+
"type": "integer",
219+
"markdownDescription": "Width when using `fmt` as document formatter. `fmt`'s own default will be used if unset."
220+
},
221+
"racket-langserver.formatting.fmtSettings.indent": {
222+
"type": "integer",
223+
"markdownDescription": "Indent when using `fmt` as document formatter. `fmt`'s own default will be used if unset."
224+
},
225+
"racket-langserver.formatting.fmtSettings.maxBlankLines": {
226+
"type": "integer",
227+
"markdownDescription": "Max blank lines when using `fmt` as document formatter. `fmt`'s own default will be used if unset."
228+
}
186229
}
187230
}
188-
},
231+
],
189232
"commands": [
190233
{
191234
"command": "magic-racket.loadFileInRepl",

0 commit comments

Comments
 (0)