Compare commits

..

No commits in common. "569e384a34e287a021fe7ab5b52c3415e51ec8a1" and "d8b6f05c1e809d02888b3a3a24223bc3f5fff09f" have entirely different histories.

2 changed files with 7 additions and 6 deletions

View file

@ -5,7 +5,7 @@
---@field target_framework string
---@class CSFTPlugin.LaunchOptions: dap.Configuration
---@field cwd string?
---@field cwd string
---@field program (fun(): thread)?
---@class CSFTPlugin
@ -14,6 +14,7 @@
local M = {
dotnet_cmd = vim.fn.exepath "dotnet",
launch_options = {
cwd = "${env:CSPROJ_LOCATION}",
name = "Launch project DLL",
request = "launch",
type = "netcoredbg",
@ -59,14 +60,14 @@ function M.find_projects()
local sub_start, sub_end = string.find(file_path, "%w+%" .. csproj_extension)
local project_name = string.sub(file_path, sub_start or 1, sub_end - #csproj_extension)
local project_path = vim.fn.simplify(vim.fn.getcwd() .. "/" .. string.sub(file_path, 1, sub_start - 1))
local project_location = string.sub(file_path, 1, sub_start - 1)
local target_framework = M.cmd("rg -e 'TargetFramework>(.*)<' -r '$1' -o " .. file_path)[1]
projects[#projects + 1] = {
dll_path = project_path .. "bin/Debug/" .. target_framework .. "/" .. project_name .. ".dll",
dll_path = "bin/Debug/" .. target_framework .. "/" .. project_name .. ".dll",
name = project_name,
project_path = project_path,
project_path = vim.fn.simplify(vim.fn.getcwd() .. "/" .. project_location),
target_framework = target_framework,
}
end
@ -115,9 +116,10 @@ function M:choose_dll()
if path ~= dap.ABORT then
self:run "build"
self.launch_options.cwd = item.project_path
end
vim.fn.setenv("CSPROJ_LOCATION", item.project_path)
coroutine.resume(search_coroutine, path)
end
)

View file

@ -15,7 +15,6 @@ return {
{ import = "astrocommunity.motion.mini-ai" },
{ import = "astrocommunity.motion.mini-surround" },
{ import = "astrocommunity.recipes.astrolsp-no-insert-inlay-hints" },
{ import = "astrocommunity.recipes.diagnostic-virtual-lines-current-line" },
{ import = "astrocommunity.test.neotest" },