From 1c482ecdf7980c1c5850c3993c9fd91f040af111 Mon Sep 17 00:00:00 2001 From: Fabian Schmidt Date: Mon, 15 Dec 2025 07:47:03 +0100 Subject: [PATCH] add clang-tidy and changed tab width from 4 to 2 --- init.lua | 8 ++++---- lua/plugins/lsp.lua | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/init.lua b/init.lua index 4249c28..9e9175d 100644 --- a/init.lua +++ b/init.lua @@ -44,10 +44,10 @@ vim.opt.wrap = false vim.opt.signcolumn = 'yes:2' vim.opt.list = true vim.opt.listchars = 'tab:▸ ,trail:·' -vim.opt.shiftwidth = 4 -vim.opt.tabstop = 4 -vim.opt.softtabstop = 4 -vim.opt.expandtab = false +vim.opt.shiftwidth = 2 +vim.opt.tabstop = 2 +vim.opt.softtabstop = 2 +vim.opt.expandtab = true vim.opt.autoindent = true vim.opt.smartindent = true vim.opt.completeopt = { "menu", "menuone", "noselect" } diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 0d6dc95..04ddf1b 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -175,7 +175,8 @@ return { -- }) vim.lsp.config('clangd', { capabilities = capabilities, - on_attach = lsp_attach + on_attach = lsp_attach, + cmd = { "clangd", '--background-index', '--clang-tidy' } }) vim.lsp.enable({ 'ts_ls', 'vue_ls', 'clangd' }) end