dotfiles/.config/nvim/lua/options.lua

64 lines
1.4 KiB
Lua

--- Change default behaviour ---
local tab_size = 2
-- Disable big separators
vim.api.nvim_set_hl(0, "VertSplit", { link = "Conceal"})
-- Disable integrated providers
vim.g.loaded_ruby_provider = 0
vim.g.loaded_perl_provider = 0
vim.g.loaded_node_provider = 0
-- Disable error bell
vim.opt.errorbells = false
-- Hide emptyline ~
vim.opt.fillchars = { eob = " " }
--- Tab configuration ---
-- Show tabs at tab_size spaces
vim.opt.tabstop = tab_size
vim.opt.softtabstop = tab_size
-- When indenting with '>', use tab_size spaces
vim.opt.shiftwidth = tab_size
-- Insert 4 spaces instead of tab
vim.opt.expandtab = true
--- Line formatting ---
vim.opt.nu = true
vim.opt.wrap = false
--- Search configuration ---
vim.opt.smartcase = true
vim.opt.ignorecase = true
--- Window configuration ---
vim.opt.splitright = true
vim.opt.splitbelow = true
-- Remove duplicate -- INSERT --
vim.opt.showmode = false
--- Operation configuration ---
vim.opt.swapfile = false
vim.opt.backup = false
vim.opt.undodir = vim.fn.expand('~').."/.config/nvim/undodir"
vim.opt.undofile = true
--- Folding behaviour configuration ---
vim.opt.foldmethod = "indent"
vim.opt.foldnestmax = 10
vim.opt.foldenable = false
vim.opt.foldlevel = 99
vim.opt.signcolumn = "no"
--- Miscellaneous ---
-- rg smart root finder and adds git ignore loading for faster execution
if vim.fn.executable("rg") == 1 then
vim.g.rg_derive_root = true
end
-- Disable mouse
vim.opt.mouse = nil