Files
tools.nvim/lua/roka/core/options.lua
T
Mészáros Zoltán f750e44e1a First release
2026-06-16 12:27:51 +02:00

122 lines
5.4 KiB
Lua
Executable File

local opt = vim.opt
-- [[ Font ]]
--opt.guifont = { "SauceCodePro NF:h11:r:#e-subpixelantialias:#h-none" }
--opt.guifont = { "BlexMono NFM:h11:l:i:#e-subpixelantialias:#h-none" }
opt.guifont = { "BlexMono NFM:h11:l:#e-subpixelantialias:#h-none" }
-- [[ Context ]]
opt.number = true -- set numbered lines
opt.relativenumber = true -- show relative numbers
opt.numberwidth = 4 -- set line number column width to 4
opt.colorcolumn = '100' -- show color for max line length
-- [[ Whitespace ]]
opt.expandtab = true -- convert tabs to spaces
opt.shiftwidth = 4 -- size of an indent
opt.softtabstop = 4 -- number of spaces tabs count for in insert mode
opt.tabstop = 4 -- number of spaces tabs count for
opt.autoindent = true
-- [[ Filetypes ]]
opt.encoding = 'utf8' -- string encoding
opt.fileencoding = 'utf8' -- file encoding
-- [[ Theme ]]
opt.syntax = 'ON' -- allow syntax highlighting
opt.termguicolors = true -- set term gui colors (most terminals support this)
-- ------------------------------------------------------------------------------------------------
-- line wrapping
-- ------------------------------------------------------------------------------------------------
opt.wrap = false -- display lines as one long line
-- ------------------------------------------------------------------------------------------------
-- search settings
-- ------------------------------------------------------------------------------------------------
-- [[ Search ]]
opt.ignorecase = true -- ignore case in search patterns
opt.smartcase = true -- override ignorecase if search contains capital
opt.incsearch = true -- use incremental search
opt.hlsearch = true -- highlight search matches
-- ------------------------------------------------------------------------------------------------
-- cursor line
-- ------------------------------------------------------------------------------------------------
opt.cursorline = false -- highlight the current line
-- ------------------------------------------------------------------------------------------------
-- appearance
-- ------------------------------------------------------------------------------------------------
opt.background = "dark"
opt.signcolumn = "yes" -- always show the sign column, otherwise it would shift the text each time
opt.scrolloff = 4 -- is one of my fav
opt.sidescrolloff = 4 -- The minimal number of screen columns to keep
opt.cmdheight = 1 -- more space in the neovim command line for displaying messages
vim.cmd([[
set noshowmode
]])
-- ------------------------------------------------------------------------------------------------
-- backspace
-- ------------------------------------------------------------------------------------------------
opt.backspace = "indent,eol,start"
-- ------------------------------------------------------------------------------------------------
-- split windows
-- ------------------------------------------------------------------------------------------------
-- [[ Splits ]]
opt.splitright = true -- place new window to right of current one
opt.splitbelow = true -- place new window below the current one
-- ------------------------------------------------------------------------------------------------
-- AutoCompletion
--
-- set the completeopt to have a better completion experience
-- :help completeopt
--
-- menuone : popup even when there's only one match
-- noinsert : do not insert text until a selection is made
-- noselect : do not select, force to select one from the menu
-- shortmess : avoid showing extra messages when using completion
-- updatetime : set updatetime for CursorHold
-- ------------------------------------------------------------------------------------------------
opt.completeopt = {'menuone', 'noselect', 'noinsert'}
opt.shortmess = opt.shortmess + { c = true}
opt.updatetime = 100
--vim.api.nvim_set_option( 'updatetime', 300)
-- fixed column for diagnostic to appear
-- show autodiagnostic popup on cursor hover_range
-- goto previous/next diagnostic warning/error
-- show inlay_hints more frequently
vim.cmd([[
set signcolumn=yes
autocmd CursorHold * lua vim.diagnostic.open_float(nil, { focusable = false })
]])
-- ------------------------------------------------------------------------------------------------
-- clipboard
-- ------------------------------------------------------------------------------------------------
opt.clipboard:append("unnamedplus") -- allows neovim to access the system clipboard
opt.iskeyword:append("-")
--vim.g.neovide_cursor_vfx_mode = ""
--vim.g.neovide_cursor_animation_length = 0
--vim.g.neovide_transparency = 1.0
--vim.g.neovide_remember_window_size = true
---- vim.g.neovide_profiler =false
--vim.g.neovide_scroll_animation_length = 0.0
--
-- which.key options - 2026-05-28
--
vim.o.timeout = true
vim.o.timeoutlen = 300
vim.o.mouse = ''