From 6bd84de77e4369e41d91fde017fbb625516e59c7 Mon Sep 17 00:00:00 2001 From: amtoine Date: Tue, 4 Apr 2023 18:53:14 +0200 Subject: [PATCH] move the default options at the top This is to make sure the default options are set BEFORE the files sourced from `after/plugin/`, i.e. after the `lazy` setup. --- init.lua | 90 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/init.lua b/init.lua index c5b82779..2215ac78 100644 --- a/init.lua +++ b/init.lua @@ -42,6 +42,51 @@ P.S. You can delete this when you're done too. It's your config now :) vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' +-- [[ Setting options ]] +-- See `:help vim.o` + +-- Set highlight on search +vim.o.hlsearch = false + +-- Make line numbers default +vim.wo.number = true + +-- Enable mouse mode +vim.o.mouse = 'a' + +-- Sync clipboard between OS and Neovim. +-- Remove this option if you want your OS clipboard to remain independent. +-- See `:help 'clipboard'` +vim.o.clipboard = 'unnamedplus' + +-- Enable break indent +vim.o.breakindent = true + +-- Save undo history +vim.o.undofile = true + +-- Case insensitive searching UNLESS /C or capital in search +vim.o.ignorecase = true +vim.o.smartcase = true + +-- Keep signcolumn on by default +vim.wo.signcolumn = 'yes' + +-- Decrease update time +vim.o.updatetime = 250 +vim.o.timeout = true +vim.o.timeoutlen = 300 + +-- Set completeopt to have a better completion experience +vim.o.completeopt = 'menuone,noselect' + +-- NOTE: You should make sure your terminal supports this +vim.o.termguicolors = true + +-- NOTE: you can add any custom options in the `lua/custom/options.lua` +-- file to avoid any conflict with this file if you're interested in keeping +-- up-to-date with whatever is in the kickstart repo. + -- Install package manager -- https://github.com/folke/lazy.nvim -- `:help lazy.nvim.txt` for more info @@ -189,51 +234,6 @@ require('lazy').setup({ { import = 'custom.plugins' }, }, {}) --- [[ Setting options ]] --- See `:help vim.o` - --- Set highlight on search -vim.o.hlsearch = false - --- Make line numbers default -vim.wo.number = true - --- Enable mouse mode -vim.o.mouse = 'a' - --- Sync clipboard between OS and Neovim. --- Remove this option if you want your OS clipboard to remain independent. --- See `:help 'clipboard'` -vim.o.clipboard = 'unnamedplus' - --- Enable break indent -vim.o.breakindent = true - --- Save undo history -vim.o.undofile = true - --- Case insensitive searching UNLESS /C or capital in search -vim.o.ignorecase = true -vim.o.smartcase = true - --- Keep signcolumn on by default -vim.wo.signcolumn = 'yes' - --- Decrease update time -vim.o.updatetime = 250 -vim.o.timeout = true -vim.o.timeoutlen = 300 - --- Set completeopt to have a better completion experience -vim.o.completeopt = 'menuone,noselect' - --- NOTE: You should make sure your terminal supports this -vim.o.termguicolors = true - --- NOTE: you can add any custom options in the `lua/custom/options.lua` --- file to avoid any conflict with this file if you're interested in keeping --- up-to-date with whatever is in the kickstart repo. - -- [[ Basic Keymaps ]] -- Keymaps for better default experience