Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Add incremental sync experimental option #2493

Merged
merged 1 commit into from
May 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,11 @@
"type": "boolean",
"default": false,
"description": "If true, the language server will provide build, vet errors and the extension will ignore the `buildOnSave`, `vetOnSave` settings."
},
"incrementalSync": {
"type": "boolean",
"default": false,
"description": "If true, the language server will accept incremental document synchronization."
}
},
"default": {
Expand Down Expand Up @@ -1435,4 +1440,4 @@
]
}
}
}
}
5 changes: 3 additions & 2 deletions src/goMain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,10 @@ export function activate(ctx: vscode.ExtensionContext): void {
{
initializationOptions: {
funcSnippetEnabled: vscode.workspace.getConfiguration('go')['useCodeSnippetsOnFunctionSuggest'],
gocodeCompletionEnabled: languageServerExperimentalFeatures['autoComplete']
gocodeCompletionEnabled: languageServerExperimentalFeatures['autoComplete'],
incrementalSync: languageServerExperimentalFeatures['incrementalSync']
},
documentSelector: ['go'],
documentSelector: ['go', 'go.mod', 'go.sum'],
uriConverters: {
// Apply file:/// scheme to all file paths.
code2Protocol: (uri: vscode.Uri): string => (uri.scheme ? uri : uri.with({ scheme: 'file' })).toString(),
Expand Down