Compare commits
No commits in common. "f6051a1f2918d3508b2e96a8d8b3f76afc3edc4f" and "d00e978fd44076a8b994e3bbce77444c25a3bf49" have entirely different histories.
f6051a1f29
...
d00e978fd4
|
@ -83,10 +83,6 @@ end
|
||||||
|
|
||||||
---@return thread
|
---@return thread
|
||||||
function M:choose_dll()
|
function M:choose_dll()
|
||||||
self.projects = self.find_projects()
|
|
||||||
|
|
||||||
local dap = require "dap"
|
|
||||||
|
|
||||||
return coroutine.create(function(search_coroutine)
|
return coroutine.create(function(search_coroutine)
|
||||||
vim.ui.select(
|
vim.ui.select(
|
||||||
self.projects,
|
self.projects,
|
||||||
|
@ -100,13 +96,9 @@ function M:choose_dll()
|
||||||
},
|
},
|
||||||
---@param item CSFTPlugin.Project
|
---@param item CSFTPlugin.Project
|
||||||
function(item)
|
function(item)
|
||||||
local path = item and item.dll_path or dap.ABORT
|
|
||||||
|
|
||||||
if path ~= dap.ABORT then
|
|
||||||
self:run "build"
|
self:run "build"
|
||||||
end
|
|
||||||
|
|
||||||
coroutine.resume(search_coroutine, path)
|
coroutine.resume(search_coroutine, item and item.dll_path or require("dap").ABORT)
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
end)
|
end)
|
||||||
|
@ -120,20 +112,10 @@ function M:start()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.fn.setenv("DOTNET_ENVIRONMENT", "Development")
|
self.projects = self.find_projects()
|
||||||
|
|
||||||
local debugger_path = vim.fn.getnixpath "netcoredbg" .. "/bin/netcoredbg"
|
|
||||||
|
|
||||||
local dap = require "dap"
|
local dap = require "dap"
|
||||||
|
|
||||||
---@type dap.ExecutableAdapter
|
|
||||||
dap.adapters.netcoredbg = {
|
|
||||||
type = "executable",
|
|
||||||
command = debugger_path,
|
|
||||||
args = { "--interpreter=vscode" },
|
|
||||||
}
|
|
||||||
|
|
||||||
---@type dap.Configuration[]
|
|
||||||
dap.configurations.cs = {
|
dap.configurations.cs = {
|
||||||
{
|
{
|
||||||
type = "netcoredbg",
|
type = "netcoredbg",
|
||||||
|
@ -145,6 +127,8 @@ function M:start()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vim.notify_once("Loaded projects for nvim-dap", vim.log.levels.INFO)
|
||||||
|
|
||||||
vim.g.loaded_csftplugin = true
|
vim.g.loaded_csftplugin = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ return {
|
||||||
}
|
}
|
||||||
|
|
||||||
local function handleFallbackException(bufnr, err, providerName)
|
local function handleFallbackException(bufnr, err, providerName)
|
||||||
if type(err) == "string" and err:match "UfoFallbackException" then
|
if type(err) == "string" and err:match("UfoFallbackException") then
|
||||||
return require("ufo").getFolds(bufnr, providerName)
|
return require("ufo").getFolds(bufnr, providerName)
|
||||||
else
|
else
|
||||||
return require("promise").reject(err)
|
return require("promise").reject(err)
|
||||||
|
|
|
@ -83,7 +83,7 @@ end, { range = true, nargs = "?" })
|
||||||
|
|
||||||
local dap = require "dap"
|
local dap = require "dap"
|
||||||
|
|
||||||
---@type dap.Adapter
|
-- @type DapAdapter
|
||||||
dap.adapters.codelldb = {
|
dap.adapters.codelldb = {
|
||||||
port = "${port}",
|
port = "${port}",
|
||||||
type = "server",
|
type = "server",
|
||||||
|
@ -93,7 +93,7 @@ dap.adapters.codelldb = {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
---@type dap.Adapter
|
-- @type DapAdapter
|
||||||
dap.adapters.cppdbg = {
|
dap.adapters.cppdbg = {
|
||||||
id = "cppdbg",
|
id = "cppdbg",
|
||||||
type = "executable",
|
type = "executable",
|
||||||
|
@ -101,14 +101,21 @@ dap.adapters.cppdbg = {
|
||||||
"{pkgs.vscode-extensions.ms-vscode.cpptools}/share/vscode/extensions/ms-vscode.cpptools/debugAdapters/bin/OpenDebugAD7",
|
"{pkgs.vscode-extensions.ms-vscode.cpptools}/share/vscode/extensions/ms-vscode.cpptools/debugAdapters/bin/OpenDebugAD7",
|
||||||
}
|
}
|
||||||
|
|
||||||
---@type dap.Adapter
|
-- @type DapAdapter
|
||||||
|
dap.adapters.netcoredbg = {
|
||||||
|
type = "executable",
|
||||||
|
command = "netcoredbg",
|
||||||
|
args = { "--interpreter=vscode" },
|
||||||
|
}
|
||||||
|
|
||||||
|
-- @type DapAdapter
|
||||||
dap.adapters.godot = {
|
dap.adapters.godot = {
|
||||||
type = "server",
|
type = "server",
|
||||||
host = "127.0.0.1",
|
host = "127.0.0.1",
|
||||||
port = 6006,
|
port = 6006,
|
||||||
}
|
}
|
||||||
|
|
||||||
---@type dap.Configuration[]
|
-- @type DapConfiguration
|
||||||
dap.configurations.rust = {
|
dap.configurations.rust = {
|
||||||
{
|
{
|
||||||
name = "Launch file",
|
name = "Launch file",
|
||||||
|
@ -122,7 +129,7 @@ dap.configurations.rust = {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
---@type dap.Configuration[]
|
-- @type DapConfiguration
|
||||||
dap.configurations.cpp = {
|
dap.configurations.cpp = {
|
||||||
{
|
{
|
||||||
name = "Launch file",
|
name = "Launch file",
|
||||||
|
@ -150,7 +157,29 @@ dap.configurations.cpp = {
|
||||||
|
|
||||||
dap.configurations.c = dap.configurations.cpp
|
dap.configurations.c = dap.configurations.cpp
|
||||||
|
|
||||||
---@type dap.Configuration[]
|
-- @type DapConfiguration
|
||||||
|
dap.configurations.cs = {
|
||||||
|
{
|
||||||
|
type = "netcoredbg",
|
||||||
|
name = "Launch DLL",
|
||||||
|
request = "launch",
|
||||||
|
program = function()
|
||||||
|
return vim.fn.input("Path to dll", vim.fn.getcwd() .. "/bin/Debug/", "file")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "netcoredbg",
|
||||||
|
name = "Attach to debugger",
|
||||||
|
request = "attach",
|
||||||
|
program = function()
|
||||||
|
return vim.fn.input("Path to dll", vim.fn.getcwd() .. "/bin/Debug/", "file")
|
||||||
|
end,
|
||||||
|
pid = "${command:pickProcess}",
|
||||||
|
cwd = "${workspaceFolder}",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- @type DapConfiguration
|
||||||
dap.configurations.gdscript = {
|
dap.configurations.gdscript = {
|
||||||
{
|
{
|
||||||
name = "Launch scene",
|
name = "Launch scene",
|
||||||
|
|
Loading…
Reference in a new issue