Skip to content

x/tools/gopls: support single file mode #34160

Closed
@stamblerre

Description

@stamblerre

When the user opens an individual file in their editor, we don't offer any language features. This is because we don't know the module root. Should we have some hack just to support this mode? We could run go env GOMOD and assume that is the root (if that is empty, the directory of the file could be the root).

Note that this will be particularly difficult, as we won't be able to initialize any views until we receive a textDocument/didOpen for the specific file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.ToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions