Files
dotfiles/.config/nvim/lua/core/config.lua
2025-08-25 18:23:54 -05:00

41 lines
1.1 KiB
Lua
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
local o = vim.opt
-- Numbers/UI
o.number = true
o.relativenumber = true
o.signcolumn = "yes"
o.termguicolors = true
o.updatetime = 300
-- Indentation: 2 spaces, never tabs
o.expandtab = true -- insert spaces when you press <Tab>
o.shiftwidth = 2 -- >> and << shift by 2
o.tabstop = 2 -- a <Tab> displays as 2 spaces
o.softtabstop = 2 -- <BS> unindents by 2 in insert mode
o.smartindent = true -- basic smart indenting for code
o.clipboard = "unnamedplus"
-- Diagnostics: right-side virtual text + nice floats + sorted severity
vim.diagnostic.config({
virtual_text = {
spacing = 2,
prefix = "", -- small dot; try "▎" or "" if you like
},
severity_sort = true,
underline = true,
update_in_insert = false, -- dont distract while typing
float = {
border = "rounded",
source = "if_many",
header = "",
prefix = "",
},
})
-- Pretty signs in the gutter (left)
for type, icon in pairs({ Error="", Warn="", Hint="", Info="" }) do
local hl = "DiagnosticSign" .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
end