summaryrefslogtreecommitdiffstats
path: root/lua/core/opts.lua
blob: 75e8c38cf20bd777de33b74c27156d811cbfad81 (plain) (blame)
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
212
213
214
215
216
217
218
---------------
-- better ui --
---------------
o.number = true
o.relativenumber = true
o.numberwidth = 2 -- width o numberline
o.signcolumn = 'yes:1' -- show gutter
o.cursorline = true -- highlights the current line
o.scrolloff = 5 -- # lines below/above cursor
o.showmode = false -- stop vim from showing mode
o.cmdheight = 2 -- vim command height
o.mouse = "" -- no mouse
o.laststatus = 3 -- global statusline

o.wrap = true -- wrap lines
o.linebreak = true -- fix where line is wraped
o.emoji = false -- something to do with the spacing of emojis
o.clipboard = 'unnamedplus' -- use system clipboard

-- intenting & tabing
o.expandtab = true
o.smarttab = true
o.cindent = true
o.autoindent = true
o.tabstop = 2
o.shiftwidth = 2
o.softtabstop = -1 -- If negative, shiftwidth value is used

-- spelling
o.spelllang = { 'en_us' }

-- colors
o.termguicolors = true
cmd('colorscheme jellybeans-nvim')

-- diagnostics w/o virtual text
vim.diagnostic.config({
  underline = true,
  virtual_text = false
})

colors = {
  black  = '#000000',
  black2 = '#161616',
  black3 = '#0E0E0E',
  black4 = '#101010',
  grey   = '#1E1E1E',
  grey2  = '#404040',
  white  = '#ffffff',
  red    = '#E06C75',
  orange = '#EA936C',
  yellow = '#E5C07B',
  green  = '#98C379',
  blue   = '#61AFEF',
  purple = '#C678DD',
  pink   = '#704A5A',
}

lspicons = {
  Text = 'Tx',
  Snippet = '<>',
  Method = '  ',
  Function = '{}',
  Constructor = '  ',
  Field = '""',
  Variable = 'x=',
  Class = '~{',
  Interface = '.h',
  Module = '  ',
  Property = '@p',
  Unit = '  ',
  Value = '  ',
  Enum = 'E#',
  Keyword = '$1',
  Color = '  ',
  File = '#`',
  Reference = '  ',
  Folder = '[/',
  EnumMember = '  ',
  Constant = '  ',
  Struct = '  ',
  Event = '  ',
  Operator = '%*',
  TypeParameter = '  ',
}

-- width line
o.colorcolumn = { 80 }

-- custom opts
copts = {
  tablines = 'colored', -- false, 'colored', and 'wrap'
  minimapcolor = colors.grey2,
}

------------
-- saving --
------------
o.swapfile = false
o.undofile = true
o.confirm = true

------------
-- search --
------------
o.ignorecase = true
o.smartcase = true
o.wrapscan = true
o.showmatch = true

----------------
-- wild menus --
----------------
o.wildoptions = 'pum'
o.pumblend = 3
o.pumheight = 20

o.wildignorecase = true
o.wildignore = '*.o'

-----------
-- netrw --
-----------
g.netrw_banner = 0
g.netrw_localcopydircmd = 'cp -r'
g.netrw_winsize = 30
g.netrw_liststyle = 1

-----------------------
-- language settings --
-----------------------
g.c_syntax_for_h = true -- treat c header files as c files instead of c++ files

----------------
-- highlights --
----------------
-- transparent background
-- a.nvim_set_hl(0, "Normal", { bg = "" })

--
a.nvim_set_hl(0, "ColorColumn", { bg = colors.grey }) -- color column
a.nvim_set_hl(0, "Pmenu", { bg = colors.black2 })
a.nvim_set_hl(0, "PmenuSel", { bg = colors.grey2 })
a.nvim_set_hl(0, "CursorLineNr", { fg = colors.white, bold = true })

-- indent line colors 
a.nvim_set_hl(0, "IndentBlanklineIndent1", { fg = colors.red } )
a.nvim_set_hl(0, "IndentBlanklineIndent2", { fg = colors.orange } )
a.nvim_set_hl(0, "IndentBlanklineIndent3", { fg = colors.yellow } )
a.nvim_set_hl(0, "IndentBlanklineIndent4", { fg = colors.green } )
a.nvim_set_hl(0, "IndentBlanklineIndent5", { fg = colors.blue } )
a.nvim_set_hl(0, "IndentBlanklineIndent6", { fg = colors.purple } )

