omnisharp-roslyn icon indicating copy to clipboard operation
omnisharp-roslyn copied to clipboard

Add MaxItemsToReturn to the request model to allow specifying values other than 100

Open lynkz-matt-psaltis opened this issue 2 years ago • 3 comments

https://github.com/OmniSharp/omnisharp-roslyn/blob/7299d0836af701b61dbbeb823c6a1efbb3010867/src/OmniSharp.LanguageServerProtocol/Handlers/OmniSharpWorkspaceSymbolsHandler.cs#L49

Pretty please?

lynkz-matt-psaltis avatar Mar 03 '23 10:03 lynkz-matt-psaltis

This is already exposed as a custom property on the OmniSharp's own custom API. However in the LSP server it's not defined as the property by the spec (https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspaceSymbolParams).

filipw avatar Mar 04 '23 14:03 filipw

Thanks @filipw that makes a heap of sense! I was wondering, from the spec it doesn't seem to specify a behaviour of 100 items as a limit but instead says to use a blank query string to return all items. Does that make the current behaviour non-compliant? Cheers!

matt-psaltis avatar Mar 04 '23 23:03 matt-psaltis

yes this is an arbitrary value chose to not hinder performance. At the same time, as you provide more characters it then should narrow down.

What we can do - I guess - is to expose it in the OmniSharp config, where you can tweak such "defaults" for yourself? This was previously brought up for similar related topics, e.g. request timeouts

filipw avatar Mar 06 '23 08:03 filipw