From 5f2c45050c71c7e5fcf3c90340a7a477cbe4578d Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Fri, 3 May 2024 11:39:49 +0100 Subject: [PATCH] Add mapping for :ClangdSwitchSourceHeader LSP extension --- lua/plugins/completions.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/plugins/completions.lua b/lua/plugins/completions.lua index d12c27b..abb732f 100644 --- a/lua/plugins/completions.lua +++ b/lua/plugins/completions.lua @@ -194,6 +194,10 @@ return { -- Format whole buffer mapping vim.keymap.set('n', 'gq', vim.lsp.buf.format, opts) + + -- Swtich file using clangd extension + -- TODO: limit this to only filetypes supported by clangd + vim.keymap.set('n', 'sf', ':ClangdSwitchSourceHeader', { silent = true }) end })