From 35de5c6b066383747c4844f25aa844da8dbde29d Mon Sep 17 00:00:00 2001 From: "markus.dieckmann" Date: Mon, 13 Oct 2025 11:44:23 +0200 Subject: [PATCH] vim options --- nvim/lua/config/options.lua | 39 +++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/nvim/lua/config/options.lua b/nvim/lua/config/options.lua index 5f6a488..42b523e 100644 --- a/nvim/lua/config/options.lua +++ b/nvim/lua/config/options.lua @@ -1,10 +1,11 @@ -vim.o.fillchars = 'eob: ,fold: ,foldopen:,foldsep: ,foldclose:' -vim.o.foldcolumn = '1' +vim.o.fillchars = "eob: ,fold: ,foldopen:,foldsep: ,foldclose:" +vim.o.foldcolumn = "1" vim.o.foldenable = true -vim.o.foldexpr = 'v:lua.vim.lsp.foldexpr()' +vim.o.foldexpr = "v:lua.vim.lsp.foldexpr()" vim.o.foldlevel = 99 vim.o.foldlevelstart = 99 -vim.o.foldmethod = 'expr' +vim.o.foldmethod = "expr" +-- vim.o.winborder = "bold" vim.opt.langmap = "+]ü[" vim.keymap.set("n", "ü", "[", { remap = true }) @@ -28,7 +29,7 @@ vim.opt.number = true vim.opt.relativenumber = true -- Enable mouse mode, can be useful for resizing splits for example! -vim.opt.mouse = 'a' +vim.opt.mouse = "a" -- Don't show the mode, since it's already in the status line vim.opt.showmode = false @@ -38,7 +39,7 @@ vim.opt.showmode = false -- Remove this option if you want your OS clipboard to remain independent. -- See `:help 'clipboard'` vim.schedule(function() - vim.opt.clipboard = 'unnamedplus' + vim.opt.clipboard = "unnamedplus" end) -- Enable break indent @@ -52,7 +53,7 @@ vim.opt.ignorecase = true vim.opt.smartcase = true -- Keep signcolumn on by default -vim.opt.signcolumn = 'yes' +vim.opt.signcolumn = "yes" -- Decrease update time vim.opt.updatetime = 250 @@ -68,10 +69,10 @@ vim.opt.splitbelow = true -- See `:help 'list'` -- and `:help 'listchars'` vim.opt.list = true -vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' } +vim.opt.listchars = { tab = "» ", trail = "·", nbsp = "␣" } -- Preview substitutions live, as you type! -vim.opt.inccommand = 'split' +vim.opt.inccommand = "split" -- Show which line your cursor is on vim.opt.cursorline = true @@ -96,10 +97,10 @@ vim.diagnostic.config({ virtual_text = true }) -- Clear highlights on search when pressing in normal mode -- See `:help hlsearch` -vim.keymap.set('n', '', 'nohlsearch') +vim.keymap.set("n", "", "nohlsearch") -- Diagnostic keymaps -vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' }) +vim.keymap.set("n", "q", vim.diagnostic.setloclist, { desc = "Open diagnostic [Q]uickfix list" }) -- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier -- for people to discover. Otherwise, you normally need to press , which @@ -107,7 +108,7 @@ vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagn -- -- NOTE: This won't work in all terminal emulators/tmux/etc. Try your own mapping -- or just use to exit terminal mode -vim.keymap.set('t', '', '', { desc = 'Exit terminal mode' }) +vim.keymap.set("t", "", "", { desc = "Exit terminal mode" }) -- TIP: Disable arrow keys in normal mode -- vim.keymap.set('n', '', 'echo "Use h to move!!"') @@ -119,17 +120,17 @@ vim.keymap.set('t', '', '', { desc = 'Exit terminal mode' } -- Use CTRL+ to switch between windows -- -- See `:help wincmd` for a list of all window commands -vim.keymap.set('n', '', '', { desc = 'Move focus to the left window' }) -vim.keymap.set('n', '', '', { desc = 'Move focus to the right window' }) -vim.keymap.set('n', '', '', { desc = 'Move focus to the lower window' }) -vim.keymap.set('n', '', '', { desc = 'Move focus to the upper window' }) +vim.keymap.set("n", "", "", { desc = "Move focus to the left window" }) +vim.keymap.set("n", "", "", { desc = "Move focus to the right window" }) +vim.keymap.set("n", "", "", { desc = "Move focus to the lower window" }) +vim.keymap.set("n", "", "", { desc = "Move focus to the upper window" }) -- Highlight when yanking (copying) text -- Try it with `yap` in normal mode -- See `:help vim.highlight.on_yank()` -vim.api.nvim_create_autocmd('TextYankPost', { - desc = 'Highlight when yanking (copying) text', - group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }), +vim.api.nvim_create_autocmd("TextYankPost", { + desc = "Highlight when yanking (copying) text", + group = vim.api.nvim_create_augroup("kickstart-highlight-yank", { clear = true }), callback = function() vim.highlight.on_yank() end,