local cmd = vim.cmd -- execute Vim commands local exec = vim.api.nvim_exec -- execute Vimscript -- local fn = vim.fn -- call Vim functions local g = vim.g -- global variables local opt = vim.opt -- global/buffer/windows-scoped options g.mapleader = ' ' -- Leaderkey g.showmode = true g.hidden = true -- Required to keep multiple buffers open multiple buffers opt.mouse = 'a' -- enable mouse opt.clipboard = 'unnamedplus' -- copy/paste with system opt.swapfile = false -- no swapfile opt.wrap = true -- Display long lines as just one line opt.expandtab = true -- Use space instead of tabs opt.tabstop = 4 -- Insert 4 spaces for a tab opt.shiftwidth = 4 -- Change the number of space characters inserted for indentation opt.smarttab = true -- Makes tabbing smarter will realize you have 2 vs 4 opt.autoindent = true -- Good auto indent opt.foldmethod='indent' opt.number = true -- show line number opt.relativenumber = true -- show relative line number opt.cursorline = true -- highlight current line opt.ignorecase = true -- Ignore case on search opt.smartcase = true -- ignore lowercse for the whoel pattern -- opt.completeopt = 'menu,noselect,noinsert' -- completion options opt.spell = true opt.spelllang = {'fr', 'en'} opt.nrformats = opt.nrformats + 'alpha' g.showtabline = true -- don't auto commenting new lines cmd[[au BufEnter * set fo-=c fo-=r fo-=o]] opt.showmatch = true -- show parenthethis match -- Highlight on yank exec([[ augroup YankHighlight autocmd! autocmd TextYankPost * silent! lua vim.highlight.on_yank{higroup="IncSearch", timeout=700} augroup end ]], false) cmd('colorscheme gruvbox')