Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lack of highlight group for "TODO" in comments #72

Closed
Philogy opened this issue May 9, 2024 · 3 comments
Closed

Lack of highlight group for "TODO" in comments #72

Philogy opened this issue May 9, 2024 · 3 comments
Assignees

Comments

@Philogy
Copy link

Philogy commented May 9, 2024

The theme seems to color other special comment things just fine but not TODOs when connected to tree-sitter for some reason (this is with javascript + comment tree-sitter installed).
image

I tested another theme (onedark) just to confirm that this is a bluloco + tree-sitter issue.

Disabling tree-sitter seems to bring back some TODO highlighting in bluloco:
image

Appreciate you looking into this, thanks!

@uloco uloco self-assigned this May 16, 2024
@uloco
Copy link
Owner

uloco commented May 16, 2024

What TODO plugin are you using? I'm using folke/todo-comments.nvim and it works when there is a colon after TODO, like TODO: and FIXME:. You can also adjust the pattern it matches so you could make it work for your style as well.
I can't fix what treesitter is doing here so I advise for using that plugin. Otherwise I don't know what to do about this tbh.

@uloco
Copy link
Owner

uloco commented May 16, 2024

My current todo-comment config is this:

local status, todo = pcall(require, "todo-comments")
if (not status) then return end

todo.setup({
  search = {
    command = "rg",
    args = {
      "--color=never",
      "--no-heading",
      "--with-filename",
      "--line-number",
      "--column",
      "--glob=!e2e",
      "--glob=!translations",
      "--glob=!*.json",
      "--hidden"
    },
    -- regex that will be used to match keywords.
    -- don't replace the (KEYWORDS) placeholder
    pattern = [[\b(KEYWORDS):]], -- ripgrep regex
    -- pattern = [[\b(KEYWORDS)\b]], -- match without the extra colon. You'll likely get false positives
  },
})

@Philogy
Copy link
Author

Philogy commented May 16, 2024

Is that an extra plugin I need to install?

@uloco uloco closed this as not planned Won't fix, can't repro, duplicate, stale Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants