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