41 lines
1.1 KiB
Lua
41 lines
1.1 KiB
Lua
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, -- don’t 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
|