1
Fork 0
satellite/dotfiles/neovim/lua/my/options.lua

49 lines
1.5 KiB
Lua
Raw Normal View History

2023-01-10 02:38:06 +01:00
local M = {}
function M.setup()
-- Disable filetype.vim
vim.g.do_filetype_lua = true
vim.g.did_load_filetypes = false
-- Basic options
vim.opt.joinspaces = false -- No double spaces with join
vim.opt.list = true -- Show some invisible characters
vim.opt.cmdheight = 0 -- Hide command line when it's not getting used
-- tcqj are there by default, and "r" automatically continues comments on enter
vim.opt.formatoptions = "tcqjr"
2023-01-10 02:38:06 +01:00
-- Line numbers
vim.opt.number = true -- Show line numbers
vim.opt.relativenumber = true -- Relative line numbers
vim.opt.expandtab = true -- Use spaces for the tab char
vim.opt.shiftwidth = 2 -- Size of an indent
2023-04-17 22:33:56 +02:00
vim.opt.tabstop = 2 -- Size of tab character
vim.opt.shiftround = true -- When using < or >, rounds to closest multiple of shiftwidth
vim.opt.smartindent = true -- Insert indents automatically
vim.opt.scrolloff = 4 -- Starts scrolling 4 lines from the edge of the screen
2023-01-10 02:38:06 +01:00
vim.opt.termguicolors = true -- True color support
vim.opt.ignorecase = true -- Ignore case
vim.opt.smartcase = true -- Do not ignore case with capitals
vim.opt.splitbelow = true -- Put new windows below current
vim.opt.splitright = true -- Put new windows right of current
vim.opt.wrap = false -- Disable line wrap (by default)
vim.opt.wildmode = { "list", "longest" } -- Command-line completion mode
2023-01-10 02:38:06 +01:00
vim.opt.completeopt = { "menu", "menuone", "noselect" }
2023-03-31 18:54:44 +02:00
vim.opt.undofile = true -- persist undos!!
2023-01-10 02:38:06 +01:00
-- Set leader
vim.g.mapleader = " "
-- Folding
vim.opt.foldmethod = "marker"
end
return M