-- HELPERS ---------------------------------------------------- local cmd = vim.cmd -- to execute Vim commands e.g. cmd('pwd') local fn = vim.fn -- to call Vim functions e.g. fn.bufnr() local g = vim.g -- a table to access global variables local scopes = {o = vim.o, b = vim.bo, w = vim.wo} cmd "syntax on" cmd "set number" cmd "set tabstop=2" cmd "set shiftwidth=2" cmd "set expandtab" cmd "set nofoldenable" cmd "set pastetoggle=" -- always show status cmd "set laststatus=2" -- show cursor position cmd "set ruler" cmd "set cursorline" cmd "set cursorcolumn" cmd "set hlsearch" -- no wrap line cmd "set nowrap" -- enable backspace cmd "set backspace=indent,eol,start" cmd "set encoding=utf-8" cmd "set completeopt=menu,menuone,noselect" cmd "set noswapfile" cmd "set mouse=" cmd "set background=dark" cmd "filetype indent on" cmd "filetype on" cmd "filetype plugin on" vim.api.nvim_create_autocmd("ColorScheme", { pattern = "*", callback = function() cmd([[ highlight clear CursorLine highlight Normal ctermbg=none highlight LineNr ctermbg=none highlight Folded ctermbg=none highlight NonText ctermbg=none highlight SpecialKey ctermbg=none highlight VertSplit ctermbg=none highlight SignColumn ctermbg=none ]]) end, }) vim.api.nvim_create_autocmd("BufWritePost", { pattern = "~/.local/share/chezmoi/*", command = [[ ! chezmoi apply --source-path % ]], }) vim.diagnostic.config({virtual_text = false, signs = false})