Skip to content

LSP Warning: Ignoring workspace folder (unsupported or invalid URI) when opening diffview files #2058

@SirJayEarn

Description

@SirJayEarn

Language Server Version

v0.38.3

Terraform Version

1.13.2 on darwin_arm64

Client Version

NVIM v0.11.5

Terraform Configuration

terraform {
  required_version = ">= 1.5.0"
}

provider "aws" {
  region = "eu-central-1"
}

Steps to Reproduce

  1. in a git repo create a terraform file with some content (for example with the above minimal content)
  2. commit the new file
  3. open the file in neovim and do some changes
  4. open the diff-view of the plugin diffview.nvim via :DiffviewOpen
  5. see the warning in the messages output

The issue is, that for the before state a path like diffview:///Users/my-user/my-project/.git/:0:/terraform/my-file.tf gets passed to the language server and the language server seem to not expect something like that. The warning output is:

LSP[terraformls][Warning] Ignoring workspace folder (unsupport or invalid URI) diffview:///Users/my-user/my-project/.git/:0:/terraform/providers.tf. This is most likely bug, plea se report it.

Sure this could be considered an issue, that should be fixed on diffview.nvim's side. However I did not yet encounter this issue with other language servers.

Expected Behavior

The lsp client should not attach to this buffer and no warning should be shown

Actual Behavior

A warning is shown that needs to be manually confirmed

Gist

No response

Workarounds

No response

References

Help Wanted

  • I'm interested in contributing a fix myself

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions