diff --git a/lua/lazyvim/config/options.lua b/lua/lazyvim/config/options.lua index 893afde4..7a3dd8e7 100644 --- a/lua/lazyvim/config/options.lua +++ b/lua/lazyvim/config/options.lua @@ -3,54 +3,57 @@ vim.g.mapleader = " " vim.g.maplocalleader = " " -vim.opt.autowrite = true -- enable auto write -vim.opt.clipboard = "unnamedplus" -- sync with system clipboard -vim.opt.cmdheight = 1 -vim.opt.completeopt = "menu,menuone,noselect" -vim.opt.conceallevel = 3 -- Hide * markup for bold and italic -vim.opt.confirm = true -- confirm to save changes before exiting modified buffer -vim.opt.cursorline = true -- Enable highlighting of the current line -vim.opt.expandtab = true -- Use spaces instead of tabs -vim.opt.formatoptions = "jcroqlnt" -- tcqj -vim.opt.grepformat = "%f:%l:%c:%m" -vim.opt.grepprg = "rg --vimgrep" -vim.opt.guifont = "FiraCode Nerd Font:h11" -vim.opt.hidden = true -- Enable modified buffers in background -vim.opt.ignorecase = true -- Ignore case -vim.opt.inccommand = "nosplit" -- preview incremental substitute -vim.opt.joinspaces = false -- No double spaces with join after a dot -vim.opt.laststatus = 0 -vim.opt.list = true -- Show some invisible characters (tabs... -vim.opt.mouse = "a" -- enable mouse mode -vim.opt.number = true -- Print line number -vim.opt.pumblend = 10 -- Popup blend -vim.opt.pumheight = 10 -- Maximum number of entries in a popup -vim.opt.relativenumber = true -- Relative line numbers -vim.opt.scrolloff = 4 -- Lines of context -vim.opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" } -vim.opt.shiftround = true -- Round indent -vim.opt.shiftwidth = 2 -- Size of an indent -vim.opt.showmode = false -- dont show mode since we have a statusline -vim.opt.sidescrolloff = 8 -- Columns of context -vim.opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time -vim.opt.smartcase = true -- Don't ignore case with capitals -vim.opt.smartindent = true -- Insert indents automatically -vim.opt.spelllang = { "en" } -vim.opt.splitbelow = true -- Put new windows below current -vim.opt.splitright = true -- Put new windows right of current -vim.opt.tabstop = 2 -- Number of spaces tabs count for -vim.opt.termguicolors = true -- True color support -vim.opt.timeoutlen = 300 -vim.opt.undofile = true -vim.opt.undolevels = 10000 -vim.opt.updatetime = 200 -- save swap file and trigger CursorHold -vim.opt.wildmode = "longest:full,full" -- Command-line completion mode -vim.go.winminwidth = 5 -- minimum window width -vim.opt.wrap = false -- Disable line wrap +-- set global only, to make sure we don't override the Lazy ui +local opt = vim.opt_global + +opt.autowrite = true -- enable auto write +opt.clipboard = "unnamedplus" -- sync with system clipboard +opt.cmdheight = 1 +opt.completeopt = "menu,menuone,noselect" +opt.conceallevel = 3 -- Hide * markup for bold and italic +opt.confirm = true -- confirm to save changes before exiting modified buffer +opt.cursorline = true -- Enable highlighting of the current line +opt.expandtab = true -- Use spaces instead of tabs +opt.formatoptions = "jcroqlnt" -- tcqj +opt.grepformat = "%f:%l:%c:%m" +opt.grepprg = "rg --vimgrep" +opt.guifont = "FiraCode Nerd Font:h11" +opt.hidden = true -- Enable modified buffers in background +opt.ignorecase = true -- Ignore case +opt.inccommand = "nosplit" -- preview incremental substitute +opt.joinspaces = false -- No double spaces with join after a dot +opt.laststatus = 0 +opt.list = true -- Show some invisible characters (tabs... +opt.mouse = "a" -- enable mouse mode +opt.number = true -- Print line number +opt.pumblend = 10 -- Popup blend +opt.pumheight = 10 -- Maximum number of entries in a popup +opt.relativenumber = true -- Relative line numbers +opt.scrolloff = 4 -- Lines of context +opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" } +opt.shiftround = true -- Round indent +opt.shiftwidth = 2 -- Size of an indent +opt.showmode = false -- dont show mode since we have a statusline +opt.sidescrolloff = 8 -- Columns of context +opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time +opt.smartcase = true -- Don't ignore case with capitals +opt.smartindent = true -- Insert indents automatically +opt.spelllang = { "en" } +opt.splitbelow = true -- Put new windows below current +opt.splitright = true -- Put new windows right of current +opt.tabstop = 2 -- Number of spaces tabs count for +opt.termguicolors = true -- True color support +opt.timeoutlen = 300 +opt.undofile = true +opt.undolevels = 10000 +opt.updatetime = 200 -- save swap file and trigger CursorHold +opt.wildmode = "longest:full,full" -- Command-line completion mode +opt.winminwidth = 5 -- minimum window width +opt.wrap = false -- Disable line wrap if vim.fn.has("nvim-0.9.0") == 1 then - vim.opt.splitkeep = "screen" - vim.o.shortmess = "filnxtToOFWIcC" + opt.splitkeep = "screen" + opt.shortmess = "filnxtToOFWIcC" end -- fix markdown indentation settings