Nvim: update clangd_extensions with new config format
This commit is contained in:
@@ -3,10 +3,7 @@ return {{
|
||||
--"vim-test/vim-test",
|
||||
--"RRethy/vim-illuminate",
|
||||
{ "ftilde/vim-ugdb", cmd = "UGDBBreakpoint" },
|
||||
"jubnzv/virtual-types.nvim",
|
||||
'p00f/clangd_extensions.nvim',
|
||||
'ray-x/lsp_signature.nvim',
|
||||
"mrjones2014/nvim-ts-rainbow",
|
||||
"HiPhish/nvim-ts-rainbow2",
|
||||
-- }}}
|
||||
|
||||
-- }}}
|
||||
@@ -16,7 +13,6 @@ return {{
|
||||
"MunifTanjim/nui.nvim",
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-lua/popup.nvim",
|
||||
"stevearc/dressing.nvim",
|
||||
"wellle/targets.vim",
|
||||
-- }}}
|
||||
|
||||
@@ -30,7 +26,10 @@ return {{
|
||||
--"vim-pandoc/vim-pandoc",
|
||||
--"weirongxu/plantuml-previewer.vim", |
|
||||
"aklt/plantuml-syntax",
|
||||
"kergoth/vim-bitbake", -- Bitbake templates and syntax
|
||||
{
|
||||
"kergoth/vim-bitbake", -- Bitbake templates and syntax
|
||||
ft = { "bitbake" }
|
||||
},
|
||||
-- }}}
|
||||
|
||||
-- Other plugins (external tools, etc) {{{
|
||||
@@ -70,7 +69,6 @@ return {{
|
||||
--require('lsp_lines').setup()
|
||||
|
||||
--"mfussenegger/nvim-dap",
|
||||
--"nguyenvukhang/nvim-toggler",
|
||||
--"rgroli/other.nvim", " Currently doesn't support C/C++
|
||||
--"smolovk/projector.nvim",
|
||||
"Pocco81/true-zen.nvim",
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
return {
|
||||
'neovim/nvim-lspconfig',
|
||||
requires = {
|
||||
dependencies = {
|
||||
"SmiteshP/nvim-navbuddy",
|
||||
{url = "http://git.sr.ht/~p00f/clangd_extensions.nvim"},
|
||||
"jubnzv/virtual-types.nvim",
|
||||
"ray-x/lsp_signature.nvim",
|
||||
},
|
||||
config = function()
|
||||
local nvim_lsp = require('lspconfig')
|
||||
@@ -47,6 +50,8 @@ return {
|
||||
})
|
||||
require'nvim-navbuddy'.attach(client, bufnr)
|
||||
require'nvim-navic'.attach(client, bufnr)
|
||||
require("clangd_extensions.inlay_hints").setup_autocmd()
|
||||
require("clangd_extensions.inlay_hints").set_inlay_hints()
|
||||
end
|
||||
|
||||
local signs = {
|
||||
@@ -107,25 +112,94 @@ return {
|
||||
-- )
|
||||
-- )
|
||||
|
||||
clangd_extensions.setup({
|
||||
server = {
|
||||
on_attach = on_attach,
|
||||
root_pattern = {
|
||||
'.clangd',
|
||||
'.clang-tidy',
|
||||
'.clang-format',
|
||||
'compile_commands.json',
|
||||
'compile_flags.txt',
|
||||
'configure.ac',
|
||||
},
|
||||
capabilities = capabilities
|
||||
},
|
||||
nvim_lsp.clangd.setup({
|
||||
settings = {
|
||||
inlay_hints = {
|
||||
inline = false,
|
||||
max_len_align = true,
|
||||
max_len_align_padding = 3,
|
||||
right_align = true,
|
||||
inline = vim.fn.has("nvim-0.10") == 1,
|
||||
-- Options other than `highlight' and `priority' only work
|
||||
-- if `inline' is disabled
|
||||
-- Only show inlay hints for the current line
|
||||
only_current_line = false,
|
||||
-- Event which triggers a refresh of the inlay hints.
|
||||
-- You can make this { "CursorMoved" } or { "CursorMoved,CursorMovedI" } but
|
||||
-- not that this may cause higher CPU usage.
|
||||
-- This option is only respected when only_current_line and
|
||||
-- autoSetHints both are true.
|
||||
only_current_line_autocmd = { "CursorHold" },
|
||||
-- whether to show parameter hints with the inlay hints or not
|
||||
show_parameter_hints = true,
|
||||
-- prefix for parameter hints
|
||||
parameter_hints_prefix = "<- ",
|
||||
-- prefix for all the other hints (type, chaining)
|
||||
other_hints_prefix = "=> ",
|
||||
-- whether to align to the length of the longest line in the file
|
||||
max_len_align = false,
|
||||
-- padding from the left if max_len_align is true
|
||||
max_len_align_padding = 1,
|
||||
-- whether to align to the extreme right or not
|
||||
right_align = false,
|
||||
-- padding from the right if right_align is true
|
||||
right_align_padding = 7,
|
||||
-- The color of the hints
|
||||
highlight = "Comment",
|
||||
-- The highlight group priority for extmark
|
||||
priority = 100,
|
||||
},
|
||||
ast = {
|
||||
-- These are unicode, should be available in any font
|
||||
role_icons = {
|
||||
type = "🄣",
|
||||
declaration = "🄓",
|
||||
expression = "🄔",
|
||||
statement = ";",
|
||||
specifier = "🄢",
|
||||
["template argument"] = "🆃",
|
||||
},
|
||||
kind_icons = {
|
||||
Compound = "🄲",
|
||||
Recovery = "🅁",
|
||||
TranslationUnit = "🅄",
|
||||
PackExpansion = "🄿",
|
||||
TemplateTypeParm = "🅃",
|
||||
TemplateTemplateParm = "🅃",
|
||||
TemplateParamObject = "🅃",
|
||||
},
|
||||
--[[ These require codicons (https://github.com/microsoft/vscode-codicons)
|
||||
role_icons = {
|
||||
type = "",
|
||||
declaration = "",
|
||||
expression = "",
|
||||
specifier = "",
|
||||
statement = "",
|
||||
["template argument"] = "",
|
||||
},
|
||||
|
||||
kind_icons = {
|
||||
Compound = "",
|
||||
Recovery = "",
|
||||
TranslationUnit = "",
|
||||
PackExpansion = "",
|
||||
TemplateTypeParm = "",
|
||||
TemplateTemplateParm = "",
|
||||
TemplateParamObject = "",
|
||||
}, ]]
|
||||
highlights = {
|
||||
detail = "Comment",
|
||||
},
|
||||
memory_usage = {
|
||||
border = "none",
|
||||
},
|
||||
symbol_info = {
|
||||
border = "none",
|
||||
}
|
||||
}
|
||||
},
|
||||
on_attach = on_attach,
|
||||
--on_publish_diagnostics = diagnostic_handler,
|
||||
capabilities = capabilities,
|
||||
-- flags = {
|
||||
-- debounce_text_changes = 150,
|
||||
-- }
|
||||
})
|
||||
|
||||
nvim_lsp.pylsp.setup({
|
||||
|
||||
@@ -97,6 +97,6 @@ return {
|
||||
},
|
||||
}
|
||||
vim.opt.foldmethod = "expr"
|
||||
-- vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||
end
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user