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

51 lines
1.5 KiB
Lua

-- Options are automatically loaded before lazy.nvim startup
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
-- Add any additional options here
local opt = vim.opt
-- Turn off netrw directory banner and use a nicer listing style
vim.g.netrw_banner = 0
vim.g.netrw_liststyle = 3
vim.g.netrw_fastbrowse = 1
vim.g.loaded_perl_provider = 0
vim.g.loaded_python3_provider = 0
vim.g.loaded_node_provider = 0
vim.g.loaded_ruby_provider = 0
-- don't use system clipboard by default (this is set in LazyVim's defaults)
opt.clipboard = ""
opt.hlsearch = false
opt.incsearch = true
opt.scrolloff = 8
-- disable mouse support, because i'm using it more accidentally then intentionally
-- TODO figure out how to disable mouse scrolling from terminal
opt.mouse = ""
opt.mousescroll = "ver:0,hor:0"
-- I like 4 space indents
opt.tabstop = 4
opt.softtabstop = 4
opt.shiftwidth = 4
opt.expandtab = true
opt.swapfile = false
opt.backup = false
opt.undodir = os.getenv("HOME") .. "/.local/state/nvim/undodir"
opt.undofile = true
-- In my current setup 100 characters line length means that i can have 2 windows side-by-side with
-- sway and still see all characters of that line. (110 would be the absolute maximum)
-- I want to rely on textwrap as few as possible
opt.colorcolumn = "100"
opt.wrap = false
-- This allows '@' in filenames
opt.isfname:append("@-@")
-- Better completopt experience
opt.completeopt = "menuone,noselect"