-- Formatting vim.g.autoformat = true vim.opt.fixeol = false local function safe_require(module) local ok, mod = pcall(require, module) if not ok then return nil end return mod end -- C++ local default_clangd_config = vim.deepcopy(vim.lsp.config["clangd"]) or {} default_clangd_config.cmd = { "clangd", "--background-index", "--clang-tidy", "--header-insertion=iwyu", "--completion-style=detailed", } vim.lsp.config("clangd", default_clangd_config) -- File Browser local neo_tree = safe_require("neo-tree") if neo_tree then local current_config = neo_tree.config or {} local project_config = vim.tbl_deep_extend("force", current_config, { nesting_rules = { ['*.hpp'] = { pattern = "(.*).hpp", files = { "%1.cpp", "%1.tests.cpp" } } } }) neo_tree.setup(project_config) end