Closed litoj closed 1 year ago
None of the changed settings apply
are you sure you're calling M.config()
? Sorry, I can't help you further - this plugin only provides extra commands and inlay hints.
Side note, you don't need "VeryLazy" or any kind of lazy loading, this plugin already lazy loads itself
also when I set builtin inlay hints on, I see them twice.
Of course, this is only for neovim 0.9 or lower which doesn't have inlay hints built in
When including setup_autocmd, the inlay hints provided by this plugin are not displayed.
just use builtin inlay hints if you use neovim 0.10
I am mainly looking for a way to configure clangd through LSP, since I haven't found online anything about it that would have worked.
https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#clangd should be all
Instead of messing around with lazy.nvim, I think you should just add this somewhere in your init file:
require('lspconfig').clangd.setup {
capabilities = { offsetEncoding = 'utf-16' },
root_dir = function(fname)
return vim.fs.dirname(vim.fs.find({
'src',
'Makefile',
'CMakeLists.txt',
'.git',
}, { upward = true, path = fname })[1])
end,
on_attach = function(_client, bufnr)
vim.lsp.inlay_hint(bufnr, true)
end,
}
are you sure you're calling M.config()?
Well, yes - clangd does get started so that most certainly does get called
this is only for neovim 0.9 or lower which doesn't have inlay hints built in
I see, but so far this was the only option to get inlay hints just for the current line. That was why I was sad that I couldn't get the config to affect anything.
lspconfig/clangd should be all
Well, from what I can tell, there is no mention of any sorts of configuration options specific to clangd
, just the general lsp settings. On the Internet I only found some SublimeText example, which - even when translated to lua - did nothing even after trying a bunch of different variations.
I was hoping you ran into an issue of wanting to change some default settings, too, since you went through the effort to create this plugin.
ah those are through ~/.config/clangd/config.yaml
https://clangd.llvm.org/config#files
can't get only current line to work
I can reproduce this, I'll fix this soon
So only_current_line only worked when inline = false
, I fixed it now
I found nothing in official docs about how to set options through lsp, tried all other places I could find - still nothing.
Configuration shown here is not working for me (lazy.nvim):
None of the changed settings apply, also when I set builtin inlay hints on, I see them twice.
When including
setup_autocmd
, the inlay hints provided by this plugin are not displayed.I am mainly looking for a way to configure
clangd
through LSP, since I haven't found online anything about it that would have worked.