Small improvements to the nvim config + --no-wipe flag for the dots script
parent
259a009602
commit
87130602ea
|
|
@ -6,6 +6,7 @@ local wo = vim.wo[winid][0]
|
|||
local bo = vim.bo[bufnr]
|
||||
|
||||
wo.spell = true
|
||||
wo.wrap = true
|
||||
-- bo.textwidth = 120
|
||||
|
||||
vim.cmd.highlight({ "SpellBad", "gui=undercurl", "guifg=#DA6464" })
|
||||
|
|
|
|||
|
|
@ -17,14 +17,19 @@ map({ "n", "i", "v" }, "<C-s>", function()
|
|||
vim.cmd("w")
|
||||
end, { desc = "File Save" })
|
||||
-- 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)
|
||||
map("v", "J", ":m '>+1<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
|
||||
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
|
||||
map("t", "<ESC>", "<C-\\><C-n>")
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ o.updatetime = 100
|
|||
o.colorcolumn = "100"
|
||||
o.cursorline = true
|
||||
wo.signcolumn = "yes"
|
||||
o.swapfile = false
|
||||
|
||||
-- search
|
||||
o.hlsearch = true
|
||||
|
|
|
|||
|
|
@ -12,6 +12,16 @@ return {
|
|||
-- 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
|
||||
local orig_run = dap.run
|
||||
dap.run = function(config)
|
||||
|
|
|
|||
|
|
@ -52,17 +52,17 @@ return {
|
|||
end
|
||||
|
||||
-- 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", {
|
||||
pattern = { "neo-tree*" },
|
||||
vim.api.nvim_create_autocmd({ "BufEnter", "ModeChanged" }, {
|
||||
callback = function()
|
||||
if vim.bo.filetype ~= "neo-tree" then
|
||||
return
|
||||
end
|
||||
|
||||
-- prevents the list scrolling when clicking on bottom/top elements due to scrolloff
|
||||
vim.wo[0][0].scrolloff = 0
|
||||
|
||||
local filetype = vim.filetype.match({ buf = 0 })
|
||||
if filetype == nil then
|
||||
vim.cmd("stopinsert")
|
||||
end
|
||||
-- if insert mode is active then neo-tree won't behave as expected, so we want to stop it
|
||||
vim.cmd("stopinsert")
|
||||
end,
|
||||
})
|
||||
end,
|
||||
|
|
|
|||
|
|
@ -151,6 +151,8 @@ source ~/.piwrc
|
|||
# JVM switches
|
||||
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-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
|
||||
export GREP_COLORS='ms=01;04;32'
|
||||
|
|
|
|||
Loading…
Reference in New Issue