-- code window
a.nvim_set_hl(0, 'CodewindowBorder', {fg = copts.minimapcolor})

-- diagnostics
a.nvim_set_hl(0, "DiagnosticVirtualTextHint", { fg = "#ffffff", bg = "#1E1E1E" })
a.nvim_set_hl(0, "DiagnosticVirtualTextInfo", { fg = "#006fd8", bg = "#152f47" })
a.nvim_set_hl(0, "DiagnosticVirtualTextWarn", { fg = "#E9AD5A", bg = "#533221" })
a.nvim_set_hl(0, "DiagnosticVirtualTextError",
  { fg = "#ED3B44", bg = "#4b1313" })

-- alpha start page 4chan edition
a.nvim_set_hl(0, "AlphaHeader", {fg = "#789922" })
a.nvim_set_hl(0, "AlphaEmphasis", {fg = "#DD0000" })

-- murmur (word highlights)
a.nvim_set_hl(0, "murmur_cursor_rgb", { bg = colors.grey2 })

-- cmp/treesitter stuff
a.nvim_set_hl(0, "CmpItemMenu", { fg = colors.purple, italic = true })

a.nvim_set_hl(0, "CmpItemKindSnippet", { bg = "#A377BF", bold = true })
a.nvim_set_hl(0, "CmpItemKindText", { bg = "#63bc47", bold = true })
a.nvim_set_hl(0, "CmpItemKindField", { bg = "#db7093", bold = true })
a.nvim_set_hl(0, "CmpItemKindVariable", { bg = "#ff8c00", bold = true })
a.nvim_set_hl(0, "CmpItemKindEnum", { bg = "#FF5733", bold = true })
a.nvim_set_hl(0, "CmpItemKindFunction", { bg = "#483d8b", bold = true })
a.nvim_set_hl(0, "CmpItemKindKeyword", { bg = "#FF339C", bold = true })
a.nvim_set_hl(0, "CmpItemKindProperty", { bg = "#4FBF63", bold = true })
a.nvim_set_hl(0, "CmpItemKindInterface", { bg = "#1e90ff", bold = true })
a.nvim_set_hl(0, "CmpItemKindClass", { bg = "#4D4C5C", bold = true })
a.nvim_set_hl(0, "CmpItemKindFile", { bg = "#E8D01C", bold = true })
a.nvim_set_hl(0, "CmpItemKindFolder", { bg = "#E8D01C", bold = true })
a.nvim_set_hl(0, "CmpItemKindOperator", { bg = "#E06C75", bold = true })

-- telescope
a.nvim_set_hl(0, "TelescopeMatching", { bg = colors.black3 })
a.nvim_set_hl(0, "TelescopeNormal", { bg = colors.black3 })

a.nvim_set_hl(0, "TelescopePreviewBorder", { bg = colors.black3 })
a.nvim_set_hl(0, "TelescopePreviewNormal", { bg = colors.black3 })
a.nvim_set_hl(0, "TelescopePreviewTitle", { bg = colors.black3,
  fg = colors.black3 })

a.nvim_set_hl(0, "TelescopePromptBorder", { bg = colors.black2 })
a.nvim_set_hl(0, "TelescopePromptNormal", { bg = colors.black2 })
a.nvim_set_hl(0, "TelescopePromptPrefix", { bg = colors.black2 })
a.nvim_set_hl(0, "TelescopePromptTitle", { bg = colors.black2,
  fg = colors.black2 })

a.nvim_set_hl(0, "TelescopeResultsBorder", { bg = colors.black4 })
a.nvim_set_hl(0, "TelescopeResultsNormal", { bg = colors.black4 })
a.nvim_set_hl(0, "TelescopeResultsTitle", { bg = colors.black4,
  fg = colors.black4 })

a.nvim_set_hl(0, "TelescopeSelection", { bg = colors.black2 })
a.nvim_set_hl(0, "TelescopeSelectionCaret", { bg = colors.black2,
  fg = colors.orange, bold = true })

-- sfm (tree view stuff)
a.nvim_set_hl(0, "SFMGitStaged", { fg = colors.green })
a.nvim_set_hl(0, "SFMGitUnstaged", { fg = colors.green })
a.nvim_set_hl(0, "SFMGitRenamed", { fg = colors.purple })
a.nvim_set_hl(0, "SFMGitNew", { fg = colors.orange })
a.nvim_set_hl(0, "SFMGitDeleted", { fg = colors.red })
a.nvim_set_hl(0, "SFMGitIgnored", { fg = colors.grey })