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

fix(tint-nvim): update neo-tree β†’ NeoTree (ignore_patterns) #1172

Merged

Conversation

jondkinney
Copy link
Contributor

πŸ“‘ Description

In the highlight_ignore_patterns, neo-tree wasn't working at all, so I tried NeoTree. That worked except for the icons still dim. That's an acceptable limitation for now IMO. Perhaps in the future we can fix it so the icon hl group doesn't dim, either. But this is less broken than it was.

Copy link

github-actions bot commented Aug 21, 2024

Review Checklist

Does this PR follow the [Contribution Guidelines](development guidelines)? Following is a partial checklist:

Proper conventional commit scoping:

  • If you are adding a new plugin, the scope would be the name of the category it is being added into. ex. feat(utility): added noice.nvim plugin

  • If you are modifying a pre-existing plugin or pack, the scope would be the name of the plugin folder. ex. fix(noice-nvim): fix LSP handler error

  • Pull request title has the appropriate conventional commit type and scope where the scope is the name of the pre-existing directory in the project as described above

  • README is properly formatted and uses fenced in links with <url> unless they are inside a [title](url)

  • Entry returns a single plugin spec with the new plugin as the only top level spec (not applicable for recipes or packs).

  • Proper usage of opts table rather than setting things up with the config function.

  • Proper usage of specs table for all specs that are not dependencies of a given plugin (not applicable for recipes or packs).

@Uzaaft
Copy link
Member

Uzaaft commented Aug 22, 2024

neo-tree is the filetype.
@jondkinney The icons are in the highlights group NeoTreeFileIcon. Perhaps that's useful info for you :)

@Uzaaft Uzaaft merged commit 1abfba5 into AstroNvim:main Aug 22, 2024
15 checks passed
@jondkinney
Copy link
Contributor Author

@Uzaaft I actually found a more effective way to do this.

return {
  "levouh/tint.nvim",
  event = "User AstroFile",
  opts = function()
    local transforms = require "tint.transforms"

    -- Custom function to determine if a window is NeoTree
    local function is_neotree(buf)
      local ft = vim.bo[buf].filetype
      return ft == "neo-tree"
    end

    return {
      highlight_ignore_patterns = {
        "WinSeparator",
        "Status.*",
      },
      window_ignore_function = function(winid)
        local buf = vim.api.nvim_win_get_buf(winid)
        return is_neotree(buf)
      end,
      transforms = {
        transforms.tint_with_threshold(-45, "#2E3440", 135),
        transforms.saturate(0.7),
      },
    }
  end,
}

The transforms are specific to my colorscheme (nord), so those aren't probably helpful in the community version.

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

Successfully merging this pull request may close these issues.

2 participants