nvim-config

Log | Files | Refs | Submodules | README

commit d83d9f0e9033a337235dd1785b8d659bfe141991
parent 4b8340f63f9b1429014dac5e5f33b1d2f6063932
Author: Thomas Vigouroux <thomas.vigouroux@protonmail.com>
Date:   Thu, 31 Mar 2022 09:10:17 +0200

fix(c): enhance source/header switching

And use clangd for that

Diffstat:
Mafter/ftplugin/c.vim | 4++--
Mlua/lsp_config.lua | 2+-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/after/ftplugin/c.vim b/after/ftplugin/c.vim @@ -1,4 +1,4 @@ -" Last Change: 2021 Nov 08 +" Last Change: 2022 Mar 31 setlocal expandtab setlocal textwidth=80 " Nvim uses this @@ -20,4 +20,4 @@ else let b:ext = "c" end -nnoremap <buffer> <Leader>c <cmd>execute printf("edit %s.%s", expand("%:p:r"), b:ext)<CR> +nnoremap <buffer> <Leader>c <cmd>ClangdSwitchSourceHeader<CR> diff --git a/lua/lsp_config.lua b/lua/lsp_config.lua @@ -115,7 +115,7 @@ local default_config = { capabilities = capabilities, on_attach = on_attach } local lsps = { -- Default configs - ccls = default_config, + clangd = default_config, als = default_config, ghcide = default_config, pylsp = default_config,