Skip to content

Commit

Permalink
fix(config): fixed some highlights to use the latest treesitter hl gr…
Browse files Browse the repository at this point in the history
…oups
  • Loading branch information
folke committed May 30, 2024
1 parent ce488b9 commit 63313cd
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 67 deletions.
123 changes: 61 additions & 62 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,15 @@ A pretty list for showing diagnostics, references, telescope results, quickfix a

## ✨ Features

- pretty list of:
- Diagnostics
- LSP references
- LSP implementations
- LSP definitions
- LSP type definitions
- quickfix list
- location list
- [Telescope](https://github.com/nvim-telescope/telescope.nvim) search results
- automatically updates on new diagnostics
- toggle **diagnostics** mode between **workspace** or **document**
- **interactive preview** in your last accessed window
- _cancel_ preview or _jump_ to the location
- configurable actions, signs, highlights,...
- Diagnostics
- LSP references
- LSP implementations
- LSP definitions
- LSP type definitions
- LSP Document Symbols
- quickfix list
- location list
- [Telescope](https://github.com/nvim-telescope/telescope.nvim) search results

## ⚡️ Requirements

Expand Down Expand Up @@ -292,7 +287,7 @@ Modes:

- **diagnostics**: diagnostics
- **diagnostics_buffer**: buffer diagnostics
- **fs**:
- **fs**:
- **loclist**: Location List
- **lsp**: LSP definitions, references, implementations, type definitions, and declarations
- **lsp_declarations**: declarations
Expand Down Expand Up @@ -373,7 +368,7 @@ require("trouble").first(opts)
---@return trouble.View
require("trouble").focus(opts)

-- Fold close
-- Fold close
---@param opts? trouble.Mode | { new? : boolean } | string
---@return trouble.View
require("trouble").fold_close(opts)
Expand Down Expand Up @@ -403,7 +398,7 @@ require("trouble").fold_enable(opts)
---@return trouble.View
require("trouble").fold_more(opts)

-- Fold open
-- Fold open
---@param opts? trouble.Mode | { new? : boolean } | string
---@return trouble.View
require("trouble").fold_open(opts)
Expand All @@ -423,7 +418,7 @@ require("trouble").fold_open_recursive(opts)
---@return trouble.View
require("trouble").fold_reduce(opts)

-- Fold toggle
-- Fold toggle
---@param opts? trouble.Mode | { new? : boolean } | string
---@return trouble.View
require("trouble").fold_toggle(opts)
Expand Down Expand Up @@ -549,51 +544,55 @@ When you open telescope, you can now hit `<c-t>` to open the results in **Troubl

The table below shows all the highlight groups defined for Trouble.

<details><summary>Highlight Groups</summary>

<!-- colors:start -->

| Highlight Group | Default Group | Description |
| ---------------------------- | ----------------------------- | ----------- |
| **TroubleCount** | **_TabLineSel_** | |
| **TroubleDirectory** | **_Directory_** | |
| **TroubleFileName** | **_Directory_** | |
| **TroubleIconArray** | **_@punctuation.bracket_** | |
| **TroubleIconBoolean** | **_@boolean_** | |
| **TroubleIconClass** | **_@type_** | |
| **TroubleIconConstant** | **_@constant_** | |
| **TroubleIconConstructor** | **_@constructor_** | |
| **TroubleIconDirectory** | **_Special_** | |
| **TroubleIconEnum** | **_@lsp.type.enum_** | |
| **TroubleIconEnumMember** | **_@lsp.type.enumMember_** | |
| **TroubleIconEvent** | **_Special_** | |
| **TroubleIconField** | **_@field_** | |
| **TroubleIconFile** | **_Normal_** | |
| **TroubleIconFunction** | **_@function_** | |
| **TroubleIconInterface** | **_@lsp.type.interface_** | |
| **TroubleIconKey** | **_@lsp.type.keyword_** | |
| **TroubleIconMethod** | **_@method_** | |
| **TroubleIconModule** | **_@namespace_** | |
| **TroubleIconNamespace** | **_@namespace_** | |
| **TroubleIconNull** | **_@constant.builtin_** | |
| **TroubleIconNumber** | **_@number_** | |
| **TroubleIconObject** | **_@constant_** | |
| **TroubleIconOperator** | **_@operator_** | |
| **TroubleIconPackage** | **_@namespace_** | |
| **TroubleIconProperty** | **_@property_** | |
| **TroubleIconString** | **_@string_** | |
| **TroubleIconStruct** | **_@lsp.type.struct_** | |
| **TroubleIconTypeParameter** | **_@lsp.type.typeParameter_** | |
| **TroubleIconVariable** | **_@variable_** | |
| **TroubleIndent** | **_LineNr_** | |
| **TroubleIndentFoldClosed** | **_CursorLineNr_** | |
| **TroubleIndentFoldOpen** | **_TroubleIndent_** | |
| **TroubleIndentLast** | **_TroubleIndent_** | |
| **TroubleIndentMiddle** | **_TroubleIndent_** | |
| **TroubleIndentTop** | **_TroubleIndent_** | |
| **TroubleIndentWs** | **_TroubleIndent_** | |
| **TroubleNormal** | **_NormalFloat_** | |
| **TroublePos** | **_LineNr_** | |
| **TroublePreview** | **_Visual_** | |
| **TroubleSource** | **_Comment_** | |
| **TroubleText** | **_Normal_** | |
| Highlight Group | Default Group | Description |
| --- | --- | --- |
| **TroubleCount** | ***TabLineSel*** | |
| **TroubleDirectory** | ***Directory*** | |
| **TroubleFileName** | ***Directory*** | |
| **TroubleIconArray** | ***@punctuation.bracket*** | |
| **TroubleIconBoolean** | ***@boolean*** | |
| **TroubleIconClass** | ***@type*** | |
| **TroubleIconConstant** | ***@constant*** | |
| **TroubleIconConstructor** | ***@constructor*** | |
| **TroubleIconDirectory** | ***Special*** | |
| **TroubleIconEnum** | ***@lsp.type.enum*** | |
| **TroubleIconEnumMember** | ***@lsp.type.enumMember*** | |
| **TroubleIconEvent** | ***Special*** | |
| **TroubleIconField** | ***@variable.member*** | |
| **TroubleIconFile** | ***Normal*** | |
| **TroubleIconFunction** | ***@function*** | |
| **TroubleIconInterface** | ***@lsp.type.interface*** | |
| **TroubleIconKey** | ***@lsp.type.keyword*** | |
| **TroubleIconMethod** | ***@function.method*** | |
| **TroubleIconModule** | ***@module*** | |
| **TroubleIconNamespace** | ***@module*** | |
| **TroubleIconNull** | ***@constant.builtin*** | |
| **TroubleIconNumber** | ***@number*** | |
| **TroubleIconObject** | ***@constant*** | |
| **TroubleIconOperator** | ***@operator*** | |
| **TroubleIconPackage** | ***@module*** | |
| **TroubleIconProperty** | ***@property*** | |
| **TroubleIconString** | ***@string*** | |
| **TroubleIconStruct** | ***@lsp.type.struct*** | |
| **TroubleIconTypeParameter** | ***@lsp.type.typeParameter*** | |
| **TroubleIconVariable** | ***@variable*** | |
| **TroubleIndent** | ***LineNr*** | |
| **TroubleIndentFoldClosed** | ***CursorLineNr*** | |
| **TroubleIndentFoldOpen** | ***TroubleIndent*** | |
| **TroubleIndentLast** | ***TroubleIndent*** | |
| **TroubleIndentMiddle** | ***TroubleIndent*** | |
| **TroubleIndentTop** | ***TroubleIndent*** | |
| **TroubleIndentWs** | ***TroubleIndent*** | |
| **TroubleNormal** | ***NormalFloat*** | |
| **TroublePos** | ***LineNr*** | |
| **TroublePreview** | ***Visual*** | |
| **TroubleSource** | ***Comment*** | |
| **TroubleText** | ***Normal*** | |

<!-- colors:end -->

</details>
10 changes: 5 additions & 5 deletions lua/trouble/config/highlights.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,19 @@ M.colors = {
IconEnum = "@lsp.type.enum",
IconEnumMember = "@lsp.type.enumMember",
IconEvent = "Special",
IconField = "@field",
IconField = "@variable.member",
IconFile = "Normal",
IconFunction = "@function",
IconInterface = "@lsp.type.interface",
IconKey = "@lsp.type.keyword",
IconMethod = "@method",
IconModule = "@namespace",
IconNamespace = "@namespace",
IconMethod = "@function.method",
IconModule = "@module",
IconNamespace = "@module",
IconNull = "@constant.builtin",
IconNumber = "@number",
IconObject = "@constant",
IconOperator = "@operator",
IconPackage = "@namespace",
IconPackage = "@module",
IconProperty = "@property",
IconString = "@string",
IconStruct = "@lsp.type.struct",
Expand Down

0 comments on commit 63313cd

Please sign in to comment.