diff --git a/lua/dap/ext/vscode.lua b/lua/dap/ext/vscode.lua index 1d22d4ef..cdcdfd03 100644 --- a/lua/dap/ext/vscode.lua +++ b/lua/dap/ext/vscode.lua @@ -19,10 +19,11 @@ function M.load_launchjs(path) assert(data.configurations, "launch.json must have a 'configurations' key") for _, config in ipairs(data.configurations) do assert(config.type, "Configuration in launch.json must have a 'type' key") - local configurations = dap.configurations[config.type] + local config_key = config.nvimKey or config.type + local configurations = dap.configurations[config_key] if not configurations then configurations = {} - dap.configurations[config.type] = configurations + dap.configurations[config_key] = configurations end table.insert(configurations, config) end diff --git a/lua/dap/session.lua b/lua/dap/session.lua index 26784d42..776b7977 100644 --- a/lua/dap/session.lua +++ b/lua/dap/session.lua @@ -732,9 +732,9 @@ end function Session:initialize(config) self.config = config self:request('initialize', { - clientId = 'neovim'; - clientname = 'neovim'; - adapterID = 'nvim-dap'; + clientID = config.clientID or 'neovim'; + clientName = config.clientName or 'neovim'; + adapterID = config.type or 'nvim-dap'; pathFormat = 'path'; columnsStartAt1 = true; linesStartAt1 = true;