OmniSharp / OmniSharp/csharp-language-server-protocol

Documentation property always null in CompletionItem

Open
#874 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
638
Forks
109
Avg merge
1m
Merged PRs (30d)
2

Description

If I use the method RequestCompletion() I got a CompletionList with functions/methods. If I select a CompletionItem from this list the Documentation property is always null also for standard functions like print(). This is what I've tried:

` var actualCompletions = await _client.TextDocument.RequestCompletion(
new CompletionParams
{
TextDocument = @"path\to\script.py",
Position = (24, 9),
}, cancellationTokenSource.Token
);

            System.Threading.Thread.Sleep(1000);

            IEnumerable<CompletionItem> cmpltItems = actualCompletions?.Items;
            var cmpltItem = (cmpltItems?.FirstOrDefault(p => p.Label == "print"));
            if (cmpltItem != null)
            {
                Console.WriteLine(cmpltItem.Documentation);
            }`

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. Start by tracing TextDocument.RequestCompletion and how CompletionItem.Documentation is populated or deserialized, using the shown print() reproduction; done means the selected completion item exposes its documentation instead of null.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.