-
Notifications
You must be signed in to change notification settings - Fork 17
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
Null response for empty completion requests #17
Comments
Ooh, that's interesting - my understanding was that null means "completions not supported here" (VSCode seems to show an empty completion list if I return If I start always returning non- FWIW, my LSP client implementation is perfectly happy either way: How about if I add a feature flag to return empty completion lists instead of |
…an null. We can't always do this because our extension depends on VSCode's behaviour when null is returned vs an empty completion list (when null is returned, no completion list is displayed; when an empty completion list is returned, purely-textual completions are displayed based on current file contents). #17
Ok - after starting the language service, you can now get the behaviour you want by sending it a "workspace/didChangeConfiguration" message {
"settings": {
"msbuildProjectTools": {
"language": {
"enable": true,
"logLevel": "Information",
"experimentalFeatures": [
"empty-completion-lists"
]
}
}
}
} BTW, the full settings schema is: {
"settings": {
"msbuildProjectTools": {
"language": {
"enable": true,
"disableHover": false,
"logLevel": "Information",
"seqLogging": {
"url": "http://localhost:5341/",
"apiKey": "KN3CFcqcWmsirb3ztL9g",
"logLevel": "Verbose"
},
"completionsFromProject": [
"Property",
"ItemType",
"ItemMetadata",
"Target",
"Task"
],
"experimentalFeatures": [
"expressions",
"empty-completion-lists"
]
},
"nuget": {
"newestVersionsFirst": true,
"disablePrefetch": true
}
}
}
} |
BTW, sorry for the slow response - I didn't get the notification until this morning, for some reason! |
Is there a possibility for the experimentalFeatures to be set within the initializationOptions of the BTW, sorry for the very slow response, was busy with other tasks |
No problem :) |
Ok, yep, looks like I can do it - give me a couple of minutes. Do you need a new package, or can you run from source? |
Basically, just pass something like the following JSON in {
"msbuildProjectTools": {
"logging": {
"level": "Information"
},
"nuget": {
"newestVersionsFirst": true,
"disablePrefetch": true
},
"experimentalFeatures": [
"empty-completion-lists"
],
"schemaVersion": 1
}
} |
Perfect! That did it, no more errors on my end. We will need a new package if that is a possibility then we will be able to add your completion-suggestion work to aCute (Whoot!) and have the rest of the features functional once the initialization capabilities issue is solved. |
Woohoo! Ok, will put put out a new release sometime this morning then :) |
Ok, @LucasBullen, here you go - v0.2.15 |
PS. Thanks for using this - it's great to see broader adoption :) |
BTW, not sure if you support snippet-style completions; if not, some types of completions (e.g. new elements) may not work correctly yet. Let me know if this is the case, and I can either offer a setting to turn off unsupported suggestion types (quick) or implement a fall-back to regular-style completions (may take a while, but definitely doable, although the UX is slightly less pleasant without snippet-style support we have no control over cursor positioning after inserting the completion). |
Thanks! Yes lsp4e has snippet-style completion support and the new cut works great. |
Request:
Response:
Looking at the LSP for completion-requests, the expected response should be
CompletionItem[] | CompletionList
.null
is not accepted or else the protocol would look like the Goto Definition Request Protocol:Location | Location[] | null
The text was updated successfully, but these errors were encountered: