-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpustota.lua
142 lines (112 loc) · 4 KB
/
pustota.lua
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
local hl = vim.api.nvim_set_hl
local colors = {
constant = "#E6B450",
function_definitions = "#FFB454",
keywords_and_operators = "#FF8F40",
type_definitions = "#59C2FF",
comment = "#626A73",
string = "#C2D94C",
black = "#0A0E14",
gray = "#B3B1AD",
lgray = "#B9B9B9",
indent = "#181A1D",
visual = "#1C2631",
}
local M = {}
M.hl_base = function()
-- Common
hl(0, "Normal", { fg = colors.gray, bg = colors.black })
hl(0, "Comment", { fg = colors.comment, italic = true })
hl(0, "String", { fg = colors.string })
hl(0, "Character", { fg = colors.string })
hl(0, "Constant", { fg = colors.constant })
hl(0, "Special", { fg = colors.gray })
hl(0, "Function", { fg = colors.function_definitions })
hl(0, "Operator", { fg = colors.keywords_and_operators })
hl(0, "Keyword", { fg = colors.keywords_and_operators })
hl(0, "Exception", { fg = colors.keywords_and_operators })
hl(0, "Conditional", { fg = colors.keywords_and_operators })
hl(0, "Label", { fg = colors.keywords_and_operators })
hl(0, "Repeat", { fg = colors.keywords_and_operators })
hl(0, "Statement", { fg = colors.keywords_and_operators })
hl(0, "Bracket", { fg = colors.gray })
hl(0, "Type", { fg = colors.type_definitions })
hl(0, "Visual", { bg = colors.visual })
hl(0, "Indent", { fg = colors.indent })
end
M.hl_langs = function()
-- Custom
hl(0, "@interpolation", { fg = colors.gray })
-- Treesitter Functions
hl(0, "@function.call", { fg = colors.gray })
hl(0, "@function.method.call", { fg = colors.gray })
hl(0, "@function.macro", { fg = colors.gray })
hl(0, "@constructor", { fg = colors.gray })
-- Treesitter brackets
hl(0, "@punctuation.bracket", { link = "Bracket" })
hl(0, "@punctuation.delimiter", { link = "Bracket" })
hl(0, "@punctuation.special", { link = "Bracket" })
-- Treesitter variables
hl(0, "@variable", { fg = colors.gray })
hl(0, "@variable.parameter", { fg = colors.gray })
hl(0, "@variable.builtin", { fg = colors.gray })
hl(0, "@variable.member", { fg = colors.gray })
-- Treesitter modules
hl(0, "@module", { fg = colors.gray })
hl(0, "@module.builtin", { fg = colors.gray })
-- Treesitter const
hl(0, "@constant", { fg = colors.gray })
hl(0, "@constant.builtin", { fg = colors.gray })
-- Treesitter class
hl(0, "@type", { fg = colors.gray })
hl(0, "@type.definition", { fg = colors.gray })
-- Treesitter string
hl(0, "@string.escape", { link = "String" })
-- Lua specific
hl(0, "@variable.lua", { fg = colors.gray })
hl(0, "@property.lua", { fg = colors.gray })
hl(0, "@constructor.lua", { link = "Bracket" })
hl(0, "luaTable", { link = "Bracket" })
hl(0, "luaParen", { link = "Bracket" })
hl(0, "luaFunc", { link = "Function" })
-- Python specific
hl(0, "@attribute.python", {})
hl(0, "@type.definition.python", { link = "Type" })
hl(0, "@NonePy.python", { link = "Constant" })
-- Rust specific
hl(0, "@keyword.modifier.rust", { fg = colors.gray })
hl(0, "@attribute.rust", { fg = colors.gray })
hl(0, "@punctuation.special.rust", { link = "Operator" })
hl(0, "@type.definition.rust", { link = "Type" })
-- Bash specific
hl(0, "@variable.parameter.bash", { link = "String" })
-- Dockerfile specific
hl(0, "@property.dockerfile", {})
-- Yaml specific
hl(0, "@property.yaml", { link = "Keyword" })
hl(0, "@property.dockerfile", {})
-- Elixir specific
hl(0, "@module.definition.elixir", { link = "Type" })
hl(0, "@impl.keyword.elixir", { link = "Operator" })
hl(0, "@keyword.do.elixir", { link = "Operator" })
hl(0, "@dot.elixir", { fg = colors.gray })
hl(0, "@constant.builtin.elixir", { link = "Constant" })
hl(0, "@string.special.elixir", { fg = colors.gray })
-- JSON specific
hl(0, "@property.json", { fg = colors.gray })
end
local highlight = function()
for _, v in pairs(M) do
v()
end
end
local colorscheme = function()
vim.api.nvim_command("hi clear")
vim.o.termguicolors = true
vim.g.colors_name = "pustota"
highlight()
end
local ibl_setup = function()
vim.api.nvim_set_hl(0, "Indent", { fg = "#000000" })
end
return { colorscheme = colorscheme, ibl_setup = ibl_setup }