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

how to prevent this warning #27

Closed bryant-the-coder closed 1 year ago

bryant-the-coder commented 1 year ago

image

bryant-the-coder commented 1 year ago

my config for cpp

local clangd_defaults = require "lspconfig.server_configurations.clangd"
local clangd_configs = vim.tbl_deep_extend("force", clangd_defaults["default_config"], {
  -- on_attach = on_attach_16,
  -- on_attach = on_attach,
  cmd = {
    "clangd",
    "-j=4",
    "--background-index",
    "--clang-tidy",
    "--fallback-style=llvm",
    "--all-scopes-completion",
    "--completion-style=detailed",
    "--header-insertion=iwyu",
    "--header-insertion-decorators",
    "--pch-storage=memory",
  },
})
require("clangd_extensions").setup {
  server = clangd_configs,
  extensions = {
    autoSetHints = true,
    hover_with_actions = true,
    inlay_hints = {
      only_current_line = false,
      only_current_line_autocmd = "CursorHold",
      show_parameter_hints = true,
      parameter_hints_prefix = "<- ",
      other_hints_prefix = "=> ",
      max_len_align = false,
      max_len_align_padding = 1,
      right_align = false,
      right_align_padding = 7,
      highlight = "Comment",
      priority = 100,
    },
    ast = {
      role_icons = {
        type = "",
        declaration = "",
        expression = "",
        specifier = "",
        statement = "",
        ["template argument"] = "",
      },
      {
        Compound = "",
        Recovery = "",
        TranslationUnit = "",
        PackExpansion = "",
        TemplateTypeParm = "",
        TemplateTemplateParm = "",
        TemplateParamObject = "",
      },
      highlights = {
        detail = "Comment",
      },
      memory_usage = {
        border = "rounded",
      },
      symbol_info = {
        border = "rounded",
      },
    },
  },
}
p00f commented 1 year ago

No idea, this is probably a neovim issue - see if it goes away if you remove this and just use lspconfig

bryant-the-coder commented 1 year ago

after disabling the extension, the problem still proceeds

p00f commented 1 year ago

Neovim issue then

ls-devs commented 1 year ago

@p00f Sorry for commenting an old issue, but I got the same warning. Disabling the extension solve the problem.