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
219
220
221
222
223
224
|
-- ░██████╗░██╗░░░██╗██╗██╗░░██╗░█████╗░████████╗██╗░█████╗░░░░░░░███╗░░██╗██╗░░░██╗██╗███╗░░░███╗
-- ██╔═══██╗██║░░░██║██║╚██╗██╔╝██╔══██╗╚══██╔══╝██║██╔══██╗░░░░░░████╗░██║██║░░░██║██║████╗░████║
-- ██║██╗██║██║░░░██║██║░╚███╔╝░██║░░██║░░░██║░░░██║██║░░╚═╝█████╗██╔██╗██║╚██╗░██╔╝██║██╔████╔██║
-- ╚██████╔╝██║░░░██║██║░██╔██╗░██║░░██║░░░██║░░░██║██║░░██╗╚════╝██║╚████║░╚████╔╝░██║██║╚██╔╝██║
-- ░╚═██╔═╝░╚██████╔╝██║██╔╝╚██╗╚█████╔╝░░░██║░░░██║╚█████╔╝░░░░░░██║░╚███║░░╚██╔╝░░██║██║░╚═╝░██║
-- ░░░╚═╝░░░░╚═════╝░╚═╝╚═╝░░╚═╝░╚════╝░░░░╚═╝░░░╚═╝░╚════╝░░░░░░░╚═╝░░╚══╝░░░╚═╝░░░╚═╝╚═╝░░░░░╚═╝
--
-- By QuixoticNapoleon
--------------------------------------------------------
-- 🪶 Plugins
--------------------------------------------------------
require("config.lazy")
require("scripts.sudo")
--------------------------------------------------------
-- 🪶 Theme
--------------------------------------------------------
local dark_teal = "#003636"
vim.cmd("colorscheme terafox")
--------------------------------------------------------
-- 🪶 Basic Settings
--------------------------------------------------------
-- List Chars
vim.o.list = true
vim.opt.listchars = {
tab = "»»",
-- tab = "│»",
space = "·",
trail = "·",
eol = "↲",
extends = "›",
precedes = "‹",
nbsp = "␣",
}
-- Enable wrapping
vim.opt.wrap = true
-- Break lines at word boundaries
vim.opt.linebreak = true
-- Prefix shown on wrapped lines
vim.opt.showbreak = "↳ "
-- Indent wrapped lines to match indentation
vim.opt.breakindent = true
-- (Optional) fine-tune breakindent behavior
-- vim.opt.breakindentopt = "shift:2"
-- Line Numbers
vim.wo.number = true
vim.wo.relativenumber = true
-- Change the color of the line numbers
vim.api.nvim_set_hl(0, 'LineNr', { fg = '#74c4c4', bg = 'NONE' })
vim.api.nvim_set_hl(0, 'CursorLineNr', { fg = '#74c4c4', bg = 'NONE' })
-- Tab Spaces
vim.cmd("set tabstop=4")
vim.cmd("set shiftwidth=4")
-- vim.cmd("set expandtab")
vim.cmd("set noexpandtab")
vim.cmd("set smarttab")
-- Indentation Options
vim.opt.indentkeys:remove(":")
vim.opt.smartindent = true
--------------------------------------------------------
-- 🪶 Basic Keybindings
--------------------------------------------------------
-- Leader Key
vim.g.mapleader = ' '
-- Tree
vim.api.nvim_set_keymap('n', '<leader>t', ':NvimTreeToggle<CR>', { noremap = true, silent = true })
-- ~/.config/nvim/lua/keymaps.lua
vim.keymap.set('n', '<Space>;', function()
local row, col = unpack(vim.api.nvim_win_get_cursor(0)) -- save cursor
local line = vim.api.nvim_get_current_line()
-- Only add semicolon if it doesn't exist
if not line:match(";$") then
vim.api.nvim_set_current_line(line .. ";")
end
-- Restore cursor
vim.api.nvim_win_set_cursor(0, {row, col})
end, { noremap = true, silent = true })
-- Telescope
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
-- UndoTree
vim.cmd.packadd("nvim.undotree")
vim.keymap.set("n", "<leader>u", function()
require("undotree").open()
end, { desc = "Open undotree" })
-- 'a' on empty line: enter insert mode with correct indentation
vim.keymap.set('n', 'a', function()
local line = vim.api.nvim_get_current_line()
if line:match("^%s*$") then
return '"_cc'
end
return 'a'
end, { noremap = true, expr = true })
-- Clipboard
vim.opt.clipboard = "unnamedplus"
--------------------------------------------------------
-- 🪶 GUI and Colour Configuration
--------------------------------------------------------
-- Colors
vim.opt.termguicolors = true
vim.opt.background = "dark" -- or "light" depending on theme
-- Remove Vim Background
vim.api.nvim_set_hl(0, "Normal", { ctermbg = "none", bg = "none" })
-- Colors (Foreground and Background)
-- Neovide uses Neovim's colorscheme, so we’ll override via highlight groups
-- vim.api.nvim_set_hl(0, "Normal", { fg = "#8affff", bg = "#003636" })
vim.api.nvim_set_hl(0, "Normal", { fg = "#8affff", bg = "none", ctermbg = "none" })
vim.api.nvim_set_hl(0, "NormalFloat", { fg = "#8affff", bg = "#003636" })
-- Set font and size
-- vim.o.guifont = "JetBrainsMono Nerd Font:h14"
-- vim.o.guifont = "Source Code Pro:h10.5"
vim.o.guifont = "JetBrainsMono Nerd Font:h10.5"
-- General Neovim GUI
vim.cmd([[
highlight Normal guibg=NONE ctermbg=NONE
highlight NormalNC guibg=NONE ctermbg=NONE
highlight LineNr guibg=NONE
highlight SignColumn guibg=NONE
highlight WinSeparator guifg=#74c4c4 guibg=NONE
highlight Pmenu guibg=NONE
highlight PmenuSel guifg=#FFFFFF guibg=#008282
highlight Substitute guifg=#FFFFFF guibg=#008282
highlight FloatBorder guifg=#74c4c4
highlight StatusLine guibg=#004344
highlight NvimTreeNormal guibg=NONE
highlight NvimTreeNormalFloat guibg=NONE
highlight NvimTreeCursorLine guibg=#395e5e
highlight Visual guibg=#395e5e
highlight EndOfBuffer guifg=#016868
highlight SpecialKey guifg=#016868
highlight Trailing guifg=#016868
highlight Whitespace guifg=#016868
highlight NonText guifg=#016868
highlight TelescopeBorder guifg=#74c4c4 guibg=NONE
]])
-- For Tabs and Folds
vim.cmd [[
highlight BufferCurrent guifg=#FFFFFF guibg=#003636
highlight BufferVisible guifg=#CCCCCC guibg=#003636
highlight BufferInactive guifg=#888888 guibg=#003636
highlight BufferCurrentMod guifg=#fce094 guibg=#003636
highlight BufferVisibleMod guibg=#003636
highlight BufferInactiveMod guibg=#003636
highlight BufferDefaultCurrent guifg=#FFFFFF guibg=#003636
highlight BufferDefaultVisible guifg=#CCCCCC guibg=#003636
highlight BufferDefaultInactive guifg=#888888 guibg=#003636
highlight BufferInactiveSign guifg=#8affff guibg=#003636
highlight BufferVisibleSign guifg=#8affff guibg=#003636
highlight BufferCurrentSign guifg=#8affff guibg=#003636
highlight BufferDefaultInactiveSign guifg=#8affff guibg=#003636
highlight BufferDefaultVisibleSign guifg=#8affff guibg=#003636
highlight BufferDefaultCurrentSign guifg=#8affff guibg=#003636
highlight BufferDefaultInactiveIcon guifg=#8affff guibg=#003636
highlight BufferDefaultVisibleIcon guifg=#8affff guibg=#003636
highlight BufferDefaultCurrentIcon guifg=#8affff guibg=#003636
highlight BufferInactiveIcon guifg=#8affff guibg=#003636
highlight BufferVisibleIcon guifg=#8affff guibg=#003636
highlight BufferCurrentIcon guifg=#8affff guibg=#003636
highlight BufferTabpageFill guibg=#003636
highlight Folded guifg=#74c4c4 guibg=#003636
highlight FoldColumn guifg=#74c4c4 guibg=#003636
]]
-- Syntax Highlighting
vim.cmd([[
highlight Comment guifg=#00B4B4
highlight Operator guifg=#5cb5b5
]])
vim.api.nvim_set_hl(0, "@variable", { fg = "#5cb5b5" })
|