diff options
Diffstat (limited to '.config/nvim/lua/options.lua')
| -rw-r--r-- | .config/nvim/lua/options.lua | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/.config/nvim/lua/options.lua b/.config/nvim/lua/options.lua new file mode 100644 index 0000000..4093897 --- /dev/null +++ b/.config/nvim/lua/options.lua @@ -0,0 +1,62 @@ +vim.g.mapleader = " " +vim.g.maplocalleader = " " + +vim.g.have_nerd_font = true + +vim.opt.number = true +vim.opt.relativenumber = true + +vim.opt.expandtab = true +vim.opt.tabstop = 4 +vim.opt.softtabstop = 4 +vim.opt.shiftwidth = 4 + +vim.opt.mouse = 'a' +vim.opt.clipboard = 'unnamedplus' + +vim.opt.undofile = true + +vim.opt.ignorecase = true +vim.opt.smartcase = true + +vim.opt.signcolumn = 'auto' + +vim.opt.updatetime = 250 + +-- Displays which-key sooner, once that's setupped +vim.opt.timeoutlen = 300 + +vim.opt.splitright = true +vim.opt.splitbelow = true + +-- vim.opt.list = true +-- vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' } + +vim.opt.cursorline = true + +vim.opt.scrolloff = 8 + +vim.opt.hlsearch = true +vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>') + +vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left window' }) +vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right window' }) +vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' }) +vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' }) + +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, +}) + + + + + + + + + |
