Files
dotfiles/nvim/lua/settings.lua
2025-07-07 15:35:23 +02:00

36 lines
1.1 KiB
Lua

-- Global settings
vim.opt.tabstop = 4 -- Number of spaces that a <Tab> counts for
vim.opt.shiftwidth = 4 -- Number of spaces for indentation
vim.opt.expandtab = true -- Use spaces instead of tabs
vim.opt.cmdheight = 0 -- Hide command line when not in use
vim.cmd([[highlight CursorLine guibg=#3c3836]]) -- Darker background for the line
vim.cmd([[highlight CursorColumn guibg=#504945]]) -- Slightly darker for the column
vim.cmd([[set incsearch ]]) -- Enables incremental search
vim.cmd([[set hlsearch ]]) -- Highlights search results
vim.cmd([[set ignorecase]]) -- Case insensitive search
vim.cmd([[set smartcase ]]) -- Case sensitive if uppercase letters are used
-- Coloscheme
vim.cmd([[colorscheme gruvbox]])
vim.cmd([[set spelllang=en]])
vim.cmd([[
highlight Normal ctermbg=none guibg=none
highlight NonText ctermbg=none guibg=none
]])
vim.o.title = true
vim.o.titlestring = "nvim: %f"
vim.api.nvim_create_autocmd("FileType", {
pattern = "lua",
callback = function()
vim.opt_local.foldmethod = "marker"
vim.opt_local.foldlevel = 99 -- so folds are open by default
vim.opt_local.fileencoding = "utf-8"
end,
})