Closed YangEfei closed 1 year ago
I can use it with this config:
local lspconfig_opts = {
capabilities = require("cmp_nvim_lsp").update_capabilities(vim.lsp.protocol.make_client_capabilities()),
flags = {
debounce_text_changes = 150,
},
on_attach = function(client, bufnr)
-- disable format
client.resolved_capabilities.document_formatting = false
client.resolved_capabilities.document_range_formatting = false
local function buf_set_keymap(...)
vim.api.nvim_buf_set_keymap(bufnr, ...)
end
-- bind keymap
require("keybindings").mapLSP(buf_set_keymap)
end,
}
return {
on_setup = function(server)
local ok_rt, clangd_ext = pcall(require, "clangd_extensions")
if not ok_rt then
print("Failed to load clangd_extensions.")
server.setup(lspconfig_opts)
else
clangd_ext.setup({
server = lspconfig_opts,
})
end
end
}
But the icons still can't see.(With some tags look like "?") How can I solve it? Thanks!
I have tried with MesloLGLDZ Nerd Font
and MelsoLGS NF
which can support powerline in my server. But I still can't see the icon in configuration. I will try to use other icons change it in the template.
Thanks a lot!
Try pasting the example configuration in your terminal to see if it is a font problem
Try pasting the example configuration in your terminal to see if it is a font problem
I have tried it. And still get some symbol like '?' in my terminal. And I try to copy some icon from the nerdfonts, they show correctly. So i feel so incomprehensible about it. But I don't know how to analysis it.
And you can see that, other icons in my nvim window can show correctly, too.
Then you can change the icons to the ones pasted from nerd font
Or use this font https://github.com/p00f/clangd_extensions.nvim/issues/7#issuecomment-1033428021
If you find some reasonable nerd font icons, can you post the configuration here?
OK, I will try to find reasonable nerd font icons for the configuration later.
Closing as this was a font issue
The default config now uses unicode icons which should be available in any font
https://www.unicode.org/charts/PDF/U1F100.pdf
https://github.com/p00f/clangd_extensions.nvim/commit/f2ca89d978f9fc907beb432a472a89fced7e10bd
Hi there. I tried to use the example configuration in the README.md to active my extension. But it seems doesn't work. I can only get the command tip
:ClangdSwitchHeader
in my neovim.(I think it means nvim-lsconfig is working?):ClangdAST
,:ClangdTypeHierarchy
and:ClangdMemoryUsage
all return withE492: Not an editor command: ...
In addition, I can't see the icons in
role_icons
andkind_icons
, neither on the website nor in my neovim. Will this issue have an impact?I'm a newbie to lua and I don't know what happened here... How can I fix it? Thanks a lot!