-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't extend selection when completion is triggered by typing one or more trigger characters #78
base: master
Are you sure you want to change the base?
Conversation
…preting the target location and its surrounding XML #71 tintoy/msbuild-project-tools-server#129
…g level is `Debug` or `Verbose` #71
…more trigger characters This is because VS Code behaviour has changed, and it no longer correctly handles extension of selection if it has inserted an auto-closing delimiter. #71
Note: I haven't removed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bummer - I’ll have to see whether we can be more selective then. That other completion makes no sense; the rest of the completion text is missing. |
I still can’t figure out what’s going on but it seems to be at the intersection of the language server, protocol-level LSP changes and VSCode’s behaviour for auto-closing angle brackets. |
Actually, I'm having trouble reproducing your issue: Could it be something to do with editor settings? Here are mine: {
"workbench.startupEditor": "none",
"git.inputValidationLength": 300,
"git.inputValidationSubjectLength": null,
"git.confirmSync": false,
"git.autofetch": true,
"workbench.editor.untitled.hint": "hidden",
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"explorer.confirmDragAndDrop": false,
"security.workspace.trust.untrustedFiles": "open",
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"explorer.confirmDelete": false,
"git.enableSmartCommit": true,
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.expand": false,
"redhat.telemetry.enabled": false,
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"prettier.printWidth": 200,
"[python]": {
"editor.formatOnType": true
},
"vs-kubernetes": {
"vscode-kubernetes.helm-path.linux": "/home/tintoy/.local/state/vs-kubernetes/tools/helm/linux-amd64/helm",
"vscode-kubernetes.minikube-path.linux": "/home/tintoy/.local/state/vs-kubernetes/tools/minikube/linux-amd64/minikube"
},
"security.workspace.trust.banner": "always",
"[msbuild]": {
"editor.quickSuggestions": {
"other": "off"
}
},
"editor.renderWhitespace": "all",
"files.associations": {
"*.csproj": "msbuild"
},
"dotnetAcquisitionExtension.existingDotnetPath": [
{
"extensionId": "tintoy.msbuild-project-tools",
"path": "C:\\Program Files\\dotnet\\dotnet.exe"
},
{
"extensionId": "ms-dotnettools.csharp",
"path": "C:\\Program Files\\dotnet\\dotnet.exe"
}
],
"workbench.editor.empty.hint": "hidden",
"msbuildProjectTools.logging.level": "Verbose",
"msbuildProjectTools.logging.trace": true
} |
Got it! Can you change the language type from It looks like something may have changed in the VSCode-provided language definition for XML (which our |
VSCode-provided XML language definitions changed sometime last year, it seems: |
Maybe this one? |
Actually, it looks like the Ours: https://github.com/tintoy/msbuild-project-tools-vscode/blob/master/language-configuration.json For one thing, |
That is really really bad. We should provide equivalent features both to |
I’m open to suggestions if you have any ideas as to how we can do that but I’m out of ideas I’m afraid. The way the XML language is defined now just doesn’t work with how we do completions (and we can’t control the XML language - it’s a shared definition). To be clear, the completions we return are valid and legal completions; it's just that VS Code is not behaving consistently with them. And given how language configurations work, it's starting to feel a little too much like magic ritual for my tastes: https://code.visualstudio.com/api/language-extensions/language-configuration-guide |
And due to the XML parser we use, we need the closing tag ( |
This is because VS Code behaviour has changed, and it no longer correctly handles extension of selection if it has inserted an auto-closing delimiter.
#71