fixed clangd lsp
This commit is contained in:
@ -94,7 +94,6 @@ local on_attach = function(client, bufnr)
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
return {
|
||||
@ -226,27 +225,28 @@ return {
|
||||
local clangd_capabilities = capabilities
|
||||
clangd_capabilities.textDocument.semanticHighlighting = true
|
||||
clangd_capabilities.offsetEncoding = { 'utf-16' }
|
||||
require('clangd_extensions').setup {
|
||||
server = {
|
||||
capabilities = clangd_capabilities,
|
||||
on_attach = on_attach,
|
||||
cmd = { 'clangd',
|
||||
'--compile-commands-dir=build_nvim',
|
||||
'--query-driver', '/opt/cortex-a78-2022.08-gcc12.1-linux5.15/bin/aarch64-linux-gnu-g*',
|
||||
'--clang-tidy',
|
||||
'--background-index',
|
||||
'--use-dirty-headers',
|
||||
'--completion-style=detailed' },
|
||||
root_dir = lspconfig.util.root_pattern(
|
||||
'.clangd',
|
||||
'.clang-tidy',
|
||||
'.clang-format',
|
||||
'compile_flags.txt',
|
||||
'configure.ac',
|
||||
'.git',
|
||||
'build_nvim'
|
||||
)
|
||||
},
|
||||
lspconfig['clangd'].setup {
|
||||
capabilities = clangd_capabilities,
|
||||
on_attach = on_attach,
|
||||
cmd = { 'clangd',
|
||||
'--compile-commands-dir=build_nvim',
|
||||
'--query-driver', '/opt/cortex-a78-2022.08-gcc12.1-linux5.15/bin/aarch64-linux-gnu-g*',
|
||||
'--clang-tidy',
|
||||
'--background-index',
|
||||
'--use-dirty-headers',
|
||||
'--completion-style=detailed' },
|
||||
root_dir = lspconfig.util.root_pattern(
|
||||
'.clangd',
|
||||
'.clang-tidy',
|
||||
'.clang-format',
|
||||
'compile_flags.txt',
|
||||
'configure.ac',
|
||||
'.git',
|
||||
'build_nvim'
|
||||
)
|
||||
}
|
||||
|
||||
require('clangd_extensions').setup({
|
||||
extensions =
|
||||
{
|
||||
inlay_hints = {
|
||||
@ -254,8 +254,7 @@ return {
|
||||
only_current_line = true,
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
lspconfig['jsonls'].setup {
|
||||
capabilities = capabilities,
|
||||
@ -326,7 +325,7 @@ return {
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
vim.diagnostic.config({ virtual_text = true})
|
||||
vim.diagnostic.config({ virtual_text = true })
|
||||
-- vim.diagnostic.config({ virtual_text = false, virtual_lines = false })
|
||||
-- vim.diagnostic.config({ virtual_text = false, virtual_lines = { only_current_line = true } })
|
||||
end,
|
||||
|
Reference in New Issue
Block a user