aboutsummaryrefslogtreecommitdiffstats
path: root/lua/config/native-colorscheme.lua
blob: 4024f3f4d22defb986d55fb25830e44bb7710f3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
-- =====================================================
-- Native Solarized Osaka Colorscheme Implementation
-- =====================================================

local M = {}

-- Color palette based on solarized-osaka
local colors = {
  -- Base colors
  base03 = "#16161e",
  base02 = "#1a1a23",
  base01 = "#2e3c64",
  base00 = "#414868",
  base0 = "#565f89",
  base1 = "#6183bb",
  base2 = "#7aa2f7",
  base3 = "#bb9af7",
  base4 = "#c0caf5",
  
  -- Background variants
  bg_dark = "#16161e",
  bg = "#1a1b26",
  bg_highlight = "#292e42",
  bg_popup = "#16161e",
  bg_sidebar = "#16161e",
  bg_statusline = "#16161e",
  bg_float = "#1a1a23",
  
  -- Foreground
  fg = "#c0caf5",
  fg_dark = "#a9b1d6",
  fg_gutter = "#3b4261",
  
  -- Accent colors
  red = "#f7768e",
  orange = "#ff9e64",
  yellow = "#e0af68",
  green = "#9ece6a",
  cyan = "#73daca",
  blue = "#7aa2f7",
  purple = "#bb9af7",
  magenta = "#bb9af7",
  
  -- Enhanced versions
  red100 = "#ff7a93",
  orange100 = "#ffad7a",
  yellow100 = "#e7c664",
  green100 = "#b3d882",
  cyan100 = "#7dd3c0",
  blue100 = "#9bb3f7",
  purple100 = "#d2a8ff",
  magenta100 = "#d2a8ff",
  
  red300 = "#f7768e",
  orange300 = "#ff9e64",
  yellow300 = "#e0af68",
  green300 = "#9ece6a",
  cyan300 = "#73daca",
  blue300 = "#7aa2f7",
  purple300 = "#bb9af7",
  magenta300 = "#bb9af7",
  
  -- Special
  border = "#27a1b9",
  comment = "#565f89",
  none = "NONE",
}

-- Highlight groups
local highlights = {
  -- Editor
  Normal = { fg = colors.fg, bg = colors.none },
  NormalFloat = { fg = colors.fg, bg = colors.bg_float },
  NormalNC = { fg = colors.fg, bg = colors.none },
  FloatBorder = { fg = colors.border, bg = colors.bg_float },
  FloatTitle = { fg = colors.blue100, bg = colors.bg_float, bold = true },
  
  -- Cursor
  Cursor = { fg = colors.bg, bg = colors.fg },
  CursorLine = { bg = "#1e202a" },
  CursorLineNr = { fg = colors.orange, bold = true },
  CursorColumn = { bg = colors.bg_highlight },
  
  -- Line numbers
  LineNr = { fg = colors.fg_gutter },
  SignColumn = { fg = colors.fg_gutter, bg = colors.none },
  
  -- Visual selection
  Visual = { bg = "#33467c" },
  VisualNOS = { bg = "#33467c" },
  
  -- Search
  Search = { bg = colors.yellow, fg = colors.bg_dark },
  IncSearch = { bg = colors.orange, fg = colors.bg_dark },
  
  -- Statusline
  StatusLine = { fg = colors.fg, bg = colors.bg_statusline },
  StatusLineNC = { fg = colors.comment, bg = colors.bg_statusline },
  
  -- Tabs
  TabLine = { fg = colors.comment, bg = colors.bg_statusline },
  TabLineFill = { bg = colors.bg_statusline },
  TabLineSel = { fg = colors.fg, bg = colors.bg_highlight },
  
  -- Popup menu
  Pmenu = { fg = colors.fg, bg = colors.bg_popup },
  PmenuSel = { fg = colors.fg, bg = colors.bg_highlight, bold = true },
  PmenuSbar = { bg = colors.bg_popup },
  PmenuThumb = { bg = colors.fg_gutter },
  
  -- Splits
  VertSplit = { fg = colors.border },
  WinSeparator = { fg = colors.border },
  
  -- Diagnostics
  DiagnosticError = { fg = colors.red },
  DiagnosticWarn = { fg = colors.yellow },
  DiagnosticInfo = { fg = colors.blue },
  DiagnosticHint = { fg = colors.cyan },
  
  -- Syntax highlighting
  Comment = { fg = colors.comment, italic = true },
  
  Constant = { fg = colors.orange, bold = true },
  String = { fg = colors.green },
  Character = { fg = colors.green },
  Number = { fg = colors.orange },
  Boolean = { fg = colors.orange },
  Float = { fg = colors.orange },
  
  Identifier = { fg = colors.red },
  Function = { fg = colors.blue, bold = true },
  
  Statement = { fg = colors.purple, italic = true },
  Conditional = { fg = colors.purple, italic = true },
  Repeat = { fg = colors.purple, italic = true },
  Label = { fg = colors.purple },
  Operator = { fg = colors.cyan },
  Keyword = { fg = colors.purple, italic = true },
  Exception = { fg = colors.purple },
  
  PreProc = { fg = colors.cyan },
  Include = { fg = colors.purple },
  Define = { fg = colors.purple },
  Macro = { fg = colors.purple },
  PreCondit = { fg = colors.cyan },
  
  Type = { fg = colors.yellow, bold = true },
  StorageClass = { fg = colors.yellow },
  Structure = { fg = colors.yellow },
  Typedef = { fg = colors.yellow },
  
  Special = { fg = colors.blue },
  SpecialChar = { fg = colors.orange },
  Tag = { fg = colors.red },
  Delimiter = { fg = colors.fg },
  SpecialComment = { fg = colors.comment },
  Debug = { fg = colors.orange },
  
  -- Git
  GitSignsAdd = { fg = colors.green },
  GitSignsChange = { fg = colors.yellow },
  GitSignsDelete = { fg = colors.red },
  
  -- Tree-sitter
  ["@comment"] = { link = "Comment" },
  ["@keyword"] = { link = "Keyword" },
  ["@keyword.conditional"] = { link = "Conditional" },
  ["@keyword.repeat"] = { link = "Repeat" },
  ["@keyword.function"] = { fg = colors.purple, italic = true },
  ["@function"] = { link = "Function" },
  ["@function.builtin"] = { fg = colors.cyan, bold = true },
  ["@variable"] = { fg = colors.fg },
  ["@variable.builtin"] = { fg = colors.red },
  ["@constant"] = { link = "Constant" },
  ["@constant.builtin"] = { fg = colors.orange, bold = true },
  ["@string"] = { link = "String" },
  ["@number"] = { link = "Number" },
  ["@boolean"] = { link = "Boolean" },
  ["@type"] = { link = "Type" },
  ["@type.builtin"] = { fg = colors.cyan, bold = true },
}

function M.setup()
  -- Clear existing highlights
  vim.cmd("highlight clear")
  if vim.fn.exists("syntax_on") then
    vim.cmd("syntax reset")
  end
  
  -- Set colorscheme name
  vim.g.colors_name = "native-solarized-osaka"
  
  -- Set terminal colors
  if vim.fn.has("termguicolors") == 1 then
    vim.opt.termguicolors = true
  end
  
  -- Apply highlights
  for group, settings in pairs(highlights) do
    vim.api.nvim_set_hl(0, group, settings)
  end
  
  -- Set background
  vim.opt.background = "dark"
end

-- Export colors for use in statusline
M.colors = colors

return M