Skip to content

roslyn: -32000: Attempted to retrieve a Document but a TextDocument was found instead. #336

@stasnocap

Description

@stasnocap

Description

Getting this error on every move in cshtml
roslyn: -32000: Attempted to retrieve a Document but a TextDocument was found instead.

Neovim version

NVIM v0.11.5

Operating system and version

WSL version: 2.6.3.0 Arch

Expected behavior

Do not getting error

Actual behavior

  1. dotnet new webapp
  2. open cs file wait for init
  3. cs is ok, open cshtml
  4. this error for any move
    roslyn: -32000: Attempted to retrieve a Document but a TextDocument was found instead.

Minimal config

vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

require("lazy.minit").repro({
    spec = {
        {

            "mason-org/mason.nvim",
            ensure_installed = { "csharpier", "netcoredbg", "roslyn", "html-lsp" },
            opts = {
                registries = {
                    "github:mason-org/mason-registry",
                    "github:crashdummyy/mason-registry",
                },
            },
        },
        {
            "seblyng/roslyn.nvim"
        },
    },
})

Roslyn checkhealth

==============================================================================
roslyn:                                                                     ✅

roslyn.nvim: Requirements ~
- ✅ OK Neovim >= 0.11
- ✅ OK dotnet SDK >= 10 (found 10.0.103)

roslyn.nvim: Roslyn Language Server ~
- ✅ OK /home/stasnocap/.local/share/nvim/mason/bin/roslyn: found
- ✅ OK Razor extension: found at /home/stasnocap/.local/share/nvim/mason/packages/roslyn/libexec/.razorExtension
- ✅ OK vscode-html-language-server: found
- ✅ OK html-lsp client: configured

roslyn.nvim: File Watching Configuration ~
- ✅ OK File watching: auto (using Roslyn's built-in file watcher)

roslyn.nvim: Solution Detection ~
- No solution selected

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions