vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' vim.g.have_nerd_font = true vim.opt.number = true vim.opt.relativenumber = true vim.opt.tabstop = 4 vim.opt.shiftwidth = 4 vim.opt.softtabstop = 4 vim.opt.expandtab = true vim.cmd [[ autocmd FileType yaml setlocal shiftwidth=4 tabstop=4 softtabstop=4 expandtab ]] vim.opt.mouse = 'a' vim.opt.showmode = false vim.keymap.set('x', 'p', '"_dP', { desc = '[P]aste' }) vim.keymap.set('n', 'y', '"+y', { desc = '[Y]ank to system clipboard' }) vim.keymap.set('v', 'y', '"+y', { desc = '[Y]ank to system clipboard' }) vim.keymap.set('n', 'd', '"+d', { desc = '[D]elete to system clipboard' }) vim.keymap.set('v', 'd', '"+d', { desc = '[D]elete to system clipboard' }) vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(vim.lsp.handlers.hover, { max_width = 80, }) vim.keymap.set('v', '', ":m '>+1gv=gv") vim.keymap.set('v', '', ":m '>+1gv=gv") vim.keymap.set('v', '', ":m '<-2gv=gv") vim.keymap.set('v', '', ":m '<-2gv=gv") vim.opt.breakindent = true vim.opt.undofile = true vim.opt.swapfile = false vim.o.sessionoptions = 'blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions' vim.opt.colorcolumn = '100' vim.opt.ignorecase = true vim.opt.smartcase = true vim.opt.signcolumn = 'yes' vim.opt.updatetime = 250 vim.opt.timeoutlen = 300 vim.opt.splitright = true vim.opt.splitbelow = true vim.opt.list = true vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' } vim.opt.inccommand = 'split' vim.opt.cursorline = true vim.opt.scrolloff = 10 vim.keymap.set('n', '', 'nohlsearch') vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' }) vim.keymap.set('t', '', '', { desc = 'Exit terminal mode' }) 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' }) 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, })