-- Set as the leader key -- See `:help mapleader` -- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used) vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' -- Make line numbers default vim.opt.number = true -- Enable mouse mode, can be useful for resizing splits for example! vim.opt.mouse = 'a' -- Don't show the mode, since it's already in the status line vim.opt.showmode = false -- Sync clipboard between OS and Neovim. -- Schedule the setting after `UiEnter` because it can increase startup-time. -- Remove this option if you want your OS clipboard to remain independent. -- See `:help 'clipboard'` vim.schedule(function() vim.opt.clipboard = 'unnamedplus' end) -- Enable break indent vim.opt.breakindent = true -- Save undo history vim.opt.undofile = true -- Case-insensitive searching UNLESS \C or one or more capital letters in the search term vim.opt.ignorecase = true vim.opt.smartcase = true -- Preview substitutions live, as you type! vim.opt.inccommand = 'split' -- Show which line your cursor is on vim.opt.cursorline = true -- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`), -- instead raise a dialog asking if you wish to save the current file(s) -- See `:help 'confirm'` vim.opt.confirm = true -- Configure diagnostics vim.diagnostic.config({ virtual_text = true, signs = true, underline = true, update_in_insert = true, }) -- Set updatetime for faster diagnostic updates vim.opt.updatetime = 300 vim.opt.expandtab = true vim.opt.tabstop = 4 vim.opt.shiftwidth = 4