Files
nvim_dotfiles/lua/settings.lua
2025-06-26 11:28:50 +02:00

73 lines
2.0 KiB
Lua

-- Keymaps
-- Copy
vim.api.nvim_set_keymap("n", "<C-v>", '"+gp', { noremap = true })
vim.api.nvim_set_keymap("i", "<C-v>", '<Esc>"+gp', { noremap = true })
-- Paste
vim.api.nvim_set_keymap("v", "<C-c>", '"+y', { noremap = true })
vim.api.nvim_set_keymap("n", "<C-c>", '"+yy', { noremap = true })
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
vim.opt.breakindent = true
vim.opt.signcolumn = 'yes'
vim.opt.splitright = true
vim.opt.splitbelow = true
vim.opt.list = true
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '' }
vim.cmd 'set formatoptions+=r'
vim.cmd 'set formatoptions+=]'
vim.cmd 'set diffopt+=iwhite'
vim.o.hidden = true
vim.o.tabstop = 4;
vim.o.shiftwidth = 4;
vim.o.smarttab = true
vim.wo.number = true
vim.wo.relativenumber = true
vim.o.scrolloff = 6
vim.o.sidescrolloff = 8
vim.bo.autoindent = true
vim.bo.smartindent = true
vim.o.title = true
vim.o.hlsearch = true
vim.o.inccommand = "nosplit"
vim.o.inccommand = "nosplit"
vim.o.mouse = "a"
vim.o.ignorecase = true
vim.o.smartcase = true
vim.o.cursorline = false
vim.o.pumblend = 30
vim.o.cmdheight = 0
vim.o.showcmdloc = "statusline"
vim.o.statusline = "%<%f\\ %h%m%r%=%-14.(%l,%c%V%)\\ %P"
vim.o.expandtab = true
vim.o.laststatus = 3
vim.o.breakindent = true
vim.o.showbreak = "=>"
-- -- terminal mode
-- if jit.os == "Windows" then
-- vim.o.shell = [[C:\Users\mertens\AppData\Local\Programs\Git\bin\bash.exe]]
-- vim.api.nvim_set_keymap("t", "<Esc>", [[<C-\><C-n>]], { noremap = true, silent = true, desc = "Exit terminal mode" })
--
-- vim.o.backupdir = "C:\\Users\\mertens\\AppData\\Local\\nvim-data\\backup"
-- end
vim.diagnostic.config({
severity_sort = true,
signs = {
text = {
[vim.diagnostic.severity.ERROR] = "",
[vim.diagnostic.severity.WARN] = "",
[vim.diagnostic.severity.HINT] = "💡",
[vim.diagnostic.severity.INFO] = "",
}
},
virtual_lines = { current_line = true }
})