require("config.lazy") vim.o.background = "dark" vim.o.tabstop = 4 vim.o.shiftwidth = 4 vim.o.ignorecase = true vim.o.number = true vim.cmd([[colorscheme gruvbox]]) vim.keymap.set('n', '', ':FzfLua files', { silent = true }) vim.keymap.set('n', 'gz', ':FzfLua', { silent = true }) vim.keymap.set('n', 'g', ':FzfLua grep_visual', { silent = true }) vim.keymap.set('n', 'gl', vim.diagnostic.open_float, { noremap = true, silent = true }) vim.keymap.set('n', 'gd', vim.lsp.buf.definition, { noremap = true, silent = true }) vim.keymap.set("n", 'gD', vim.lsp.buf.declaration, { noremap = true, silent = true }) vim.diagnostic.config({ virtual_text = true, }) -- TODO move this to a separate LSP config vim.lsp.enable('clangd') vim.api.nvim_create_autocmd("BufWritePre", { pattern = { "*.c", "*.cpp", "*.h", "*.hpp" }, callback = function() vim.lsp.buf.format({ async = false }) end, })