Skip to content

Commit

Permalink
feat!: add new options with better support for transparency (#185)
Browse files Browse the repository at this point in the history
This commit adds a few new options and improves transparency support.

Enable transparency styles:

```lua
styles = { transparency = true }
```

Feedback is appreciated!
  • Loading branch information
mvllow authored Jan 7, 2024
1 parent 3e301fd commit b776a47
Show file tree
Hide file tree
Showing 21 changed files with 1,102 additions and 960 deletions.
24 changes: 4 additions & 20 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,14 @@ body:
required: true
- type: input
attributes:
label: "Terminal"
placeholder: "Kitty"
label: "Terminal / multiplexer"
placeholder: "Kitty / tmux"
validations:
required: true
- type: textarea
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is. Please include any related errors you see in Neovim.
validations:
required: true
- type: textarea
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior.
placeholder: |
1.
2.
3.
validations:
required: true
- type: textarea
attributes:
label: Expected Behavior
description: A concise description of what you expected to happen.
description: A clear and concise description of what the bug is. Please include screenshots if possible and any related errors you see in Neovim.
validations:
required: true
- type: textarea
Expand All @@ -61,7 +45,7 @@ body:
end
require("rose-pine").setup({
-- ADD ROSÉ PINE CONFIG THAT IS _NECESSARY_ FOR REPRODUCING THE ISSUE
-- ADD ROSÉ PINE CONFIG THAT IS _NECESSARY_ TO REPRODUCE THE ISSUE
})
vim.cmd("colorscheme rose-pine")
Expand Down
12 changes: 0 additions & 12 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,12 @@ description: Suggest a new feature
title: "feature: "
labels: [enhancement]
body:
- type: textarea
validations:
required: true
attributes:
label: Is your feature request related to a problem? Please describe.
description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
- type: textarea
validations:
required: true
attributes:
label: Describe the solution you'd like
description: A clear and concise description of what you want to happen.
- type: textarea
validations:
required: true
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.
- type: textarea
validations:
required: false
Expand Down
4 changes: 0 additions & 4 deletions .stylua.toml

This file was deleted.

82 changes: 82 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Changelog

## v2.0.0-next.1

### What's new

- Add proper support for `StatusLineTerm` & `StatusLineTermNC`, controlled via `enable.terminal`
- Add background glow to diagnostic virtual text
- Add `extend_background_behind_borders`
- Add `styles.bold` and alternatively styling when disabled
- Add `before_highlight` hook to allow changing palette values and behaviours
- Increase contrast of search, visual selections, and more

### Features

**extend_background_behind_borders**

Extend float backgrounds behind borders. Results vary depending on your border characters.

```lua
{
extend_background_behind_borders = true
}
```

**styles.transparency**

Enable a unique experience focused around transparent terminals, avoiding large backgrounds and differentiating selections with foreground colours when possible.

```lua
{
styles = {
transparency = true
}
}
```

**before_highlight**

```lua
{
before_highlight = function(group, highlight, palette)
-- Disable all undercurls
if highlight.undercurl then
highlight.undercurl = false
end

-- Change palette colour
if highlight.fg == palette.pine then
highlight.fg = palette.foam
end
end,
}
```

### Breaking changes

> [!WARNING]
> Removed or renamed options should continue to work via internal migrations but backwards compatibility is not tested and may break at any time.
```diff
- dim_nc_background = true,
+ dim_inactive_windows = true,

- disable_background = true,
- disable_float_background = true,
+ styles.transparency = true

- disable_italics = true,
+ styles.italic = false,

- groups = {
- background = "...",
- comment = "...",
- punctuation = "...",
- },
+ highlight_groups = {
+ Normal = { bg = "..." },
+ Comment = { fg = "..." },
+ ["@punctuation"] = { fg = "..." },
+ }
```
4 changes: 2 additions & 2 deletions colors/rose-pine-dawn.lua
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
package.loaded['rose-pine.palette'] = nil
require('rose-pine').colorscheme('dawn')
package.loaded["rose-pine.palette"] = nil
require("rose-pine").colorscheme("dawn")
4 changes: 2 additions & 2 deletions colors/rose-pine-main.lua
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
package.loaded['rose-pine.palette'] = nil
require('rose-pine').colorscheme('main')
package.loaded["rose-pine.palette"] = nil
require("rose-pine").colorscheme("main")
4 changes: 2 additions & 2 deletions colors/rose-pine-moon.lua
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
package.loaded['rose-pine.palette'] = nil
require('rose-pine').colorscheme('moon')
package.loaded["rose-pine.palette"] = nil
require("rose-pine").colorscheme("moon")
4 changes: 2 additions & 2 deletions colors/rose-pine.lua
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
package.loaded['rose-pine.palette'] = nil
require('rose-pine').colorscheme()
package.loaded["rose-pine.palette"] = nil
require("rose-pine").colorscheme()
18 changes: 9 additions & 9 deletions lua/lualine/themes/rose-pine-alt.lua
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
local p = require('rose-pine.palette')
local p = require("rose-pine.palette")

return {
normal = {
a = { bg = p.surface, fg = p.rose, gui = 'bold' },
a = { bg = p.surface, fg = p.rose, gui = "bold" },
b = { bg = p.surface, fg = p.text },
c = { bg = p.surface, fg = p.subtle, gui = 'italic' },
c = { bg = p.surface, fg = p.subtle, gui = "italic" },
},
insert = {
a = { bg = p.surface, fg = p.foam, gui = 'bold' },
a = { bg = p.surface, fg = p.foam, gui = "bold" },
},
visual = {
a = { bg = p.surface, fg = p.iris, gui = 'bold' },
a = { bg = p.surface, fg = p.iris, gui = "bold" },
},
replace = {
a = { bg = p.surface, fg = p.pine, gui = 'bold' },
a = { bg = p.surface, fg = p.pine, gui = "bold" },
},
command = {
a = { bg = p.surface, fg = p.love, gui = 'bold' },
a = { bg = p.surface, fg = p.love, gui = "bold" },
},
inactive = {
a = { bg = p.base, fg = p.subtle, gui = 'bold' },
a = { bg = p.base, fg = p.subtle, gui = "bold" },
b = { bg = p.base, fg = p.subtle },
c = { bg = p.base, fg = p.subtle, gui = 'italic' },
c = { bg = p.base, fg = p.subtle, gui = "italic" },
},
}
14 changes: 7 additions & 7 deletions lua/lualine/themes/rose-pine.lua
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
local p = require('rose-pine.palette')
local p = require("rose-pine.palette")

return {
normal = {
a = { bg = p.rose, fg = p.base, gui = 'bold' },
a = { bg = p.rose, fg = p.base, gui = "bold" },
b = { bg = p.overlay, fg = p.rose },
c = { bg = p.base, fg = p.text },
},
insert = {
a = { bg = p.foam, fg = p.base, gui = 'bold' },
a = { bg = p.foam, fg = p.base, gui = "bold" },
b = { bg = p.overlay, fg = p.foam },
c = { bg = p.base, fg = p.text },
},
visual = {
a = { bg = p.iris, fg = p.base, gui = 'bold' },
a = { bg = p.iris, fg = p.base, gui = "bold" },
b = { bg = p.overlay, fg = p.iris },
c = { bg = p.base, fg = p.text },
},
replace = {
a = { bg = p.pine, fg = p.base, gui = 'bold' },
a = { bg = p.pine, fg = p.base, gui = "bold" },
b = { bg = p.overlay, fg = p.pine },
c = { bg = p.base, fg = p.text },
},
command = {
a = { bg = p.love, fg = p.base, gui = 'bold' },
a = { bg = p.love, fg = p.base, gui = "bold" },
b = { bg = p.overlay, fg = p.love },
c = { bg = p.base, fg = p.text },
},
inactive = {
a = { bg = p.base, fg = p.muted, gui = 'bold' },
a = { bg = p.base, fg = p.muted, gui = "bold" },
b = { bg = p.base, fg = p.muted },
c = { bg = p.base, fg = p.muted },
},
Expand Down
Loading

0 comments on commit b776a47

Please sign in to comment.