Small improvements to the nvim config + --no-wipe flag for the dots script

master
Wynd 2026-03-19 23:56:47 +02:00
parent 259a009602
commit 87130602ea
7 changed files with 35 additions and 9 deletions

View File

@ -6,6 +6,7 @@ local wo = vim.wo[winid][0]
local bo = vim.bo[bufnr] local bo = vim.bo[bufnr]
wo.spell = true wo.spell = true
wo.wrap = true
-- bo.textwidth = 120 -- bo.textwidth = 120
vim.cmd.highlight({ "SpellBad", "gui=undercurl", "guifg=#DA6464" }) vim.cmd.highlight({ "SpellBad", "gui=undercurl", "guifg=#DA6464" })

View File

@ -17,14 +17,19 @@ map({ "n", "i", "v" }, "<C-s>", function()
vim.cmd("w") vim.cmd("w")
end, { desc = "File Save" }) end, { desc = "File Save" })
-- easy way to close the current buffer -- easy way to close the current buffer
map("n", "<C-X>", "<cmd>bd!<cr>", { desc = "Close Buffer" }) map("n", "<C-q>", "<cmd>bd!<cr>", { desc = "Close Buffer" })
-- moves the selection up or down using K and J (uppercase) -- moves the selection up or down using K and J (uppercase)
map("v", "J", ":m '>+1<cr>gv=gv") map("v", "J", ":m '>+1<cr>gv=gv")
map("v", "K", ":m '<-2<cr>gv=gv") map("v", "K", ":m '<-2<cr>gv=gv")
-- window
-- switch between splits by just holding ctrl + left/right key
map("n", "<C-Right>", "<C-w><C-l>")
map("n", "<C-Left>", "<C-w><C-h>")
-- quickfix -- quickfix
map("n", "<M-Down>", "<cmd>cnext<cr>", { desc = "Qui[C]kfix Next" }) map("n", "<M-Down>", "<cmd>cnext<cr>", { desc = "Qui[C]kfix Next" })
map("n", "<M-Up>", "<cmd>cprev<cr>", { desc = "Qui[C]kfix Next" }) map("n", "<M-Up>", "<cmd>cprev<cr>", { desc = "Qui[C]kfix Previous" })
-- terminal -- terminal
map("t", "<ESC>", "<C-\\><C-n>") map("t", "<ESC>", "<C-\\><C-n>")

View File

@ -27,6 +27,7 @@ o.updatetime = 100
o.colorcolumn = "100" o.colorcolumn = "100"
o.cursorline = true o.cursorline = true
wo.signcolumn = "yes" wo.signcolumn = "yes"
o.swapfile = false
-- search -- search
o.hlsearch = true o.hlsearch = true

View File

@ -12,6 +12,16 @@ return {
-- end -- end
-- end -- end
-- dap.configurations.java = {
-- {
-- type = "java",
-- request = "attach",
-- name = "Debug (Attach)",
-- hostName = "127.0.0.1",
-- port = 5005,
-- },
-- }
-- No I'm not gonna fucking use overseer just to run a fucking script -- No I'm not gonna fucking use overseer just to run a fucking script
local orig_run = dap.run local orig_run = dap.run
dap.run = function(config) dap.run = function(config)

View File

@ -52,17 +52,17 @@ return {
end end
-- used for when lazyness takes over and I'm using a mouse to click around in neo-tree -- used for when lazyness takes over and I'm using a mouse to click around in neo-tree
-- if insert mode is active then neo-tree won't behave as expected, so we want to stop it vim.api.nvim_create_autocmd({ "BufEnter", "ModeChanged" }, {
vim.api.nvim_create_autocmd("BufEnter", {
pattern = { "neo-tree*" },
callback = function() callback = function()
if vim.bo.filetype ~= "neo-tree" then
return
end
-- prevents the list scrolling when clicking on bottom/top elements due to scrolloff -- prevents the list scrolling when clicking on bottom/top elements due to scrolloff
vim.wo[0][0].scrolloff = 0 vim.wo[0][0].scrolloff = 0
local filetype = vim.filetype.match({ buf = 0 }) -- if insert mode is active then neo-tree won't behave as expected, so we want to stop it
if filetype == nil then
vim.cmd("stopinsert") vim.cmd("stopinsert")
end
end, end,
}) })
end, end,

View File

@ -151,6 +151,8 @@ source ~/.piwrc
# JVM switches # JVM switches
alias use-java8='export JAVA_HOME=/usr/lib/jvm/java-8-temurin;export PATH=$JAVA_HOME/bin:$PATH' alias use-java8='export JAVA_HOME=/usr/lib/jvm/java-8-temurin;export PATH=$JAVA_HOME/bin:$PATH'
alias use-java21='export JAVA_HOME=/usr/lib/jvm/java-21-temurin;export PATH=$JAVA_HOME/bin:$PATH' alias use-java21='export JAVA_HOME=/usr/lib/jvm/java-21-temurin;export PATH=$JAVA_HOME/bin:$PATH'
alias use-jbr17='export JAVA_HOME=/home/wynd/.local/lib/jbr17;export PATH=$JAVA_HOME/bin:$PATH'
alias use-jbr21='export JAVA_HOME=/home/wynd/.local/lib/jbr21;export PATH=$JAVA_HOME/bin:$PATH'
# changing GREP highlight color # changing GREP highlight color
export GREP_COLORS='ms=01;04;32' export GREP_COLORS='ms=01;04;32'

7
dot.py
View File

@ -83,6 +83,13 @@ if __name__ == "__main__":
default=True, default=True,
dest="wipe", dest="wipe",
) )
parser.add_argument(
"--no-wipe",
action="store_false",
required=False,
default=False,
dest="wipe",
)
args = parser.parse_args() args = parser.parse_args()
if args.init: if args.init: