vim.cmd("set expandtab")
vim.cmd("set tabstop=2")
vim.cmd("set softtabstop=2")
vim.cmd("set shiftwidth=2")

-- disable netrw at the very start of your init.lua
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1

-- vim options
local opt = vim.opt

-- line numbering
opt.number = true
opt.relativenumber = true

-- copy/paste 
vim.o.clipboard = 'unnamedplus'
vim.cmd("xnoremap p pgvy")

-- undo
opt.undodir = os.getenv("HOME") .. "/.vim/undodir"

-- Languages
opt.spelllang = "en_us,fr"
opt.spell = true

vim.cmd("autocmd BufRead,BufNewFile *.typ set filetype=typst")

local symbols = { Error = "󰅙", Info = "󰋼", Hint = "󰌵", Warn = "" }

for name, icon in pairs(symbols) do
	local hl = "DiagnosticSign" .. name
	vim.fn.sign_define(hl, { text = icon, numhl = hl, texthl = hl })
end

vim.diagnostic.config({
	virtual_text = {
		prefix = "●",
	},
})

require("config.lazy")
require("config.mappings")
