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