Skip to content

Commit 2ed3d5c

Browse files
committed
Change default highlight_group
As I changed colorschemes, I started to notice that CursorLine was the default color I was originally going for. ColorColumn happened to be the right one on the colorschemes I had been using, but it wasn't right across a broader spectrum of colorschemes. This change may introduce a change to users; I hope it isn't too jarring. My rationale is twofold: * the readme suggests using the plugin with hard coded defaults, so many users may be doing this, which means this change won't affect them * CursorLine is the same color as ColorColumn for many colorschemes Hopefully this ends up being an improvement.
1 parent 6f801c5 commit 2ed3d5c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ The swap commands intelligently swap nodes, including comments and attributes/de
5757

5858
-- The color of the above highlight. Must be a valid vim highlight group.
5959
-- (see :h highlight-group for options)
60-
highlight_group = 'ColorColumn',
60+
highlight_group = 'CursorLine',
6161
}
6262
}
6363
```
@@ -79,7 +79,7 @@ use {
7979

8080
-- The color of the above highlight. Must be a valid vim highlight group.
8181
-- (see :h highlight-group for options)
82-
highlight_group = 'ColorColumn',
82+
highlight_group = 'CursorLine',
8383
})
8484
end
8585
}
@@ -90,7 +90,7 @@ use {
9090
Plug 'aaronik/treewalker.nvim'
9191
9292
" This line is optional
93-
:lua require('treewalker').setup({ highlight = true, highlight_duration = 250, highlight_group = 'ColorColumn' })
93+
:lua require('treewalker').setup({ highlight = true, highlight_duration = 250, highlight_group = 'CursorLine' })
9494
```
9595

9696
---

lua/treewalker/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ local Treewalker = {}
99
Treewalker.opts = {
1010
highlight = true,
1111
highlight_duration = 250,
12-
highlight_group = "ColorColumn",
12+
highlight_group = "CursorLine",
1313
}
1414

1515
-- This does not need to be called for Treewalker to work. The defaults are preinitialized and aim to be sane.

tests/treewalker/highlight_spec.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ describe("Highlights in a regular lua file: ", function()
7575
tw.setup({ highlight = true, highlight_duration = 250 })
7676
tw.move_down()
7777
local hl_group_arg = highlight_stub.calls[1].refs[3]
78-
assert.equal("ColorColumn", hl_group_arg)
78+
assert.equal("CursorLine", hl_group_arg)
7979
end)
8080

8181
it("respects highlight_group config option", function()

0 commit comments

Comments
 (0)