Skip to content

Conversation

@RikkiGibson
Copy link
Member

Replaces #79275
Related to #78755

@RikkiGibson RikkiGibson requested a review from a team as a code owner October 22, 2025 00:04

// TODO: Span-ify GetDirectoryName and similar helpers
var contentDirectory = PathUtilities.GetDirectoryName(contentPrefix.ToString());
var items = await fileSystemHelper.GetItemsAsync(contentDirectory, context.CancellationToken).ConfigureAwait(false);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it supported to reference projects in other directories? For example, should we consider adding all the projects in the solution to this set?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could definitely consider providing completions for "projects we know about". That might be more convenient than simply recommending "here's the next directory in the path you are typing out".

Since we have a Document, could we literally go from Document to Solution, get all the project paths, and include relative paths to the projects, as completion items?

Copy link
Member

@dibarbet dibarbet Oct 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup that sounds like what I was thinking. Have to be careful to make sure the project path exists (there are occasionally virtual projects for various edge scenarios - misc, typescript, razor)

That might be more convenient than simply recommending "here's the next directory in the path you are typing out"

I think both are definitely valuable (may not always have a solution open)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will take a stab at it in a follow up

[".csproj", ".vbproj"],
CompletionItemRules.Default);

// TODO: Span-ify GetDirectoryName and similar helpers
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that this suggestion is not straightforward and that the benefit is somewhat speculative. I would prefer to not put a tracking issue for it on the backlog, so I am going to just delete the comment.

Suggested change
// TODO: Span-ify GetDirectoryName and similar helpers

@RikkiGibson RikkiGibson enabled auto-merge (squash) October 22, 2025 19:49
@RikkiGibson RikkiGibson merged commit ce54e69 into dotnet:main Oct 22, 2025
24 of 25 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Oct 22, 2025
{
for (var i = 0; i < span.Length; i++)
{
if (!char.IsWhiteSpace(span[i]))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider just unifiying this helper with

public static int? GetFirstNonWhitespaceOffset(this string line)
.

Copy link
Member

@jasonmalinowski jasonmalinowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice that we're able to reuse what we've already got here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants