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

71 lines
1.7 KiB
Lua

local opt = vim.opt
vim.g.loaded_perl_provider = 0
vim.g.loaded_python3_provider = 0
vim.g.loaded_node_provider = 0
vim.g.loaded_ruby_provider = 0
vim.g.lazygit_config = false
vim.g.snacks_animate = true
opt.hlsearch = false
opt.incsearch = true
opt.clipboard = ""
opt.cursorline = true
opt.list = true
opt.number = true
opt.relativenumber = true
opt.scrolloff = 8
opt.showmode = false
opt.signcolumn = "yes"
opt.smartcase = true
opt.smartindent = true
opt.spelllang = { "en" } -- "de"??
opt.splitbelow = true
opt.splitright = true
opt.statuscolumn = [[%!v:lua.require'snacks.statuscolumn'.get()]]
opt.termguicolors = true
opt.virtualedit = "block"
opt.wildmode = "longest:full,full"
-- 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
opt.undolevels = 10000
opt.updatetime = 200
-- 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 = { "menu", "menuone", "noselect" }
vim.filetype.add({
extension = {
alloy = "alloy",
caddy = "caddyfile",
container = "systemd",
image = "systemd",
network = "systemd",
service = "systemd",
socket = "systemd",
},
pattern = {
[".*/sway/conf%.d/.*"] = "swayconfig",
},
})