Skip to content
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

Range must not span multiple lines (Parameter 'range') #906

Open
thecodrr opened this issue Dec 3, 2022 · 0 comments
Open

Range must not span multiple lines (Parameter 'range') #906

thecodrr opened this issue Dec 3, 2022 · 0 comments

Comments

@thecodrr
Copy link

thecodrr commented Dec 3, 2022

I am trying to use Omnisharp with Kate Text Editor through their LSP client implementation. However, the semantic tokens implementation fails with this error:

OmniSharp.Extensions.JsonRpc.InputHandler: Failed to handle request textDocument/semanticTokens/range 339 - System.ArgumentOutOfRangeException: Range must not span multiple lines (Parameter 'range')
at OmniSharp.Extensions.LanguageServer.Protocol.Document.SemanticTokensBuilder.Push(Range range, Int32 tokenType, Int32 tokenModifiers)
at OmniSharp.LanguageServerProtocol.Handlers.OmniSharpSemanticTokensHandler.Tokenize(SemanticTokensBuilder builder, ITextDocumentIdentifierParams identifier, CancellationToken cancellationToken) in /home/vsts/work/1/s/src/OmniSharp.LanguageServerProtocol/Handlers/OmniSharpSemanticTokensHandler.cs:line 83
at OmniSharp.Extensions.LanguageServer.Protocol.Document.SemanticTokensHandlerBase.Handle(SemanticTokensRangeParams request, CancellationToken cancellationToken)
at OmniSharp.Extensions.LanguageServer.Server.Pipelines.SemanticTokensDeltaPipeline`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at OmniSharp.Extensions.LanguageServer.Server.Pipelines.ResolveCommandPipeline`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestPreProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestPostProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestExceptionProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestExceptionProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestExceptionActionProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestExceptionActionProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at OmniSharp.Extensions.JsonRpc.RequestRouterBase`1.g__InnerRoute|5_0(IServiceScopeFactory serviceScopeFactory, Request request, TDescriptor descriptor, Object params, CancellationToken token, ILogger logger)
at OmniSharp.Extensions.JsonRpc.RequestRouterBase`1.RouteRequest(IRequestDescriptor`1 descriptors, Request request, CancellationToken token)
at OmniSharp.Extensions.JsonRpc.InputHandler.c__DisplayClass38_0.b__5>d.MoveNext() | Method='textDocument/semanticTokens/range' RequestId='339'

Kate sends the request for the currently visible portion of the document. It works without an issue with typescript-language-server, clangd & rust-analyzer etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant