use clangd extensions
This commit is contained in:
parent
d8dee9c878
commit
78544dcdbf
@ -118,20 +118,30 @@ require('lspconfig')['cmake'].setup {
|
||||
local clangd_capabilities = capabilities
|
||||
clangd_capabilities.textDocument.semanticHighlighting = true
|
||||
clangd_capabilities.offsetEncoding = { "utf-16" }
|
||||
require('lspconfig')['clangd'].setup {
|
||||
capabilities = clangd_capabilities,
|
||||
on_attach = on_attach,
|
||||
cmd = { 'clangd', '--compile-commands-dir=build_nvim' },
|
||||
root_dir = require('lspconfig').util.root_pattern(
|
||||
'.clangd',
|
||||
'.clang-tidy',
|
||||
'.clang-format',
|
||||
'compile_commands.json',
|
||||
'compile_flags.txt',
|
||||
'configure.ac',
|
||||
'.git',
|
||||
'build_nvim'
|
||||
)
|
||||
require("clangd_extensions").setup {
|
||||
server = {
|
||||
capabilities = clangd_capabilities,
|
||||
on_attach = on_attach,
|
||||
cmd = { 'clangd', '--compile-commands-dir=build_nvim' },
|
||||
root_dir = require('lspconfig').util.root_pattern(
|
||||
'.clangd',
|
||||
'.clang-tidy',
|
||||
'.clang-format',
|
||||
'compile_commands.json',
|
||||
'compile_flags.txt',
|
||||
'configure.ac',
|
||||
'.git',
|
||||
'build_nvim'
|
||||
)
|
||||
},
|
||||
extensions =
|
||||
{
|
||||
inlay_hints = {
|
||||
-- Only show inlay hints for the current line
|
||||
only_current_line = true,
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
-- require('clangd_extensions').setup({
|
||||
-- server = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user