From 29141d88ed07904b0ddb2ea92e7c883e5495c2b4 Mon Sep 17 00:00:00 2001 From: Niverton Date: Sat, 16 Mar 2024 11:07:46 +0100 Subject: [PATCH] feat(lsp): disable inlay_hints, clangd changes --- lua/plugins/20-lsp.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lua/plugins/20-lsp.lua b/lua/plugins/20-lsp.lua index 32cf790..6a6dbc2 100644 --- a/lua/plugins/20-lsp.lua +++ b/lua/plugins/20-lsp.lua @@ -5,7 +5,7 @@ return { opts = { features = { autoformat = false, - inlay_hints = true, + inlay_hints = false, -- BUG: upstream https://github.com/neovim/neovim/issues/27645 }, formatting = { format_on_save = { @@ -16,7 +16,7 @@ return { mappings = { n = { gh = { - require("clangd_extensions.switch_source_header").switch_source_header, + function() require("clangd_extensions.switch_source_header").switch_source_header() end, desc = "Switch to matching source or header file", cond = "textDocument/switchSourceHeader", }, @@ -25,8 +25,12 @@ return { ---@diagnostic disable: missing-fields config = { clangd = { - cmd = { "clangd", "--header-insertion=never" }, -- Disable auto includes filetypes = { 'c', 'cpp', 'objc', 'objcpp', 'cuda' }, + cmd = { + "clangd", + "--header-insertion=never", -- Disable auto includes + "--enable-config", -- Enable .clangd and clangd.yaml files + }, }, }, },