From 034318a7db28868a6b212c6c125ce7bff1ae1ea8 Mon Sep 17 00:00:00 2001 From: Stevan Freeborn <65925598+StevanFreeborn@users.noreply.github.com> Date: Wed, 1 Oct 2025 11:29:14 -0500 Subject: [PATCH] chore: exploring netcoredbg config --- lua/plugins/debugging.lua | 4 +++- lua/plugins/lsp.lua | 1 + lua/vim-options.lua | 30 +++++++++++++++++------------- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/lua/plugins/debugging.lua b/lua/plugins/debugging.lua index 61f487d..fc2e1d6 100644 --- a/lua/plugins/debugging.lua +++ b/lua/plugins/debugging.lua @@ -178,9 +178,11 @@ return { } end + local netcoredbgCommand = vim.fn.stdpath("data") .. "/mason/packages/netcoredbg/netcoredbg/netcoredbg.exe" + dap.adapters.coreclr = { type = "executable", - command = "C:/Users/sfree/AppData/Local/nvim-data/mason/packages/netcoredbg/netcoredbg/netcoredbg.exe", + command = netcoredbgCommand , args = { "--interpreter=vscode" }, } diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 4574eb6..79238c7 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -1,6 +1,7 @@ return { { "williamboman/mason.nvim", + lazy = false, config = function() require("mason").setup() end, diff --git a/lua/vim-options.lua b/lua/vim-options.lua index 763522f..d6fd42f 100644 --- a/lua/vim-options.lua +++ b/lua/vim-options.lua @@ -1,13 +1,17 @@ -vim.cmd("set expandtab") -vim.cmd("set tabstop=2") -vim.cmd("set softtabstop=2") -vim.cmd("set shiftwidth=2") -vim.cmd("set number") -vim.cmd("set relativenumber") -vim.cmd("set shell=pwsh") -vim.cmd("set shellcmdflag=-Command") -vim.cmd("set shellquote=") -vim.cmd("set shellxquote=") +vim.opt.expandtab = true +vim.opt.tabstop = 2 +vim.opt.softtabstop = 2 +vim.opt.shiftwidth = 2 +vim.opt.number = true +vim.opt.relativenumber = true +vim.opt.shell = "pwsh" +vim.opt.shellcmdflag = "-NoLogo -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding" + .. "=[System.Text.Encoding]::UTF8;$PSStyle.Formatting.Error = '';$PSStyle.Formatting.ErrorAccent = '';" + .. "$PSStyle.Formatting.Warning = '';$PSStyle.OutputRendering = 'PlainText';" +vim.opt.shellredir = "2>&1 | Out-File -Encoding utf8 %s; exit $LastExitCode" +vim.opt.shellpipe = "2>&1 | Out-File -Encoding utf8 %s; exit $LastExitCode" +vim.opt.shellquote = "" +vim.opt.shellxquote = "" vim.g.mapleader = " " vim.g.maplocalleader = "\\" @@ -21,9 +25,9 @@ vim.keymap.set("v", "y", '"+y', { desc = "Yank to system clipboard" }) vim.keymap.set("n", "ww", ":set wrap!", { desc = "Toggle word wrap" }) vim.filetype.add({ - extension = { - props = "xml", - } + extension = { + props = "xml", + }, }) -- if i am in insert mode and i spam one of these keys