The contributed settings are still named `languageServerExample.*`, so neither reaches the server
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 85/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript, vscode
- Domain
- devtools
Research direction
Start with the configuration block in package.json:10-30, then compare it with the settings lookup in eo-lsp-server/src/server.ts:141-144 and src/defaultSettings.ts. Check extension.ts:66 for the LanguageClient id. Done means the contributed settings use the server's eo.limit names and matching trace prefix, with the documented default aligned to 1000.
Written by the indexing model from the issue text.
Description
The two settings this extension contributes are named after the VS Code sample it was started from, and neither reaches the server: the section is wrong and, for the one that would matter, so is the key.
package.json:10-30:
"configuration": {
"properties": {
"languageServerExample.maxNumberOfProblems": {
"default": 100,
"description": "Controls the maximum number of problems produced by the server.",
"scope": "resource",
"type": "number"
},
"languageServerExample.trace.server": { … }
},
"title": "Configuration",
"type": "object"
}
The server asks for a different section entirely. eo-lsp-server/src/server.ts:141-144:
result = connection.workspace.getConfiguration({
scopeUri: resource,
section: "eo"
}).then(config => settings(config));
and reads a differently named field out of it — src/defaultSettings.ts declares interface DefaultSettings { limit: number }, and diagnostics(errors, effective.limit, …) is what caps the report.
So a user who opens Settings, finds "Controls the maximum number of problems produced by the server", and sets it to 5 gets no change at all: the server never reads languageServerExample.*, and even under the right section the key it looks for is limit, not maxNumberOfProblems. The default stays 1000, the number defaultSettings carries.
languageServerExample.trace.server has the same problem in a different direction: vscode-languageclient derives the trace setting from the client's id, which extension.ts:66 sets when constructing LanguageClient, so the setting VS Code honours is named after that id and not after languageServerExample.
grep -rn "languageServerExample\|maxNumberOfProblems" src/ test/ finds nothing outside package.json — no code in this repository reads either one.
Root cause
The extension began as the lsp-sample from vscode-extension-samples, whose contribution block uses exactly these two names, and the block was kept while the server it talks to grew its own configuration.
Suggested fix
Name the section the server reads, and the field it reads inside it:
"configuration": {
"properties": {
"eo.limit": {
"default": 1000,
"description": "Maximum number of diagnostics reported per file.",
"scope": "resource",
"type": "number"
},
"eo.trace.server": {
"default": "off",
"description": "Traces the communication between VS Code and the EO language server.",
"enum": ["off", "messages", "verbose"],
"scope": "window",
"type": "string"
}
},
"title": "EO",
"type": "object"
}
with the client id in extension.ts matching the trace prefix, so eo.trace.server is the name VS Code actually looks up. The 1000 above is the server's own default; leaving 100 here would advertise a cap the server does not apply.
- Dominant language
- TypeScript
- Stars
- 9
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from objectionary/eo-vscode
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
objectionary/eo-vscode#204 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
objectionary/eo-vscode#201 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
objectionary/eo-vscode#198 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
objectionary/eo-vscode#197 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 74/100
objectionary/eo-vscode#202 ·
All issues in objectionary/eo-vscode
Similar issues
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100