mfussenegger / nvim-dap

Debug Adapter Protocol client implementation for Neovim
GNU General Public License v3.0
5.1k stars 179 forks source link

very slow when not debuging just plain go to definition #1144

Closed xzbdmw closed 5 months ago

xzbdmw commented 5 months ago

Debug adapter definition and debug configuration

-- { "mfussenegger/nvim-dap" },just include it.

Debug adapter version

No response

Steps to Reproduce

a simple rust project perform gd on a crate or stdlib wait for one second to open the buffer but from then on go to def works instantly disable the plugin make even first goto def instantly It tooks me one hour to one-by-one disable plugin to find the problem

Expected Result

instantly open buffer

Actual Result

very laggy

xzbdmw commented 5 months ago

nvim 0.95 and 0.10 all the same reproduce:

  1. downloading default lazyvim
  2. in plugins/dap.lua add
    return {
    { "mfussenegger/nvim-dap" },
    {
        "leoluz/nvim-dap-go",
        config = function()
            require("dap-go").setup()
        end,
    }
    }

    in plugin/rust.lua add

    
    return {
    "mrcjkb/rustaceanvim",
    -- version = "^3", -- Recommended
    ft = { "rust" },
    }
    and open a simple rust project do gd
mfussenegger commented 5 months ago

nvim-dap by itself doesn't do any actions on loading buffers.

Maybe rustaceanvim is loading some debug configurations via cargo if nvim-dap is available. But that's then up to rustaceanvim - nothing I can do about that in nvim-dap