Nvim: update clangd_extensions with new config format
This commit is contained in:
@@ -3,10 +3,7 @@ return {{
|
|||||||
--"vim-test/vim-test",
|
--"vim-test/vim-test",
|
||||||
--"RRethy/vim-illuminate",
|
--"RRethy/vim-illuminate",
|
||||||
{ "ftilde/vim-ugdb", cmd = "UGDBBreakpoint" },
|
{ "ftilde/vim-ugdb", cmd = "UGDBBreakpoint" },
|
||||||
"jubnzv/virtual-types.nvim",
|
"HiPhish/nvim-ts-rainbow2",
|
||||||
'p00f/clangd_extensions.nvim',
|
|
||||||
'ray-x/lsp_signature.nvim',
|
|
||||||
"mrjones2014/nvim-ts-rainbow",
|
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- }}}
|
-- }}}
|
||||||
@@ -16,7 +13,6 @@ return {{
|
|||||||
"MunifTanjim/nui.nvim",
|
"MunifTanjim/nui.nvim",
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
"nvim-lua/popup.nvim",
|
"nvim-lua/popup.nvim",
|
||||||
"stevearc/dressing.nvim",
|
|
||||||
"wellle/targets.vim",
|
"wellle/targets.vim",
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
@@ -30,7 +26,10 @@ return {{
|
|||||||
--"vim-pandoc/vim-pandoc",
|
--"vim-pandoc/vim-pandoc",
|
||||||
--"weirongxu/plantuml-previewer.vim", |
|
--"weirongxu/plantuml-previewer.vim", |
|
||||||
"aklt/plantuml-syntax",
|
"aklt/plantuml-syntax",
|
||||||
"kergoth/vim-bitbake", -- Bitbake templates and syntax
|
{
|
||||||
|
"kergoth/vim-bitbake", -- Bitbake templates and syntax
|
||||||
|
ft = { "bitbake" }
|
||||||
|
},
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- Other plugins (external tools, etc) {{{
|
-- Other plugins (external tools, etc) {{{
|
||||||
@@ -70,7 +69,6 @@ return {{
|
|||||||
--require('lsp_lines').setup()
|
--require('lsp_lines').setup()
|
||||||
|
|
||||||
--"mfussenegger/nvim-dap",
|
--"mfussenegger/nvim-dap",
|
||||||
--"nguyenvukhang/nvim-toggler",
|
|
||||||
--"rgroli/other.nvim", " Currently doesn't support C/C++
|
--"rgroli/other.nvim", " Currently doesn't support C/C++
|
||||||
--"smolovk/projector.nvim",
|
--"smolovk/projector.nvim",
|
||||||
"Pocco81/true-zen.nvim",
|
"Pocco81/true-zen.nvim",
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
return {
|
return {
|
||||||
'neovim/nvim-lspconfig',
|
'neovim/nvim-lspconfig',
|
||||||
requires = {
|
dependencies = {
|
||||||
"SmiteshP/nvim-navbuddy",
|
"SmiteshP/nvim-navbuddy",
|
||||||
|
{url = "http://git.sr.ht/~p00f/clangd_extensions.nvim"},
|
||||||
|
"jubnzv/virtual-types.nvim",
|
||||||
|
"ray-x/lsp_signature.nvim",
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local nvim_lsp = require('lspconfig')
|
local nvim_lsp = require('lspconfig')
|
||||||
@@ -47,6 +50,8 @@ return {
|
|||||||
})
|
})
|
||||||
require'nvim-navbuddy'.attach(client, bufnr)
|
require'nvim-navbuddy'.attach(client, bufnr)
|
||||||
require'nvim-navic'.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
|
end
|
||||||
|
|
||||||
local signs = {
|
local signs = {
|
||||||
@@ -107,25 +112,94 @@ return {
|
|||||||
-- )
|
-- )
|
||||||
-- )
|
-- )
|
||||||
|
|
||||||
clangd_extensions.setup({
|
nvim_lsp.clangd.setup({
|
||||||
server = {
|
settings = {
|
||||||
on_attach = on_attach,
|
|
||||||
root_pattern = {
|
|
||||||
'.clangd',
|
|
||||||
'.clang-tidy',
|
|
||||||
'.clang-format',
|
|
||||||
'compile_commands.json',
|
|
||||||
'compile_flags.txt',
|
|
||||||
'configure.ac',
|
|
||||||
},
|
|
||||||
capabilities = capabilities
|
|
||||||
},
|
|
||||||
inlay_hints = {
|
inlay_hints = {
|
||||||
inline = false,
|
inline = vim.fn.has("nvim-0.10") == 1,
|
||||||
max_len_align = true,
|
-- Options other than `highlight' and `priority' only work
|
||||||
max_len_align_padding = 3,
|
-- if `inline' is disabled
|
||||||
right_align = true,
|
-- 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({
|
nvim_lsp.pylsp.setup({
|
||||||
|
|||||||
@@ -97,6 +97,6 @@ return {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
vim.opt.foldmethod = "expr"
|
vim.opt.foldmethod = "expr"
|
||||||
-- vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user