Files
nvim/lua/options.lua
T
2026-08-05 06:39:52 +02:00

43 lines
1.1 KiB
Lua

vim.g.mapleader = " "
local o = vim.o
o.number = true
o.relativenumber = true
o.tabstop = 4
o.shiftwidth = 4
o.expandtab = true
o.signcolumn = "yes"
o.swapfile = false
o.winborder = "single"
o.termguicolors = true
o.autoread = true
-- Folding: native treesitter folds (function/class/block-aware), no plugin needed.
-- `foldmethod=diff` (used automatically in :diffthis / fugitive / diffview windows)
-- takes over on its own and isn't affected by this.
o.foldmethod = "expr"
o.foldexpr = "v:lua.vim.treesitter.foldexpr()"
o.foldlevel = 99 -- start with everything open
o.foldlevelstart = 99
vim.api.nvim_create_autocmd({ "FocusGained", "BufEnter", "CursorHold", "CursorHoldI" }, {
command = "if mode() != 'c' | checktime | endif",
})
vim.filetype.add({ extension = { asm = "asm", s = "asm", S = "asm" } })
vim.api.nvim_create_autocmd("FileType", {
pattern = "asm",
callback = function()
vim.bo.tabstop = 8
vim.bo.shiftwidth = 8
vim.bo.softtabstop = 8
vim.bo.expandtab = false
end,
})
vim.diagnostic.config({
virtual_text = false,
virtual_lines = { current_line = true },
severity_sort = true,
})