kickstart.nvim/lua/custom/plugins/options.lua

59 lines
2.2 KiB
Lua
Raw Normal View History

2023-03-22 17:54:34 +01:00
-- Taken from https://www.lazyvim.org/configuration/general
2023-04-12 11:12:31 +02:00
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
2023-03-22 17:54:34 +01:00
local opt = vim.opt
opt.autowrite = true -- Enable auto write
2023-04-12 11:12:31 +02:00
opt.clipboard = 'unnamedplus' -- Sync with system clipboard
opt.completeopt = 'menu,menuone,noselect'
2023-03-22 17:54:34 +01:00
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
2023-04-12 11:12:31 +02:00
opt.formatoptions = 'jcroqlnt' -- tcqj
opt.grepformat = '%f:%l:%c:%m'
opt.grepprg = 'rg --vimgrep'
2023-03-22 17:54:34 +01:00
opt.ignorecase = true -- Ignore case
2023-04-12 11:12:31 +02:00
opt.inccommand = 'nosplit' -- preview incremental substitute
2023-03-22 17:54:34 +01:00
opt.laststatus = 0
opt.list = true -- Show some invisible characters (tabs...
2023-04-12 11:12:31 +02:00
opt.mouse = 'a' -- Enable mouse mode
2023-03-22 17:54:34 +01:00
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
2023-04-12 11:12:31 +02:00
opt.sessionoptions = { 'buffers', 'curdir', 'tabpages', 'winsize' }
2023-03-22 17:54:34 +01:00
opt.shiftround = true -- Round indent
opt.shiftwidth = 2 -- Size of an indent
opt.shortmess:append { W = true, I = true, c = true }
opt.showmode = false -- Dont show mode since we have a statusline
opt.sidescrolloff = 8 -- Columns of context
2023-04-12 11:12:31 +02:00
opt.signcolumn = 'yes' -- Always show the signcolumn, otherwise it would shift the text each time
2023-03-22 17:54:34 +01:00
opt.smartcase = true -- Don't ignore case with capitals
opt.smartindent = true -- Insert indents automatically
2023-04-12 11:12:31 +02:00
opt.spelllang = { 'en' }
2023-03-22 17:54:34 +01:00
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
2023-04-12 11:12:31 +02:00
opt.wildmode = 'longest:full,full' -- Command-line completion mode
2023-03-22 17:54:34 +01:00
opt.winminwidth = 5 -- Minimum window width
2023-04-12 11:12:31 +02:00
-- opt.wrap = false -- Disable line wrap
2023-03-22 17:54:34 +01:00
2023-04-12 11:12:31 +02:00
if vim.fn.has 'nvim-0.9.0' == 1 then
opt.splitkeep = 'screen'
opt.shortmess:append { C = true }
2023-03-22 17:54:34 +01:00
end
-- Fix markdown indentation settings
vim.g.markdown_recommended_style = 0
return {}