Skip to content

Commit 9dfe653

Browse files
authored
Merge pull request #4 from uloco/develop
v1.1.0
2 parents 6c54f41 + 647d1dd commit 9dfe653

File tree

3 files changed

+128
-41
lines changed

3 files changed

+128
-41
lines changed

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
A fancy but yet sophisticated light and dark designer neovim theme built with [lush.nvim](https://github.com/rktjmp/lush.nvim).
44
It features a much more comprehensive usage of syntax scopes and color
55
consistency, with due regards to aesthetics, contrast and readability.
6-
Most popular plugins are also supported, see _plugins_ (link)
6+
Most popular plugins are also supported, see [Plugins](#plugins)
77

88
This theme also works very good when Apple's **Nightshift Mode** is activated.
99

@@ -77,16 +77,17 @@ use {
7777

7878
## Usage
7979

80-
Enable the colorscheme with defaults.
81-
8280
> ⚠️ The `setup()` function is optional but please call it
8381
> **before** you set the colorscheme if you want to adjust the config.
8482
83+
These are the default values:
84+
8585
```lua
8686
require("bluloco").setup({
8787
style = "auto" -- "auto" | "dark" | "light"
8888
transparent = false,
8989
italics = false,
90+
terminal = vim.fn.has("gui_running") == 1 -- bluoco colors are enabled in gui terminals per default.
9091
})
9192

9293
vim.cmd('colorscheme bluloco')
@@ -136,6 +137,17 @@ See: bluloco theme for iTerm2 -->
136137

137138
This setting will enable italics for _keywords_, _comments_ and _markup attributes_.
138139

140+
### Terminal
141+
142+
This setting will enable the bluloco colors in your integrated terminal.
143+
You most likely want to keep your terminal colors instead of overriding them if you are running neovim in a terminal.
144+
When you are running neovim inside a gui application this setting is enabled per default.
145+
146+
You can skip the `terminal` setting completely to have it disabled in terminals and enabled in gui neovim.
147+
148+
> ℹ️ Please note that some terminals will display bold text as the bright color variant but enabling this feature will override this behavior in the intergrated terminal. This is by design and has nothing to do with this theme. [see](https://github.com/neovim/neovim/issues/11335)
149+
150+
139151
<!-- ## Recipes
140152
### Auto switching light & dark themes
141153
-->

lua/bluloco/init.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ local defaultConfig = {
66
style = "auto", -- auto | light | dark
77
transparent = false,
88
italics = false,
9+
terminal = vim.fn.has("gui_running") == 1,
910
}
1011

1112
M.config = defaultConfig

lua/lush_theme/bluloco.lua

Lines changed: 112 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
local lush = require('lush')
22
local hsl = lush.hsl
3+
local config = require("bluloco").config
34

45
-- Lush.hsl provides a number of convenience functions for:
56
--
@@ -36,23 +37,24 @@ local hsl = lush.hsl
3637

3738
local dark = {
3839
-- syntax
39-
bg = hsl("#282C34"),
40-
bgFloat = hsl("#21242D"),
41-
fg = hsl("#ABB2BF"),
42-
cursor = hsl("#FFCC00"),
43-
keyword = hsl("#10B1FE"),
44-
comment = hsl("#636D83"),
45-
punctuation = hsl("#7A82DA"),
46-
method = hsl("#3FC56B"),
47-
type = hsl("#FF6480"),
48-
string = hsl("#F9C859"),
49-
number = hsl("#FF78F8"),
50-
constant = hsl("#9F7EFE"),
51-
tag = hsl("#3691FF"),
52-
attribute = hsl("#FF936A"),
53-
property = hsl("#CE9887"),
54-
parameter = hsl("#8bcdef"),
55-
label = hsl("#50acae"),
40+
bg = hsl("#282C34"),
41+
bgFloat = hsl("#21242D"),
42+
fg = hsl("#ABB2BF"),
43+
cursor = hsl("#FFCC00"),
44+
keyword = hsl("#10B1FE"),
45+
comment = hsl("#636D83"),
46+
punctuation = hsl("#7A82DA"),
47+
method = hsl("#3FC56B"),
48+
type = hsl("#FF6480"),
49+
string = hsl("#F9C859"),
50+
number = hsl("#FF78F8"),
51+
constant = hsl("#9F7EFE"),
52+
tag = hsl("#3691FF"),
53+
attribute = hsl("#FF936A"),
54+
property = hsl("#CE9887"),
55+
parameter = hsl("#8bcdef"),
56+
label = hsl("#50acae"),
57+
5658
-- workspace
5759
primary = hsl("#3691ff"),
5860
selection = hsl("#274670"),
@@ -78,26 +80,45 @@ local dark = {
7880
mergeParent = hsl(235, 28, 32),
7981
mergeParentLabel = hsl(235, 29, 41),
8082

83+
-- terminal
84+
terminalBlack = hsl("#42444d"),
85+
terminalRed = hsl("#fc2e51"),
86+
terminalGreen = hsl("#25a45c"),
87+
terminalYellow = hsl("#ff9369"),
88+
terminalBlue = hsl("#3375fe"),
89+
terminalMagenta = hsl("#9f7efe"),
90+
terminalCyan = hsl("#4483aa"),
91+
terminalWhite = hsl("#cdd3e0"),
92+
terminalBrightBlack = hsl("#8f9aae"),
93+
terminalBrightRed = hsl("#ff637f"),
94+
terminalBrightGreen = hsl("#3fc56a"),
95+
terminalBrightYellow = hsl("#f9c858"),
96+
terminalBrightBlue = hsl("#10b0fe"),
97+
terminalBrightMagenta = hsl("#ff78f8"),
98+
terminalBrightCyan = hsl("#5fb9bc"),
99+
terminalBrightWhite = hsl("#ffffff"),
81100
}
82101

83102
local light = {
84-
bg = hsl("#F9F9F9"),
85-
bgFloat = hsl("#ECEDEE"),
86-
fg = hsl("#383A42"),
87-
cursor = hsl("#F31459"),
88-
keyword = hsl("#0098DD"),
89-
comment = hsl("#A0A1A7"),
90-
punctuation = hsl("#7A82DA"),
91-
method = hsl("#23974A"),
92-
type = hsl("#D52753"),
93-
string = hsl("#C5A332"),
94-
number = hsl("#CE33C0"),
95-
constant = hsl("#823FF1"),
96-
tag = hsl("#275FE4"),
97-
attribute = hsl("#DF631C"),
98-
property = hsl("#A05A48"),
99-
parameter = hsl("#40B8C5"),
100-
label = hsl("#3a8ab2"),
103+
-- syntax
104+
bg = hsl("#F9F9F9"),
105+
bgFloat = hsl("#ECEDEE"),
106+
fg = hsl("#383A42"),
107+
cursor = hsl("#F31459"),
108+
keyword = hsl("#0098DD"),
109+
comment = hsl("#A0A1A7"),
110+
punctuation = hsl("#7A82DA"),
111+
method = hsl("#23974A"),
112+
type = hsl("#D52753"),
113+
string = hsl("#C5A332"),
114+
number = hsl("#CE33C0"),
115+
constant = hsl("#823FF1"),
116+
tag = hsl("#275FE4"),
117+
attribute = hsl("#DF631C"),
118+
property = hsl("#A05A48"),
119+
parameter = hsl("#40B8C5"),
120+
label = hsl("#3a8ab2"),
121+
101122
-- workspace
102123
primary = hsl("#0099e1"),
103124
selection = hsl("#d2ecff"),
@@ -121,7 +142,25 @@ local light = {
121142
mergeIncoming = hsl("#DFEDF6"),
122143
mergeIncomingLabel = hsl("#CAE3F4"),
123144
mergeParent = hsl(233, 60, 95),
124-
mergeParentLabel = hsl(233, 60, 90)
145+
mergeParentLabel = hsl(233, 60, 90),
146+
147+
-- terminal
148+
terminalBlack = hsl("#373a41"),
149+
terminalRed = hsl("#d52652"),
150+
terminalGreen = hsl("#239749"),
151+
terminalYellow = hsl("#df621b"),
152+
terminalBlue = hsl("#275fe4"),
153+
terminalMagenta = hsl("#823ef0"),
154+
terminalCyan = hsl("#26608c"),
155+
terminalWhite = hsl("#b9bac1"),
156+
terminalBrightBlack = hsl("#676a77"),
157+
terminalBrightRed = hsl("#ff637f"),
158+
terminalBrightGreen = hsl("#3cbc66"),
159+
terminalBrightYellow = hsl("#c5a231"),
160+
terminalBrightBlue = hsl("#0099e0"),
161+
terminalBrightMagenta = hsl("#ce32c0"),
162+
terminalBrightCyan = hsl("#6d92ba"),
163+
terminalBrightWhite = hsl("#d3d3d3"),
125164
}
126165

127166
local t = dark
@@ -151,7 +190,7 @@ t.shade10 = shade(t.bg, 10)
151190
t.shade20 = shade(t.bg, 20)
152191
t.shade25 = shade(t.bg, 25)
153192
t.shade30 = shade(t.bg, 30)
154-
t.shade40 = shade(t.bg, 30)
193+
t.shade40 = shade(t.bg, 40)
155194
t.shade50 = shade(t.bg, 50)
156195
t.shade60 = shade(t.bg, 60)
157196
t.shade70 = shade(t.bg, 70)
@@ -165,12 +204,34 @@ t.grey10 = t.shade10.mix(t.primary, 10)
165204
t.grey20 = t.shade20.mix(t.primary, 10)
166205
t.grey25 = t.shade25.mix(t.primary, 10)
167206
t.grey30 = t.shade30.mix(t.primary, 10)
168-
t.grey40 = t.shade40.mix(t.primary, 10)
207+
t.grey40 = t.shade40.mix(t.primary, 12)
169208

170209

171210
t.white = hsl("#ffffff")
172211
t.green = hsl("#008200")
173212

213+
214+
-- -- terminal colors
215+
if (config.terminal == true) then
216+
vim.g.terminal_color_0 = t.terminalBlack.hex
217+
vim.g.terminal_color_1 = t.terminalRed.hex
218+
vim.g.terminal_color_2 = t.terminalGreen.hex
219+
vim.g.terminal_color_3 = t.terminalYellow.hex
220+
vim.g.terminal_color_4 = t.terminalBlue.hex
221+
vim.g.terminal_color_5 = t.terminalMagenta.hex
222+
vim.g.terminal_color_6 = t.terminalCyan.hex
223+
vim.g.terminal_color_7 = t.terminalWhite.hex
224+
vim.g.terminal_color_8 = t.terminalBrightBlack.hex
225+
vim.g.terminal_color_9 = t.terminalBrightRed.hex
226+
vim.g.terminal_color_10 = t.terminalBrightGreen.hex
227+
vim.g.terminal_color_11 = t.terminalBrightYellow.hex
228+
vim.g.terminal_color_12 = t.terminalBrightBlue.hex
229+
vim.g.terminal_color_13 = t.terminalBrightMagenta.hex
230+
vim.g.terminal_color_14 = t.terminalBrightCyan.hex
231+
vim.g.terminal_color_15 = t.terminalBrightWhite.hex
232+
end
233+
234+
174235
-- Call lush with our lush-spec.
175236
---@diagnostic disable: undefined-global
176237
local theme = lush(function(injected_functions)
@@ -205,7 +266,7 @@ local theme = lush(function(injected_functions)
205266
ErrorMsg { fg = t.error }, -- error messages on the command line
206267
VertSplit { fg = t.grey30 }, -- the column separating vertically split windows
207268
Winseparator { VertSplit }, -- Separator between window splits. Inherts from |hl-VertSplit| by default, which it will replace eventually.
208-
Folded { bg = t.grey10, fg = t.bg }, -- line used for closed folds
269+
Folded { bg = t.shade7, fg = t.tag }, -- line used for closed folds
209270
SignColumn { Normal }, -- column where |signs| are displayed
210271
FoldColumn { SignColumn }, -- 'foldcolumn'
211272
Substitute { IncSearch }, -- |:substitute| replacement text highlighting
@@ -871,6 +932,19 @@ local theme = lush(function(injected_functions)
871932
htmlArg { Special },
872933
htmlSpecialChar { Constant },
873934

935+
-- xml
936+
xmlTag { Tag },
937+
xmlProcessing { Tag },
938+
xmlProcessingDelim { Tag },
939+
xmlDoctypeDecl { Tag },
940+
xmlTagName { Tag },
941+
xmlDoctype { Statement },
942+
xmlAttrib { Attribute },
943+
xmlEqual { Punctuation },
944+
xmlEntityPunct { Punctuation },
945+
xmlEntity { Constant },
946+
xmlCdataStart { sym"@label" },
947+
874948
-- css
875949
cssProp { Property },
876950
cssBraces { Punctuation },

0 commit comments

Comments
 (0)