Skip to content

Highlighter excludes not working #146

@thesimonho

Description

@thesimonho

Not a question

  • This is not a question. If you have a question, use discussions.

I investigated.

  • I have read README.md, help documentation, and searched past issues but no solution.

Description

A couple of issues related to the highlighter and the excludes option:

  1. I notice in the code that highlighting should be disabled in the UI (ref), but the highlighter still seems to be on in the output line:
Image
  1. In excludes I have added the "lazy" ft, but it still seems to be highlighting short hexes (it treats PR # as short hex):
        highlighter = {
          auto_enable = true,
          lsp = true,
          excludes = { "lazy" },
        },
Image

Environments

OS: Linux (Arch - CachyOS)
neovim: 0.11.5

Minimal reproducible full config

using this to bootstrap lazyvim. pulling an old version of tokyonight to see some PR#

vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

require("lazy.minit").repro({
	spec = {
		{
			"uga-rosa/ccc.nvim",
			opts = {
				highlighter = {
					auto_enable = true,
					excludes = { "lazy" },
				},
			},
		},
		{
			"folke/tokyonight.nvim",
			tag = "v4.6.0",
		},
	},
})

Steps to reproduce

  1. create a file with some hex code
  2. :CccPick and the output line will still be highlighted
  3. :Lazy, hit CR on tokyonight and at the bottom PR #600 will be treated like a shorthex and be highlighted, even though the lazy ft has been excluded in the config

Expected behavior

  • No highlighting in the ccc ui
  • No highlighting in lazy ft if its in the exclude table

Actual behavior

Highlights are showing up even tho ft is excluded

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions