Skip to content

Treesitter Highlighting Looks Worse for Rust #196

@mike-lloyd03

Description

@mike-lloyd03

Thanks for this plugin. I love onedark and I think your approach to it is the easiest one to use.

I just noticed today that I didn't have the Rust treesitter parser installed. I was getting syntax highlighting probably through the "rust-tools.nvim" plugin previously.

When I enable treesitter highlighting with TSEnable highlight, almost everything remains the same except for three things:

  • ? operators
  • & operators
  • Angle brackets

The highlight for these nodes makes them hard to distinguish from other text.

Is this intended? Or do I have a conflict somewhere?

Here's some pictures for reference:

TS Highlighting Disabled:
Screenshot_20231217_205500

TS Highlighting Enabled:
Screenshot_20231217_205447

Here's my config:

-- Color scheme config
require("onedark").setup({
    style = "deep",
    toggle_style_key = "<leader>ts",
    lualine = {
        transparent = true,
    },
    highlights = {
        MatchParen = { fg = "$red", bg = "$none", fmt = "underline" },

        TelescopeBorder = { fg = "$light_grey" },
        TelescopePromptBorder = { fg = "$light_grey" },
        TelescopeResultsBorder = { fg = "$light_grey" },
        TelescopePreviewBorder = { fg = "$light_grey" },
        TelescopeMatching = { fg = "$orange", fmt = "bold" },
        TelescopePromptPrefix = { fg = "$red" },

        CurSearch = { bg = "$fg" },
        IncSearch = { bg = "$fg" },
        Search = { bg = "$blue" },

        FoldColumn = { bg = "$bg0" },
    },
    diagnostics = {
        darker = true,
        undercurl = true,
    },
})
require("onedark").load()

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions