zbirenbaum / neodim

Neovim plugin for dimming the highlights of unused functions, variables, parameters, and more
315 stars 10 forks source link

Regression in V2 in lua_ls #28

Closed swarn closed 1 year ago

swarn commented 1 year ago
:version
NVIM v0.10.0-dev-3+gd675bd01b

Config before V2:

  {
    "zbirenbaum/neodim",
    event = "LspAttach",
    opts = { alpha = 0.65, update_in_insert = { enable = false } },
  }

Result: Screenshot 2023-04-12 at 1 51 59 PM Config after V2:

  {
    "zbirenbaum/neodim",
    event = "LspAttach",
    branch = "v2",
    config = function()
      require("neodim").setup {
        refresh_delay = 75,
        alpha = 0.65,
        blend_color = "#000000",
        hide = { underline = true, virtual_text = true, signs = true },
        disable = {}, -- table of filetypes to disable neodim
      }
    end,
  },

Result: Screenshot 2023-04-12 at 1 53 51 PM Note that neodim is suppressing the underline and sign correctly. Is this a config error on my part?

zbirenbaum commented 1 year ago

Lua typically has the best functionality with neodim. There was a brief period I broke things due to a bug in the diagnostics filter but I haven't had any issues since. Are you up to date?

swarn commented 1 year ago

I'm up to date; neodim is 999e6ac and lua-language-server is 3.6.18. I get the same issue with clangd.

swarn commented 1 year ago

I haven't dug too deeply into it, but a few print statements show that, for me, neodim is adding its highlights with priority 100, which are being overridden by lsp highlights.

zbirenbaum commented 1 year ago

I can add a feature to customize the priority neodim gives its highlights if I forgot to add that back in. Most of the issues at the moment are semantic tokens related.

One of the eventual goals of V2 is to support LSP semantic tokens on top of treesitter. I spent quite a while trying to get it working well but couldn't make it feel remotely polished during my last attempt.

Unfortunately I have two jobs at the moment both requiring a sizable amount of my time and I'm not sure what the dev timeline for this will be.

zbirenbaum commented 1 year ago

Semantic token support has been merged! Thanks @futsuuu