better options

This commit is contained in:
2026-07-03 14:49:36 +02:00
parent 1c2b5f8a0e
commit 1c6f0a0e46

View File

@@ -1,40 +1,41 @@
local g = vim.g local g = vim.g
local o = vim.opt local o = vim.opt
g.mapleader = " " -- Uses space as the global leader key. g.mapleader = " " -- Uses space as the global leader key.
g.maplocalleader = " " -- Uses space as the local leader key. g.maplocalleader = " " -- Uses space as the local leader key.
g.clipboard = "osc52" -- Routes the + and * registers through OSC52 in terminal Neovim. g.clipboard = "osc52" -- Routes the + and * registers through OSC52 in terminal Neovim.
o.number = true -- Shows absolute line numbers. o.number = true -- Shows absolute line numbers.
o.relativenumber = true -- Shows relative numbers for easier motion. o.relativenumber = true -- Shows relative numbers for easier motion.
o.cursorline = true -- Highlights the line under the cursor. o.cursorline = true -- Highlights the line under the cursor.
o.textwidth = 80 -- Wraps inserted text after 80 columns when formatting is active. o.textwidth = 80 -- Wraps inserted text after 80 columns when formatting is active.
o.scrolloff = 8 -- Keeps context lines visible around the cursor. o.scrolloff = 8 -- Keeps context lines visible around the cursor.
o.signcolumn = "yes" -- Always reserves space for signs in the gutter. o.signcolumn = "yes" -- Always reserves space for signs in the gutter.
o.colorcolumn = "+1" -- Highlights the preferred maximum line width. o.colorcolumn = "+1" -- Highlights the preferred maximum line width.
o.wrap = false -- Prevents long lines from wrapping on screen. o.wrap = false -- Prevents long lines from wrapping on screen.
o.list = true -- Displays whitespace characters using listchars. o.list = true -- Displays whitespace characters using listchars.
o.listchars = { o.listchars = {
tab = "» ", tab = "» ",
trail = "·", trail = "·",
extends = "", extends = "",
precedes = "", precedes = "",
nbsp = "", nbsp = "",
} -- Defines how invisible characters are rendered. } -- Defines how invisible characters are rendered.
o.termguicolors = true -- Enables full RGB color support. o.termguicolors = true -- Enables full RGB color support.
o.mouse = "" -- Disables mouse support. o.mouse = "" -- Disables mouse support.
o.tabstop = 4 -- Renders tab characters as four columns. o.tabstop = 4 -- Renders tab characters as four columns.
o.softtabstop = 4 -- Makes tab/backspace feel like four spaces. o.softtabstop = 4 -- Makes tab/backspace feel like four spaces.
o.shiftwidth = 4 -- Uses four columns for each indent step. o.shiftwidth = 4 -- Uses four columns for each indent step.
o.expandtab = true -- Inserts spaces when indenting by default. o.expandtab = true -- Inserts spaces when indenting by default.
o.smartindent = true -- Adds indentation automatically on new lines. o.smartindent = true -- Adds indentation automatically on new lines.
o.swapfile = false -- Disables swapfile creation. o.swapfile = false -- Disables swapfile creation.
o.incsearch = true -- Updates search matches as you type. o.incsearch = true -- Updates search matches as you type.
o.completeopt = { "menuone", "noselect", "fuzzy", "nosort" } -- Enables fuzzy completion matching without preselecting or reordering candidates. o.completeopt = { "menuone", "noselect", "fuzzy", "nosort" } -- Enables fuzzy completion matching.
o.updatetime = 50 -- Reduces idle delay for swap and CursorHold events. o.pumheight = 8 -- Limits the completion popup menu size.
o.spelllang = { "en_us" } -- Uses US English for spell checking. o.updatetime = 50 -- Reduces idle delay for swap and CursorHold events.
o.shell = "bash" -- Runs shell commands through bash. o.spelllang = { "en_us" } -- Uses US English for spell checking.
o.tabline = "%!v:lua.RomanzyTabline()" -- Shows native tabs with custom labels. o.shell = "bash" -- Runs shell commands through bash.
o.tabline = "%!v:lua.RomanzyTabline()" -- Shows native tabs with custom labels.
-- Only show the invisible characters inside the code editing buffers -- Only show the invisible characters inside the code editing buffers
vim.cmd([[autocmd BufWinEnter * if &buftype != '' | setlocal nolist | endif]]) vim.cmd([[autocmd BufWinEnter * if &buftype != '' | setlocal nolist | endif]])