Compare commits

...

2 commits

Author SHA1 Message Date
569e384a34
fix(neovim): adjust csharp ftplugin to correctly debug projects 2025-04-23 23:10:41 -03:00
1fb6ca64d2
feat(neovim): hide inlay hints on insert mode
They seem to be nice but while inserting it can be very jarring.
2025-04-23 19:21:27 -03:00
2 changed files with 6 additions and 7 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,7 +14,6 @@
local M = {
dotnet_cmd = vim.fn.exepath "dotnet",
launch_options = {
cwd = "${env:CSPROJ_LOCATION}",
name = "Launch project DLL",
request = "launch",
type = "netcoredbg",
@ -60,14 +59,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_location = string.sub(file_path, 1, sub_start - 1)
local project_path = vim.fn.simplify(vim.fn.getcwd() .. "/" .. 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 = "bin/Debug/" .. target_framework .. "/" .. project_name .. ".dll",
dll_path = project_path .. "bin/Debug/" .. target_framework .. "/" .. project_name .. ".dll",
name = project_name,
project_path = vim.fn.simplify(vim.fn.getcwd() .. "/" .. project_location),
project_path = project_path,
target_framework = target_framework,
}
end
@ -116,10 +115,9 @@ 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,6 +15,7 @@ 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" },