1

I used to do it with Coc.nvim

:CocCommand clangd.switchSourceHeader

But now I have moved to built-in nvim lsp and haven't any idea how to the same.

I found this solution for coc, but still dont how to do this for nvim lsp.

execute 'edit' CocRequest('clangd', 'textDocument/switchSourceHeader', {'uri': 'file://'.expand("%:p")})
i3Cheese
  • 15
  • 4
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Feb 03 '22 at 09:50

1 Answers1

1

When using the built-in LSP client, I recommend using the nvim-lspconfig plugin for configuring the servers. For clangd, it creates a command :ClangdSwitchSourceHeader (see documentation).

luator
  • 4,769
  • 3
  • 30
  • 51