Closed stevearc closed 4 years ago
Hey Steve, nice to see you again!
It looks like CompletionText
and MethodHeader
are both v:null
in this case. Are there any other fields we can/should use instead? If there's nothing useful then filtering like this is the way to go.
Do you happen to have the response handy? I don't think I've hit this before so I'd be interested in seeing it, to help prevent regressions later on.
Yeah, here's echoing out the value of cmp
:
{'RequiredNamespaceImport': v:null, 'MethodHeader': v:null, 'CompletionText': 'null', 'Description': v:null, 'Snippet': 'null', 'Kind': v:null, 'DisplayText': 'null', 'ReturnType': v:null, 'Preselect': v:false, 'IsSuggestionMode': v:false}
Pretty useless. Likely OmniSharp shouldn't be giving us this result in the first place, but it's easier to filter it here than track that down.
Another thing I didn't fully understand is that it looks like CompletionText
is the string "null", rather than v:null
, but if I check the equality of it, it's definitely == v:null. ¯\(ツ)/¯
Yeah that's all pretty useless to us, good to filter it here.
I haven't seen that 'RequiredNamespaceImport'
before though! It'll be great if we can automatically insert that when using the completion!
I wonder what those 'Preselect'
and 'IsSuggestionMode'
are for?
Thanks!
Hi Nick! It's been a while, but I'm back to doing some C# development. I see you've been busy! This project is a lot better than the last time I used it.
I was setting up deoplete to use the omnifunc as a completion source, but hit a crash in the fuzzy matcher because one of the complete options had
None
for the word. I checked the OmniSharp complete handler, and sure enough there was a null word sneaking in somehow. From the docs, word is mandatory so I think the correct fix is to filter the null value here before returning it.