local set = vim.opt -- General Settings -- set.termguicolors = true set.updatetime = 50 set.showmode = false -- disable mode in the command line, because i use lualine set.mousemoveevent = true -- -- Editor settings -- set.pumheight = 20 set.hlsearch = false set.incsearch = true set.laststatus = 3 set.splitkeep = "screen" set.scrolloff=20 --vim.opt.sidescrolloff = 8 set.cursorline = true -- line numbers set.number = true set.relativenumber = true set.numberwidth = 5 -- sign column to the right. --set.statuscolumn = '%=%{v:relnum?v:relnum:v:lnum} %s ' -- sign column to the left set.statuscolumn = '%s %=%{v:relnum?v:relnum:v:lnum} ' -- indent set.tabstop = 4 set.softtabstop = 4 set.shiftwidth = 4 set.autoindent = true set.smartindent = true -- Filetypes vim.filetype.add({ pattern = { ['.*%.blade%.php'] = 'blade', }, }) -- -- Diagnostics -- local icons = require('config.icons').diagnostics vim.fn.sign_define('DiagnosticSignError', { text = icons.error, texthl = 'DiagnosticSignError' }) vim.fn.sign_define('DiagnosticSignWarn', { text = icons.warn, texthl = 'DiagnosticSignWarn' }) vim.fn.sign_define('DiagnosticSignInfo', { text = icons.info, texthl = 'DiagnosticSignInfo' }) vim.fn.sign_define('DiagnosticSignHint', { text = icons.hint, texthl = 'DiagnosticSignHint' }) vim.diagnostic.config({ virtual_text = true, severity_sort = true, float = { border = 'single', source = 'always', }, }) -- Highlight on yank vim.api.nvim_create_autocmd('TextYankPost', { group = vim.api.nvim_create_augroup('highlight_yank', {}), desc = 'Hightlight selection on yank', pattern = '*', callback = function() vim.highlight.on_yank { higroup = 'IncSearch', timeout = 200 } end, })