Compare commits
2 commits
d00e978fd4
...
f6051a1f29
Author | SHA1 | Date | |
---|---|---|---|
|
f6051a1f29 | ||
|
4044df17c2 |
|
@ -83,6 +83,10 @@ end
|
|||
|
||||
---@return thread
|
||||
function M:choose_dll()
|
||||
self.projects = self.find_projects()
|
||||
|
||||
local dap = require "dap"
|
||||
|
||||
return coroutine.create(function(search_coroutine)
|
||||
vim.ui.select(
|
||||
self.projects,
|
||||
|
@ -96,9 +100,13 @@ function M:choose_dll()
|
|||
},
|
||||
---@param item CSFTPlugin.Project
|
||||
function(item)
|
||||
self:run "build"
|
||||
local path = item and item.dll_path or dap.ABORT
|
||||
|
||||
coroutine.resume(search_coroutine, item and item.dll_path or require("dap").ABORT)
|
||||
if path ~= dap.ABORT then
|
||||
self:run "build"
|
||||
end
|
||||
|
||||
coroutine.resume(search_coroutine, path)
|
||||
end
|
||||
)
|
||||
end)
|
||||
|
@ -112,10 +120,20 @@ function M:start()
|
|||
return
|
||||
end
|
||||
|
||||
self.projects = self.find_projects()
|
||||
vim.fn.setenv("DOTNET_ENVIRONMENT", "Development")
|
||||
|
||||
local debugger_path = vim.fn.getnixpath "netcoredbg" .. "/bin/netcoredbg"
|
||||
|
||||
local dap = require "dap"
|
||||
|
||||
---@type dap.ExecutableAdapter
|
||||
dap.adapters.netcoredbg = {
|
||||
type = "executable",
|
||||
command = debugger_path,
|
||||
args = { "--interpreter=vscode" },
|
||||
}
|
||||
|
||||
---@type dap.Configuration[]
|
||||
dap.configurations.cs = {
|
||||
{
|
||||
type = "netcoredbg",
|
||||
|
@ -127,8 +145,6 @@ function M:start()
|
|||
},
|
||||
}
|
||||
|
||||
vim.notify_once("Loaded projects for nvim-dap", vim.log.levels.INFO)
|
||||
|
||||
vim.g.loaded_csftplugin = true
|
||||
end
|
||||
|
||||
|
|
|
@ -11,8 +11,8 @@ vim.opt.rtp:prepend(lazypath)
|
|||
if not pcall(require, "lazy") then
|
||||
-- stylua: ignore
|
||||
vim.api.nvim_echo({ { ("Unable to load lazy from: %s\n"):format(lazypath), "ErrorMsg" }, { "Press any key to exit...", "MoreMsg" } }, true, {})
|
||||
vim.fn.getchar()
|
||||
vim.cmd.quit()
|
||||
vim.fn.getchar()
|
||||
vim.cmd.quit()
|
||||
end
|
||||
|
||||
require "lazy_setup"
|
||||
|
|
|
@ -3,8 +3,8 @@ require("lazy").setup({
|
|||
"AstroNvim/AstroNvim",
|
||||
--version = "^4", -- Remove version tracking to elect for nighly AstroNvim
|
||||
import = "astronvim.plugins",
|
||||
opts = { -- AstroNvim options must be set here with the `import` key
|
||||
mapleader = " ", -- This ensures the leader key must be configured before Lazy is set up
|
||||
opts = { -- AstroNvim options must be set here with the `import` key
|
||||
mapleader = " ", -- This ensures the leader key must be configured before Lazy is set up
|
||||
maplocalleader = ",", -- This ensures the localleader key must be configured before Lazy is set up
|
||||
icons_enabled = true, -- Set to false to disable icons (if no Nerd Font is available)
|
||||
pin_plugins = nil, -- Default will pin plugins when tracking `version` of AstroNvim, set to true/false to override
|
||||
|
|
|
@ -11,11 +11,11 @@ return {
|
|||
-- Configure core features of AstroNvim
|
||||
features = {
|
||||
large_buf = { size = 1024 * 500, lines = 10000 }, -- set global limits for large files for disabling features like treesitter
|
||||
autopairs = true, -- enable autopairs at start
|
||||
cmp = true, -- enable completion at start
|
||||
diagnostics_mode = 3, -- diagnostic mode on start (0 = off, 1 = no signs/virtual text, 2 = no virtual text, 3 = on)
|
||||
highlighturl = true, -- highlight URLs at start
|
||||
notifications = true, -- enable notifications at start
|
||||
autopairs = true, -- enable autopairs at start
|
||||
cmp = true, -- enable completion at start
|
||||
diagnostics_mode = 3, -- diagnostic mode on start (0 = off, 1 = no signs/virtual text, 2 = no virtual text, 3 = on)
|
||||
highlighturl = true, -- highlight URLs at start
|
||||
notifications = true, -- enable notifications at start
|
||||
},
|
||||
-- Diagnostics configuration (for vim.diagnostics.config({...})) when diagnostics are on
|
||||
diagnostics = {
|
||||
|
@ -24,20 +24,20 @@ return {
|
|||
},
|
||||
-- vim options can be configured here
|
||||
options = {
|
||||
opt = { -- vim.opt.<key>
|
||||
autoindent = true, -- indents automatically based on context
|
||||
expandtab = true, -- use spaces instead of tabs
|
||||
opt = { -- vim.opt.<key>
|
||||
autoindent = true, -- indents automatically based on context
|
||||
expandtab = true, -- use spaces instead of tabs
|
||||
grepprg = "rg --vimgrep", -- use ripgrep on grep actions
|
||||
number = true, -- sets vim.opt.number
|
||||
relativenumber = true, -- sets vim.opt.relativenumber
|
||||
shiftwidth = 2, -- how many spaces after indentation
|
||||
signcolumn = "auto", -- sets vim.opt.signcolumn to auto
|
||||
smartindent = true, -- smartly indent
|
||||
spell = false, -- sets vim.opt.spell
|
||||
tabstop = 2, -- how many spaces to indent when pressing tab
|
||||
wrap = false, -- sets vim.opt.wrap
|
||||
number = true, -- sets vim.opt.number
|
||||
relativenumber = true, -- sets vim.opt.relativenumber
|
||||
shiftwidth = 2, -- how many spaces after indentation
|
||||
signcolumn = "auto", -- sets vim.opt.signcolumn to auto
|
||||
smartindent = true, -- smartly indent
|
||||
spell = false, -- sets vim.opt.spell
|
||||
tabstop = 2, -- how many spaces to indent when pressing tab
|
||||
wrap = false, -- sets vim.opt.wrap
|
||||
},
|
||||
g = { -- vim.g.<key>
|
||||
g = { -- vim.g.<key>
|
||||
-- configure global vim variables (vim.g)
|
||||
-- NOTE: `mapleader` and `maplocalleader` must be set in the AstroNvim opts or before `lazy.setup`
|
||||
-- This can be found in the `lua/lazy_setup.lua` file
|
||||
|
|
|
@ -9,7 +9,7 @@ return {
|
|||
}
|
||||
|
||||
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)
|
||||
else
|
||||
return require("promise").reject(err)
|
||||
|
|
|
@ -2,57 +2,57 @@
|
|||
|
||||
---@type LazySpec
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
---@param _ LazyPlugin
|
||||
---@param opts TSConfig
|
||||
opts = function(_, opts)
|
||||
-- disable automatically installing parsers
|
||||
opts.auto_install = false
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
---@param _ LazyPlugin
|
||||
---@param opts TSConfig
|
||||
opts = function(_, opts)
|
||||
-- disable automatically installing parsers
|
||||
opts.auto_install = false
|
||||
|
||||
-- add more things to the ensure_installed table protecting against community packs modifying it
|
||||
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed --[[@as string[]], {
|
||||
-- Programming
|
||||
"c",
|
||||
"c_sharp",
|
||||
"cmake",
|
||||
"cpp",
|
||||
"css",
|
||||
"gdscript",
|
||||
"godot_resource",
|
||||
"html",
|
||||
"hyprlang",
|
||||
"javascript",
|
||||
"jsdoc",
|
||||
"lua",
|
||||
"nim",
|
||||
"nim_format_string",
|
||||
"objc",
|
||||
"proto",
|
||||
"python",
|
||||
"razor",
|
||||
"svelte",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vue",
|
||||
-- Scripting
|
||||
"bash",
|
||||
"fish",
|
||||
"glsl",
|
||||
-- Configuring
|
||||
"dockerfile",
|
||||
"json",
|
||||
"jsonc",
|
||||
"nix",
|
||||
"vhs",
|
||||
"yaml",
|
||||
-- Misc
|
||||
"cuda",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"query",
|
||||
-- VIM
|
||||
"vim",
|
||||
"vimdoc",
|
||||
})
|
||||
end,
|
||||
-- add more things to the ensure_installed table protecting against community packs modifying it
|
||||
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed --[[@as string[]], {
|
||||
-- Programming
|
||||
"c",
|
||||
"c_sharp",
|
||||
"cmake",
|
||||
"cpp",
|
||||
"css",
|
||||
"gdscript",
|
||||
"godot_resource",
|
||||
"html",
|
||||
"hyprlang",
|
||||
"javascript",
|
||||
"jsdoc",
|
||||
"lua",
|
||||
"nim",
|
||||
"nim_format_string",
|
||||
"objc",
|
||||
"proto",
|
||||
"python",
|
||||
"razor",
|
||||
"svelte",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vue",
|
||||
-- Scripting
|
||||
"bash",
|
||||
"fish",
|
||||
"glsl",
|
||||
-- Configuring
|
||||
"dockerfile",
|
||||
"json",
|
||||
"jsonc",
|
||||
"nix",
|
||||
"vhs",
|
||||
"yaml",
|
||||
-- Misc
|
||||
"cuda",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"query",
|
||||
-- VIM
|
||||
"vim",
|
||||
"vimdoc",
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
|
@ -83,7 +83,7 @@ end, { range = true, nargs = "?" })
|
|||
|
||||
local dap = require "dap"
|
||||
|
||||
-- @type DapAdapter
|
||||
---@type dap.Adapter
|
||||
dap.adapters.codelldb = {
|
||||
port = "${port}",
|
||||
type = "server",
|
||||
|
@ -93,7 +93,7 @@ dap.adapters.codelldb = {
|
|||
},
|
||||
}
|
||||
|
||||
-- @type DapAdapter
|
||||
---@type dap.Adapter
|
||||
dap.adapters.cppdbg = {
|
||||
id = "cppdbg",
|
||||
type = "executable",
|
||||
|
@ -101,21 +101,14 @@ dap.adapters.cppdbg = {
|
|||
"{pkgs.vscode-extensions.ms-vscode.cpptools}/share/vscode/extensions/ms-vscode.cpptools/debugAdapters/bin/OpenDebugAD7",
|
||||
}
|
||||
|
||||
-- @type DapAdapter
|
||||
dap.adapters.netcoredbg = {
|
||||
type = "executable",
|
||||
command = "netcoredbg",
|
||||
args = { "--interpreter=vscode" },
|
||||
}
|
||||
|
||||
-- @type DapAdapter
|
||||
---@type dap.Adapter
|
||||
dap.adapters.godot = {
|
||||
type = "server",
|
||||
host = "127.0.0.1",
|
||||
port = 6006,
|
||||
}
|
||||
|
||||
-- @type DapConfiguration
|
||||
---@type dap.Configuration[]
|
||||
dap.configurations.rust = {
|
||||
{
|
||||
name = "Launch file",
|
||||
|
@ -129,7 +122,7 @@ dap.configurations.rust = {
|
|||
},
|
||||
}
|
||||
|
||||
-- @type DapConfiguration
|
||||
---@type dap.Configuration[]
|
||||
dap.configurations.cpp = {
|
||||
{
|
||||
name = "Launch file",
|
||||
|
@ -157,29 +150,7 @@ dap.configurations.cpp = {
|
|||
|
||||
dap.configurations.c = dap.configurations.cpp
|
||||
|
||||
-- @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
|
||||
---@type dap.Configuration[]
|
||||
dap.configurations.gdscript = {
|
||||
{
|
||||
name = "Launch scene",
|
||||
|
|
Loading…
Reference in a new issue