p00f / clangd_extensions.nvim

Clangd's off-spec features for neovim's LSP client. Use https://sr.ht/~p00f/clangd_extensions.nvim instead
MIT License
448 stars 16 forks source link

`ClangdToggleInlayHints` must hits twice first time #58

Closed cxwx closed 1 week ago

cxwx commented 1 month ago

when I use

      local on_attach2 = function(_, bufnr)
        vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc")
        require("clangd_extensions.inlay_hints").setup_autocmd()
        require("clangd_extensions.inlay_hints").set_inlay_hints()
      end
{
    "p00f/clangd_extensions.nvim",
    enabled = true,
    ft = { "c", "cpp" },
    opts = { extensions = { autoSetHints = true } },
    lazy = true,
}

the inlayHints auto start, for the first time I use ClangdToggleInlayHints I must entering the cmd twice. Is there some where configure wrong with me?

p00f commented 1 month ago

You don't need to lazy load it, good plugins (including this one) lazy-load themselves.

If the issue still persists, please provide a minimal reproduction using a simpler plugin manager like vim-plug, paq-nvim or :h packages

p00f commented 1 week ago

Author has not responded, closing