style(nvim): organize the variables.lua file

This commit is contained in:
Afonso Franco 2025-06-04 12:12:41 +01:00
parent 98422d6f94
commit 3c7012a65e
Signed by: afonso
SSH key fingerprint: SHA256:gkVPzsQQJzqi21ntQBV6pXTx4bYI53rFGI4XtvCpwd4

View file

@ -1,53 +1,41 @@
--Leader -- Set the leader key
vim.g.mapleader = " " vim.g.mapleader = " "
--termguicolors
vim.opt.termguicolors = true -- Appearance
--Relative line numbers vim.opt.termguicolors = true -- Enable 24-bit colors
vim.wo.number = true vim.opt.number = true -- Show line numbers
vim.wo.relativenumber = true vim.opt.relativenumber = true -- Show relative line numbers
--Remove search highlight vim.opt.wrap = false -- Disable line wrapping
vim.opt.hlsearch = false vim.opt.conceallevel = 2 -- Hide Org mode links (assuming you use Org mode)
vim.opt.incsearch = true vim.opt.concealcursor = 'nc' -- Conceal text in normal mode only
vim.opt.smartindent = true vim.opt.signcolumn = "yes" -- Always show the sign column
-- Make searches case insensitive (except when using uppercase) vim.o.laststatus = 1 -- Always show the status line (Note: original had '1', consider '2' for always visible)
vim.opt.smartcase = true vim.o.winborder = nil -- Use default border for floating windows
--Change word definition
vim.opt.iskeyword:append("_") -- Indentation
--Remove Wrap vim.opt.tabstop = 4 -- Number of spaces a tab represents
vim.opt.wrap = false vim.opt.softtabstop = 4 -- Number of spaces a <Tab> in Insert mode equals
--Not let cursor go bellow 10 chars. vim.opt.shiftwidth = 4 -- Number of spaces to use for autoindent
vim.opt.scrolloff = 10 vim.opt.expandtab = true -- Use spaces instead of tabs
--4 space indent vim.opt.smartindent = true -- Smart auto-indenting
vim.opt.tabstop = 4
vim.opt.softtabstop = 4 -- Searching
vim.opt.shiftwidth = 4 vim.opt.hlsearch = false -- Disable highlighting of search matches
vim.opt.expandtab = true vim.opt.incsearch = true -- Show partial matches while typing
--Undo dir
vim.opt.undodir = os.getenv("XDG_STATE_HOME") .. "/nvim/undodir" -- Behavior and Navigation
vim.opt.undofile = true vim.opt.iskeyword:append("_") -- Add '_' to the list of keyword characters
--Backup dir vim.opt.scrolloff = 10 -- Keep 10 lines above/below cursor when scrolling
vim.opt.backup = true vim.opt.sidescrolloff = 10
vim.opt.backupdir = os.getenv("XDG_STATE_HOME") .. "/nvim/backupdir" vim.opt.smoothscroll = true
--Org mode hide links
vim.opt.conceallevel = 2 -- File Management
vim.opt.concealcursor = 'nc' vim.opt.undodir = os.getenv("XDG_STATE_HOME") .. "/nvim/undodir" -- Directory for undo files
--Jupyter notebooks vim.opt.undofile = true -- Save undo history
vim.g.jukit_convert_overwrite_default = 1 vim.opt.backup = true -- Create backup files
vim.g.jukit_convert_open_default = 0 vim.opt.backupdir = os.getenv("XDG_STATE_HOME") .. "/nvim/backupdir" -- Directory for backup files
vim.g.jukit_shell_cmd = 'ipython3' vim.opt.autoread = true -- Automatically reload changed files
vim.g.jukit_terminal = 'nvimterm' vim.opt.swapfile = false -- Disable swap files
vim.g.jukit_show_prompt = 1
vim.g.jukit_pdf_viewer = 'zathura' -- Formatting
vim.g.jukit_mappings = 0 vim.opt.formatoptions:remove("ro") -- Remove 'ro' from formatoptions (assuming you don't want auto-wrapping comments)
--Format Options
vim.opt.formatoptions:remove("ro")
--Sign gutter always on
vim.opt.signcolumn = "yes"
-- sync buffers automatically
vim.opt.autoread = true
-- disable swapfile
vim.opt.swapfile = false
-- disable statusline
vim.o.laststatus = 1
-- border on floating windows
vim.o.winborder = nil