FIxing all of my problems with the simplest native fix possible

This commit is contained in:
DarthMooMancer committed 2026-11-06 11:06:10 -05:00
1 parent e80f5c03da
commit 707fa47d9d
13 files changed
+546 -565

No files matched your search

+4
View File
@@ -0,0 +1,4 @@
vim.opt_local.tabstop = 8
vim.opt_local.shiftwidth = 8
vim.opt_local.softtabstop = 0
vim.opt_local.expandtab = false
+4
View File
@@ -0,0 +1,4 @@
vim.opt_local.tabstop = 8
vim.opt_local.shiftwidth = 8
vim.opt_local.softtabstop = 0
vim.opt_local.expandtab = false
+4
View File
@@ -0,0 +1,4 @@
vim.opt_local.expandtab = false
vim.opt_local.tabstop = 4
vim.opt_local.shiftwidth = 0 -- fall back to tabstop
vim.opt_local.softtabstop = 0
+311 -311
View File
@@ -1,341 +1,341 @@
vim.cmd('highlight clear')
if vim.fn.exists('syntax_on') then
vim.cmd.syntax('reset')
vim.cmd.syntax('reset')
end
vim.o.background = 'dark'
vim.g.colors_name = 'min-kanso'
---@class PaletteColors
local palette = {
zenBg0 = '#090E13',
zenBg1 = '#1C1E25',
zenBg2 = '#22262D',
inkBg2 = '#22262D',
inkBg3 = '#393B44',
altBlue1 = '#223249',
altBlue2 = '#2D4F67',
diffGreen = '#2B3328',
diffYellow = '#49443C',
diffRed = '#43242B',
diffBlue = '#252535',
gitGreen = '#76946A',
gitRed = '#C34043',
gitYellow = '#DCA561',
red = '#C34043',
red2 = '#E46876',
red3 = '#c4746e',
yellow = '#DCA561',
yellow2 = '#E6C384',
yellow3 = '#c4b28a',
green = '#98BB6C',
green2 = '#87a987',
green3 = '#8a9a7b',
green4 = '#6A9589',
green5 = '#7AA89F',
blue = '#7FB4CA',
blue2 = '#658594',
blue3 = '#8ba4b0',
violet = '#938AA9',
violet2 = '#8992a7',
pink = '#a292a3',
orange = '#b6927b',
orange2 = '#b98d7b',
aqua = '#8ea4a2',
fg = '#C5C9C7',
fg2 = '#f2f1ef',
gray = '#717C7C',
gray2 = '#A4A7A4',
gray3 = '#909398',
gray4 = '#75797f',
gray5 = '#5C6066',
zenBg0 = '#090E13',
zenBg1 = '#1C1E25',
zenBg2 = '#22262D',
inkBg2 = '#22262D',
inkBg3 = '#393B44',
altBlue1 = '#223249',
altBlue2 = '#2D4F67',
diffGreen = '#2B3328',
diffYellow = '#49443C',
diffRed = '#43242B',
diffBlue = '#252535',
gitGreen = '#76946A',
gitRed = '#C34043',
gitYellow = '#DCA561',
red = '#C34043',
red2 = '#E46876',
red3 = '#c4746e',
yellow = '#DCA561',
yellow2 = '#E6C384',
yellow3 = '#c4b28a',
green = '#98BB6C',
green2 = '#87a987',
green3 = '#8a9a7b',
green4 = '#6A9589',
green5 = '#7AA89F',
blue = '#7FB4CA',
blue2 = '#658594',
blue3 = '#8ba4b0',
violet = '#938AA9',
violet2 = '#8992a7',
pink = '#a292a3',
orange = '#b6927b',
orange2 = '#b98d7b',
aqua = '#8ea4a2',
fg = '#C5C9C7',
fg2 = '#f2f1ef',
gray = '#717C7C',
gray2 = '#A4A7A4',
gray3 = '#909398',
gray4 = '#75797f',
gray5 = '#5C6066',
}
local theme = {
ui = {
none = 'NONE',
fg = palette.fg,
fg_dim = palette.gray2,
fg_reverse = palette.altBlue1,
bg_dim = palette.zenBg1,
bg_m3 = palette.zenBg0,
bg_m2 = palette.zenBg0,
bg_m1 = palette.zenBg0,
bg = palette.zenBg0,
bg_p1 = palette.zenBg1,
bg_p2 = palette.zenBg2,
special = palette.gray5,
indent_line = palette.inkBg2,
active_indent_line = palette.inkBg3,
whitespace = palette.inkBg3,
nontext = palette.gray5,
bg_visual = palette.inkBg3,
bg_search = palette.altBlue2,
cursor_line_nr_foreground = palette.gray5,
cursor_line_nr_active_foreground = palette.fg2,
cursor_bg = palette.fg2,
cursor_fg = palette.zenBg0,
pmenu = {
fg = palette.fg2,
fg_sel = 'NONE',
bg = palette.zenBg0,
bg_sel = palette.inkBg3,
bg_thumb = palette.inkBg3,
bg_sbar = palette.zenBg0,
},
float = {
fg = palette.gray2,
bg = palette.zenBg0,
fg_border = palette.zenBg2,
bg_border = palette.zenBg0,
},
},
syn = {
string = palette.green3,
variable = 'NONE',
number = palette.pink,
constant = palette.orange,
identifier = palette.violet2,
parameter = palette.gray3,
fun = palette.blue3,
statement = palette.violet2,
keyword = palette.violet2,
operator = palette.gray3,
preproc = palette.gray3,
type = palette.aqua,
regex = palette.red3,
deprecated = palette.gray,
punct = palette.gray3,
comment = palette.gray4,
special1 = palette.yellow3,
special2 = palette.violet2,
special3 = palette.violet2,
},
diag = {
error = palette.red,
ok = palette.green,
warning = palette.yellow,
info = palette.blue2,
hint = palette.green4,
},
diff = {
add = palette.diffGreen,
delete = palette.diffRed,
change = palette.diffBlue,
text = palette.diffYellow,
},
vcs = {
added = palette.gitGreen,
removed = palette.gitRed,
changed = palette.gitYellow,
untracked = palette.gray4,
},
ui = {
none = 'NONE',
fg = palette.fg,
fg_dim = palette.gray2,
fg_reverse = palette.altBlue1,
bg_dim = palette.zenBg1,
bg_m3 = palette.zenBg0,
bg_m2 = palette.zenBg0,
bg_m1 = palette.zenBg0,
bg = palette.zenBg0,
bg_p1 = palette.zenBg1,
bg_p2 = palette.zenBg2,
special = palette.gray5,
indent_line = palette.inkBg2,
active_indent_line = palette.inkBg3,
whitespace = palette.inkBg3,
nontext = palette.gray5,
bg_visual = palette.inkBg3,
bg_search = palette.altBlue2,
cursor_line_nr_foreground = palette.gray5,
cursor_line_nr_active_foreground = palette.fg2,
cursor_bg = palette.fg2,
cursor_fg = palette.zenBg0,
pmenu = {
fg = palette.fg2,
fg_sel = 'NONE',
bg = palette.zenBg0,
bg_sel = palette.inkBg3,
bg_thumb = palette.inkBg3,
bg_sbar = palette.zenBg0,
},
float = {
fg = palette.gray2,
bg = palette.zenBg0,
fg_border = palette.zenBg2,
bg_border = palette.zenBg0,
},
},
syn = {
string = palette.green3,
variable = 'NONE',
number = palette.pink,
constant = palette.orange,
identifier = palette.violet2,
parameter = palette.gray3,
fun = palette.blue3,
statement = palette.violet2,
keyword = palette.violet2,
operator = palette.gray3,
preproc = palette.gray3,
type = palette.aqua,
regex = palette.red3,
deprecated = palette.gray,
punct = palette.gray3,
comment = palette.gray4,
special1 = palette.yellow3,
special2 = palette.violet2,
special3 = palette.violet2,
},
diag = {
error = palette.red,
ok = palette.green,
warning = palette.yellow,
info = palette.blue2,
hint = palette.green4,
},
diff = {
add = palette.diffGreen,
delete = palette.diffRed,
change = palette.diffBlue,
text = palette.diffYellow,
},
vcs = {
added = palette.gitGreen,
removed = palette.gitRed,
changed = palette.gitYellow,
untracked = palette.gray4,
},
}
-- Helper function to batch-apply highlights
local function set_highlights(highlights)
for group, opts in pairs(highlights) do
vim.api.nvim_set_hl(0, group, opts)
end
for group, opts in pairs(highlights) do
vim.api.nvim_set_hl(0, group, opts)
end
end
-- =========================================================================
-- Highlights Map
-- =========================================================================
set_highlights({
-- Editor Highlights
ColorColumn = { bg = theme.ui.bg_p1 },
Conceal = { fg = theme.ui.special, bold = true },
CurSearch = { fg = theme.ui.fg, bg = theme.ui.bg_search, bold = true },
Cursor = { fg = theme.ui.cursor_fg, bg = theme.ui.cursor_bg },
lCursor = { link = 'Cursor' },
CursorIM = { link = 'Cursor' },
CursorColumn = { link = 'CursorLine' },
CursorLine = { bg = theme.ui.bg_p2 },
Directory = { fg = theme.syn.fun },
DiffAdd = { bg = theme.diff.add },
DiffChange = { bg = theme.diff.change },
DiffDelete = { fg = theme.vcs.removed, bg = theme.diff.delete },
DiffText = { bg = theme.diff.text },
EndOfBuffer = { fg = theme.ui.bg },
ErrorMsg = { fg = theme.diag.error },
WinSeparator = { fg = theme.ui.bg_m3, bg = theme.ui.none },
VertSplit = { link = 'WinSeparator' },
Folded = { fg = theme.ui.special, bg = theme.ui.bg_p1 },
FoldColumn = { fg = theme.ui.nontext, bg = theme.ui.none },
SignColumn = { fg = theme.ui.special, bg = theme.ui.none },
IncSearch = { fg = theme.ui.fg_reverse, bg = theme.diag.warning },
Substitute = { fg = theme.ui.fg, bg = theme.vcs.removed },
LineNr = { fg = theme.ui.cursor_line_nr_foreground, bg = theme.ui.none },
CursorLineNr = { fg = theme.ui.cursor_line_nr_active_foreground, bg = theme.ui.none },
MatchParen = { fg = theme.diag.warning, bold = true },
ModeMsg = { fg = theme.diag.warning, bold = true },
MsgArea = vim.o.cmdheight == 0 and { link = 'StatusLine' } or { fg = theme.ui.fg_dim },
MsgSeparator = { bg = vim.o.cmdheight == 0 and theme.ui.bg or theme.ui.bg_m3 },
MoreMsg = { fg = theme.diag.info },
NonText = { fg = theme.ui.nontext },
Normal = { fg = theme.ui.fg, bg = theme.ui.bg },
NormalFloat = { fg = theme.ui.float.fg, bg = theme.ui.float.bg },
FloatBorder = { fg = theme.ui.float.fg_border, bg = theme.ui.float.bg_border },
FloatTitle = { fg = theme.ui.special, bg = theme.ui.float.bg_border, bold = true },
FloatFooter = { fg = theme.ui.nontext, bg = theme.ui.float.bg_border },
NormalNC = { link = 'Normal' },
Pmenu = { fg = theme.ui.pmenu.fg, bg = theme.ui.pmenu.bg },
PmenuSel = { fg = theme.ui.pmenu.fg_sel, bg = theme.ui.pmenu.bg_sel },
PmenuKind = { fg = theme.ui.fg_dim, bg = theme.ui.pmenu.bg },
PmenuKindSel = { fg = theme.ui.fg_dim, bg = theme.ui.pmenu.bg_sel },
PmenuExtra = { fg = theme.ui.special, bg = theme.ui.pmenu.bg },
PmenuExtraSel = { fg = theme.ui.special, bg = theme.ui.pmenu.bg_sel },
PmenuSbar = { bg = theme.ui.pmenu.bg_sbar },
PmenuThumb = { bg = theme.ui.pmenu.bg_thumb },
Question = { link = 'MoreMsg' },
QuickFixLine = { bg = theme.ui.bg_p1 },
Search = { fg = theme.ui.fg, bg = theme.ui.bg_search },
SpecialKey = { fg = theme.ui.special },
SpellBad = { undercurl = true, sp = theme.diag.error },
SpellCap = { undercurl = true, sp = theme.diag.warning },
SpellLocal = { undercurl = true, sp = theme.diag.warning },
SpellRare = { undercurl = true, sp = theme.diag.warning },
StatusLine = { fg = theme.ui.fg_dim, bg = theme.ui.none },
StatusLineNC = { fg = theme.ui.nontext, bg = theme.ui.none },
TabLine = { bg = theme.ui.none, fg = theme.ui.special },
TabLineFill = { bg = theme.ui.none },
TabLineSel = { fg = theme.ui.fg_dim, bg = theme.ui.bg_p1, bold = true },
Title = { fg = theme.syn.fun, bold = true },
Visual = { bg = theme.ui.bg_visual },
VisualNOS = { link = 'Visual' },
WarningMsg = { fg = theme.diag.warning },
Whitespace = { fg = theme.ui.whitespace },
WildMenu = { link = 'Pmenu' },
WinBar = { fg = theme.ui.fg_dim, bg = theme.ui.none },
WinBarNC = { fg = theme.ui.fg_dim, bg = theme.ui.none },
-- Editor Highlights
ColorColumn = { bg = theme.ui.bg_p1 },
Conceal = { fg = theme.ui.special, bold = true },
CurSearch = { fg = theme.ui.fg, bg = theme.ui.bg_search, bold = true },
Cursor = { fg = theme.ui.cursor_fg, bg = theme.ui.cursor_bg },
lCursor = { link = 'Cursor' },
CursorIM = { link = 'Cursor' },
CursorColumn = { link = 'CursorLine' },
CursorLine = { bg = theme.ui.bg_p2 },
Directory = { fg = theme.syn.fun },
DiffAdd = { bg = theme.diff.add },
DiffChange = { bg = theme.diff.change },
DiffDelete = { fg = theme.vcs.removed, bg = theme.diff.delete },
DiffText = { bg = theme.diff.text },
EndOfBuffer = { fg = theme.ui.bg },
ErrorMsg = { fg = theme.diag.error },
WinSeparator = { fg = theme.ui.bg_m3, bg = theme.ui.none },
VertSplit = { link = 'WinSeparator' },
Folded = { fg = theme.ui.special, bg = theme.ui.bg_p1 },
FoldColumn = { fg = theme.ui.nontext, bg = theme.ui.none },
SignColumn = { fg = theme.ui.special, bg = theme.ui.none },
IncSearch = { fg = theme.ui.fg_reverse, bg = theme.diag.warning },
Substitute = { fg = theme.ui.fg, bg = theme.vcs.removed },
LineNr = { fg = theme.ui.cursor_line_nr_foreground, bg = theme.ui.none },
CursorLineNr = { fg = theme.ui.cursor_line_nr_active_foreground, bg = theme.ui.none },
MatchParen = { fg = theme.diag.warning, bold = true },
ModeMsg = { fg = theme.diag.warning, bold = true },
MsgArea = vim.o.cmdheight == 0 and { link = 'StatusLine' } or { fg = theme.ui.fg_dim },
MsgSeparator = { bg = vim.o.cmdheight == 0 and theme.ui.bg or theme.ui.bg_m3 },
MoreMsg = { fg = theme.diag.info },
NonText = { fg = theme.ui.nontext },
Normal = { fg = theme.ui.fg, bg = theme.ui.bg },
NormalFloat = { fg = theme.ui.float.fg, bg = theme.ui.float.bg },
FloatBorder = { fg = theme.ui.float.fg_border, bg = theme.ui.float.bg_border },
FloatTitle = { fg = theme.ui.special, bg = theme.ui.float.bg_border, bold = true },
FloatFooter = { fg = theme.ui.nontext, bg = theme.ui.float.bg_border },
NormalNC = { link = 'Normal' },
Pmenu = { fg = theme.ui.pmenu.fg, bg = theme.ui.pmenu.bg },
PmenuSel = { fg = theme.ui.pmenu.fg_sel, bg = theme.ui.pmenu.bg_sel },
PmenuKind = { fg = theme.ui.fg_dim, bg = theme.ui.pmenu.bg },
PmenuKindSel = { fg = theme.ui.fg_dim, bg = theme.ui.pmenu.bg_sel },
PmenuExtra = { fg = theme.ui.special, bg = theme.ui.pmenu.bg },
PmenuExtraSel = { fg = theme.ui.special, bg = theme.ui.pmenu.bg_sel },
PmenuSbar = { bg = theme.ui.pmenu.bg_sbar },
PmenuThumb = { bg = theme.ui.pmenu.bg_thumb },
Question = { link = 'MoreMsg' },
QuickFixLine = { bg = theme.ui.bg_p1 },
Search = { fg = theme.ui.fg, bg = theme.ui.bg_search },
SpecialKey = { fg = theme.ui.special },
SpellBad = { undercurl = true, sp = theme.diag.error },
SpellCap = { undercurl = true, sp = theme.diag.warning },
SpellLocal = { undercurl = true, sp = theme.diag.warning },
SpellRare = { undercurl = true, sp = theme.diag.warning },
StatusLine = { fg = theme.ui.fg_dim, bg = theme.ui.none },
StatusLineNC = { fg = theme.ui.nontext, bg = theme.ui.none },
TabLine = { bg = theme.ui.none, fg = theme.ui.special },
TabLineFill = { bg = theme.ui.none },
TabLineSel = { fg = theme.ui.fg_dim, bg = theme.ui.bg_p1, bold = true },
Title = { fg = theme.syn.fun, bold = true },
Visual = { bg = theme.ui.bg_visual },
VisualNOS = { link = 'Visual' },
WarningMsg = { fg = theme.diag.warning },
Whitespace = { fg = theme.ui.whitespace },
WildMenu = { link = 'Pmenu' },
WinBar = { fg = theme.ui.fg_dim, bg = theme.ui.none },
WinBarNC = { fg = theme.ui.fg_dim, bg = theme.ui.none },
debugPC = { bg = theme.diff.delete },
debugBreakpoint = { fg = theme.syn.special1, bg = theme.ui.none },
debugPC = { bg = theme.diff.delete },
debugBreakpoint = { fg = theme.syn.special1, bg = theme.ui.none },
LspReferenceText = { bg = theme.ui.bg_p2 },
LspReferenceRead = { link = 'LspReferenceText' },
LspReferenceWrite = { bg = theme.ui.bg_p2, underline = true },
LspReferenceText = { bg = theme.ui.bg_p2 },
LspReferenceRead = { link = 'LspReferenceText' },
LspReferenceWrite = { bg = theme.ui.bg_p2, underline = true },
-- Diagnostics
DiagnosticError = { fg = theme.diag.error },
DiagnosticWarn = { fg = theme.diag.warning },
DiagnosticInfo = { fg = theme.diag.info },
DiagnosticHint = { fg = theme.diag.hint },
DiagnosticOk = { fg = theme.diag.ok },
DiagnosticFloatingError = { fg = theme.diag.error },
DiagnosticFloatingWarn = { fg = theme.diag.warning },
DiagnosticFloatingInfo = { fg = theme.diag.info },
DiagnosticFloatingHint = { fg = theme.diag.hint },
DiagnosticFloatingOk = { fg = theme.diag.ok },
DiagnosticSignError = { fg = theme.diag.error, bg = theme.ui.none },
DiagnosticSignWarn = { fg = theme.diag.warning, bg = theme.ui.none },
DiagnosticSignInfo = { fg = theme.diag.info, bg = theme.ui.none },
DiagnosticSignHint = { fg = theme.diag.hint, bg = theme.ui.none },
DiagnosticVirtualTextError = { link = 'DiagnosticError' },
DiagnosticVirtualTextWarn = { link = 'DiagnosticWarn' },
DiagnosticVirtualTextInfo = { link = 'DiagnosticInfo' },
DiagnosticVirtualTextHint = { link = 'DiagnosticHint' },
DiagnosticUnderlineError = { undercurl = true, sp = theme.diag.error },
DiagnosticUnderlineWarn = { undercurl = true, sp = theme.diag.warning },
DiagnosticUnderlineInfo = { undercurl = true, sp = theme.diag.info },
DiagnosticUnderlineHint = { undercurl = true, sp = theme.diag.hint },
-- Diagnostics
DiagnosticError = { fg = theme.diag.error },
DiagnosticWarn = { fg = theme.diag.warning },
DiagnosticInfo = { fg = theme.diag.info },
DiagnosticHint = { fg = theme.diag.hint },
DiagnosticOk = { fg = theme.diag.ok },
DiagnosticFloatingError = { fg = theme.diag.error },
DiagnosticFloatingWarn = { fg = theme.diag.warning },
DiagnosticFloatingInfo = { fg = theme.diag.info },
DiagnosticFloatingHint = { fg = theme.diag.hint },
DiagnosticFloatingOk = { fg = theme.diag.ok },
DiagnosticSignError = { fg = theme.diag.error, bg = theme.ui.none },
DiagnosticSignWarn = { fg = theme.diag.warning, bg = theme.ui.none },
DiagnosticSignInfo = { fg = theme.diag.info, bg = theme.ui.none },
DiagnosticSignHint = { fg = theme.diag.hint, bg = theme.ui.none },
DiagnosticVirtualTextError = { link = 'DiagnosticError' },
DiagnosticVirtualTextWarn = { link = 'DiagnosticWarn' },
DiagnosticVirtualTextInfo = { link = 'DiagnosticInfo' },
DiagnosticVirtualTextHint = { link = 'DiagnosticHint' },
DiagnosticUnderlineError = { undercurl = true, sp = theme.diag.error },
DiagnosticUnderlineWarn = { undercurl = true, sp = theme.diag.warning },
DiagnosticUnderlineInfo = { undercurl = true, sp = theme.diag.info },
DiagnosticUnderlineHint = { undercurl = true, sp = theme.diag.hint },
LspSignatureActiveParameter = { fg = theme.diag.warning },
LspCodeLens = { fg = theme.syn.comment },
LspSignatureActiveParameter = { fg = theme.diag.warning },
LspCodeLens = { fg = theme.syn.comment },
-- Diff / VCS
diffAdded = { fg = theme.vcs.added },
diffRemoved = { fg = theme.vcs.removed },
diffDeleted = { fg = theme.vcs.removed },
diffChanged = { fg = theme.vcs.changed },
diffOldFile = { fg = theme.vcs.removed },
diffNewFile = { fg = theme.vcs.added },
-- Diff / VCS
diffAdded = { fg = theme.vcs.added },
diffRemoved = { fg = theme.vcs.removed },
diffDeleted = { fg = theme.vcs.removed },
diffChanged = { fg = theme.vcs.changed },
diffOldFile = { fg = theme.vcs.removed },
diffNewFile = { fg = theme.vcs.added },
-- Syntax Highlights
Comment = { fg = theme.syn.comment, italic = true },
Constant = { fg = theme.syn.constant },
String = { fg = theme.syn.string },
Character = { link = 'String' },
Number = { fg = theme.syn.number },
Boolean = { fg = theme.syn.constant },
Float = { link = 'Number' },
Identifier = { fg = theme.syn.identifier },
Function = { fg = theme.syn.fun },
Statement = { fg = theme.syn.statement },
Operator = { fg = theme.syn.operator },
Keyword = { fg = theme.syn.keyword, italic = true },
Exception = { fg = theme.syn.special2 },
PreProc = { fg = theme.syn.preproc },
Type = { fg = theme.syn.type },
Special = { fg = theme.syn.special1 },
Delimiter = { fg = theme.syn.punct },
Underlined = { fg = theme.syn.special1, underline = true },
Bold = { bold = true },
Italic = { italic = true },
Ignore = { link = 'NonText' },
Error = { fg = theme.diag.error },
Todo = { fg = theme.ui.fg_reverse, bg = theme.diag.info, bold = true },
qfLineNr = { link = 'LineNr' },
qfFileName = { link = 'Directory' },
markdownCode = { fg = theme.syn.string },
markdownCodeBlock = { fg = theme.syn.string },
markdownEscape = { fg = theme.ui.none },
-- Syntax Highlights
Comment = { fg = theme.syn.comment, italic = true },
Constant = { fg = theme.syn.constant },
String = { fg = theme.syn.string },
Character = { link = 'String' },
Number = { fg = theme.syn.number },
Boolean = { fg = theme.syn.constant },
Float = { link = 'Number' },
Identifier = { fg = theme.syn.identifier },
Function = { fg = theme.syn.fun },
Statement = { fg = theme.syn.statement },
Operator = { fg = theme.syn.operator },
Keyword = { fg = theme.syn.keyword, italic = true },
Exception = { fg = theme.syn.special2 },
PreProc = { fg = theme.syn.preproc },
Type = { fg = theme.syn.type },
Special = { fg = theme.syn.special1 },
Delimiter = { fg = theme.syn.punct },
Underlined = { fg = theme.syn.special1, underline = true },
Bold = { bold = true },
Italic = { italic = true },
Ignore = { link = 'NonText' },
Error = { fg = theme.diag.error },
Todo = { fg = theme.ui.fg_reverse, bg = theme.diag.info, bold = true },
qfLineNr = { link = 'LineNr' },
qfFileName = { link = 'Directory' },
markdownCode = { fg = theme.syn.string },
markdownCodeBlock = { fg = theme.syn.string },
markdownEscape = { fg = theme.ui.none },
-- Treesitter Highlights
['@variable'] = { fg = theme.ui.fg },
['@variable.builtin'] = { fg = theme.syn.special2, italic = true },
['@variable.parameter'] = { fg = theme.syn.parameter },
['@variable.member'] = { fg = theme.syn.identifier },
['@string.regexp'] = { fg = theme.syn.regex },
['@string.escape'] = { fg = theme.syn.regex },
['@string.special.symbol'] = { fg = theme.syn.identifier },
['@type'] = { link = 'Type' },
['@type.builtin'] = { fg = theme.syn.type },
['@attribute'] = { link = 'Constant' },
['@property'] = { fg = theme.syn.identifier },
['@function'] = { link = 'Function' },
['@function.builtin'] = { link = 'Function' },
['@function.call'] = { link = 'Function' },
['@function.method'] = { link = 'Function' },
['@function.method.call'] = { link = 'Function' },
['@constructor'] = { fg = theme.syn.special1 },
['@constructor.lua'] = { fg = theme.syn.keyword },
['@operator'] = { link = 'Operator' },
['@keyword.coroutine'] = { fg = theme.syn.keyword },
['@keyword.function'] = { fg = theme.syn.keyword },
['@keyword.operator'] = { fg = theme.syn.operator },
['@keyword.import'] = { link = 'PreProc' },
['@keyword.modifier'] = { fg = theme.syn.keyword },
['@keyword.storage'] = { fg = theme.syn.keyword },
['@keyword.return'] = { fg = theme.syn.special3, italic = true },
['@keyword.exception'] = { fg = theme.syn.special3 },
['@keyword.conditional'] = { fg = theme.syn.keyword },
['@punctuation.delimiter'] = { fg = theme.syn.punct },
['@punctuation.bracket'] = { fg = theme.syn.punct },
['@punctuation.special'] = { fg = theme.syn.special1 },
['@comment.error'] = { fg = theme.ui.fg, bg = theme.diag.error, bold = true },
['@comment.warning'] = { fg = theme.ui.fg_reverse, bg = theme.diag.warning, bold = true },
['@comment.note'] = { fg = theme.ui.fg_reverse, bg = theme.diag.hint, bold = true },
['@markup.strong'] = { bold = true },
['@markup.italic'] = { italic = true },
['@markup.strikethrough'] = { strikethrough = true },
['@markup.underline'] = { underline = true },
['@markup.heading'] = { link = 'Function' },
['@markup.quote'] = { link = '@variable.parameter' },
['@markup.math'] = { link = 'Constant' },
['@markup.environment'] = { link = 'Keyword' },
['@markup.raw'] = { link = 'String' },
['@diff.plus'] = { fg = theme.vcs.added },
['@diff.minus'] = { fg = theme.vcs.removed },
['@diff.delta'] = { fg = theme.vcs.changed },
['@tag.attribute'] = { fg = theme.syn.identifier },
['@tag.delimiter'] = { fg = theme.syn.punct },
['@lsp.type.keyword.lua'] = { fg = theme.syn.regex },
-- Treesitter Highlights
['@variable'] = { fg = theme.ui.fg },
['@variable.builtin'] = { fg = theme.syn.special2, italic = true },
['@variable.parameter'] = { fg = theme.syn.parameter },
['@variable.member'] = { fg = theme.syn.identifier },
['@string.regexp'] = { fg = theme.syn.regex },
['@string.escape'] = { fg = theme.syn.regex },
['@string.special.symbol'] = { fg = theme.syn.identifier },
['@type'] = { link = 'Type' },
['@type.builtin'] = { fg = theme.syn.type },
['@attribute'] = { link = 'Constant' },
['@property'] = { fg = theme.syn.identifier },
['@function'] = { link = 'Function' },
['@function.builtin'] = { link = 'Function' },
['@function.call'] = { link = 'Function' },
['@function.method'] = { link = 'Function' },
['@function.method.call'] = { link = 'Function' },
['@constructor'] = { fg = theme.syn.special1 },
['@constructor.lua'] = { fg = theme.syn.keyword },
['@operator'] = { link = 'Operator' },
['@keyword.coroutine'] = { fg = theme.syn.keyword },
['@keyword.function'] = { fg = theme.syn.keyword },
['@keyword.operator'] = { fg = theme.syn.operator },
['@keyword.import'] = { link = 'PreProc' },
['@keyword.modifier'] = { fg = theme.syn.keyword },
['@keyword.storage'] = { fg = theme.syn.keyword },
['@keyword.return'] = { fg = theme.syn.special3, italic = true },
['@keyword.exception'] = { fg = theme.syn.special3 },
['@keyword.conditional'] = { fg = theme.syn.keyword },
['@punctuation.delimiter'] = { fg = theme.syn.punct },
['@punctuation.bracket'] = { fg = theme.syn.punct },
['@punctuation.special'] = { fg = theme.syn.special1 },
['@comment.error'] = { fg = theme.ui.fg, bg = theme.diag.error, bold = true },
['@comment.warning'] = { fg = theme.ui.fg_reverse, bg = theme.diag.warning, bold = true },
['@comment.note'] = { fg = theme.ui.fg_reverse, bg = theme.diag.hint, bold = true },
['@markup.strong'] = { bold = true },
['@markup.italic'] = { italic = true },
['@markup.strikethrough'] = { strikethrough = true },
['@markup.underline'] = { underline = true },
['@markup.heading'] = { link = 'Function' },
['@markup.quote'] = { link = '@variable.parameter' },
['@markup.math'] = { link = 'Constant' },
['@markup.environment'] = { link = 'Keyword' },
['@markup.raw'] = { link = 'String' },
['@diff.plus'] = { fg = theme.vcs.added },
['@diff.minus'] = { fg = theme.vcs.removed },
['@diff.delta'] = { fg = theme.vcs.changed },
['@tag.attribute'] = { fg = theme.syn.identifier },
['@tag.delimiter'] = { fg = theme.syn.punct },
['@lsp.type.keyword.lua'] = { fg = theme.syn.regex },
-- Plugins (Blink/Cmp, etc.)
BlinkCmpMenu = { link = 'Pmenu' },
BlinkCmpMenuSelection = { link = 'PmenuSel' },
BlinkCmpMenuBorder = { fg = theme.ui.bg_search, bg = theme.ui.pmenu.bg },
BlinkCmpLabel = { fg = theme.ui.pmenu.fg },
BlinkCmpLabelMatch = { fg = theme.syn.fun },
-- Plugins (Blink/Cmp, etc.)
BlinkCmpMenu = { link = 'Pmenu' },
BlinkCmpMenuSelection = { link = 'PmenuSel' },
BlinkCmpMenuBorder = { fg = theme.ui.bg_search, bg = theme.ui.pmenu.bg },
BlinkCmpLabel = { fg = theme.ui.pmenu.fg },
BlinkCmpLabelMatch = { fg = theme.syn.fun },
})
@@ -1,5 +1,8 @@
local map = vim.keymap.set
--- grr for references, gra for actions, grn for rename as you removed the old keybinds to use defaults
map('n', 'gd', vim.lsp.buf.definition)
map('v', 'J', ":m '>+1<CR>gv=gv")
map('v', 'K', ":m '<-2<CR>gv=gv")
@@ -15,11 +18,6 @@ map('n', '<leader>ss', ':split<CR>')
map('n', '<leader>[', '<c-w>H', { silent = true })
map('n', '<leader>]', '<c-w>K', { silent = true })
map('n', '<C-h>', '<C-w>h', { silent = true })
map('n', '<C-j>', '<C-w>j', { silent = true })
map('n', '<C-k>', '<C-w>k', { silent = true })
map('n', '<C-l>', '<C-w>l', { silent = true })
map('n', '<C-h>', ':NvimTmuxNavigateLeft<CR>', { silent = true })
map('n', '<C-j>', ':NvimTmuxNavigateDown<CR>', { silent = true })
map('n', '<C-k>', ':NvimTmuxNavigateUp<CR>', { silent = true })
@@ -30,56 +28,40 @@ map('n', '<leader>lp', '<cmd>LivePreview pick<cr>')
map('n', '<leader><leader>', ':Pick files<CR>', { silent = true })
map('n', '<leader>fh', ':Pick help<CR>', { silent = true })
map('n', '<leader>fg', ':Pick grep<CR>', { silent = true })
map('n', '<leader>fg', ':Pick grep_live<CR>', { silent = true })
map('n', '<leader>uu', function()
require('undotree').open({
command = 'topleft 45vnew',
title = 'Undo Tree',
})
require('undotree').open({
command = 'topleft 45vnew',
title = 'Undo Tree',
})
end, { desc = 'native undotree', silent = true })
map('n', '<leader>ff', vim.lsp.buf.format)
map('n', '<leader>fs', vim.lsp.buf.document_symbol)
map('n', '<leader>gd', vim.lsp.buf.definition)
map('n', '<leader>gr', vim.lsp.buf.references)
map('n', '<leader>gR', vim.lsp.buf.rename)
map('n', '<leader>gc', vim.lsp.buf.code_action)
local function qf_is_open()
return vim.fn.getqflist({ winid = 0 }).winid ~= 0
end
local function diagnostic_items()
return vim.diagnostic.toqflist(vim.diagnostic.get())
end
map('n', '<leader>xx', function()
if qf_is_open() then
vim.cmd('cclose')
return
end
local items = diagnostic_items()
if #items == 0 then
vim.notify('No diagnostics found', vim.log.levels.WARN)
return
end
vim.fn.setqflist(items)
vim.cmd('copen')
if vim.fn.getqflist({ win = 0 }).winid == 0 then
vim.cmd('cclose')
return
end
local items = vim.diagnostic.toqflist(vim.diagnostic.get())
if #items == 0 then
vim.notify('No diagnostics found', vim.log.levels.WARN)
return
end
vim.fn.setqflist(items)
vim.cmd('copen')
end, { desc = 'Toggle diagnostics quickfix' })
local qf_group = vim.api.nvim_create_augroup('DiagnosticsQuickfix', { clear = true })
vim.api.nvim_create_autocmd('DiagnosticChanged', {
group = qf_group,
callback = function()
if not qf_is_open() then
return
end
local items = diagnostic_items()
vim.fn.setqflist(items, 'r')
if #items == 0 then
vim.cmd('cclose')
end
end,
group = qf_group,
callback = function()
if vim.fn.getqflist({ win = 0 }).winid == 0 then
return
end
local items = vim.diagnostic.toqflist(vim.diagnostic.get())
vim.fn.setqflist(items, 'r')
if #items == 0 then
vim.cmd('cclose')
end
end,
})
+59 -91
View File
@@ -1,100 +1,68 @@
vim.lsp.config('*', { capabilities = require('blink.cmp').get_lsp_capabilities() })
vim.lsp.config('lua_ls', {
settings = {
Lua = {
runtime = {
version = 'LuaJIT',
},
diagnostics = { globals = { 'vim' } },
completion = { callSnippet = 'Replace' },
hint = { enable = true },
codeLens = {
enable = true,
},
type = {
checkTableShape = true, -- Warns if you pass a table missing required fields
inferParamType = true, -- Tries to figure out argument types from usage
},
workspace = {
checkThirdParty = false,
library = {
vim.env.VIMRUNTIME .. '/lua',
vim.lsp.config('*', {
capabilities = require('blink.cmp').get_lsp_capabilities({
workspace = { didChangeWatchedFiles = { dynamicRegistration = false } },
}, true),
})
'/Users/andrew/personal/Projects/Lua/vern-nvim/lua',
},
},
didChangeWatchedFiles = {
dynamicRegistration = false,
},
},
},
vim.lsp.config('lua_ls', {
settings = {
Lua = {
runtime = {
version = 'LuaJIT',
},
diagnostics = { globals = { 'vim' } },
completion = { callSnippet = 'Replace' },
hint = { enable = true },
codeLens = {
enable = true,
},
type = {
checkTableShape = true, -- Warns if you pass a table missing required fields
inferParamType = true, -- Tries to figure out argument types from usage
},
workspace = {
checkThirdParty = false,
library = {
vim.env.VIMRUNTIME .. '/lua',
'/Users/andrew/personal/Projects/Lua/vern-nvim/lua',
},
},
},
},
})
vim.lsp.config('vtsls', {
settings = {
vtsls = {
autoUseWorkspaceTsdk = true,
experimental = {
completion = {
enableServerSideFuzzyMatch = true,
},
},
},
typescript = {
tsserver = {
maxTsServerMemory = 8192,
},
updateImportsOnFileMove = { enabled = 'always' },
inlayHints = {
parameterNames = { enabled = 'all', suppressWhenArgumentMatchesName = true },
parameterTypes = { enabled = true },
variableTypes = { enabled = true },
propertyDeclarationTypes = { enabled = true },
functionLikeReturnTypes = { enabled = true },
enumMemberValues = { enabled = true },
},
preferences = {
importModuleSpecifier = 'non-relative',
},
},
javascript = {
updateImportsOnFileMove = { enabled = 'always' },
inlayHints = {
parameterNames = { enabled = 'all', suppressWhenArgumentMatchesName = true },
parameterTypes = { enabled = true },
variableTypes = { enabled = true },
propertyDeclarationTypes = { enabled = true },
functionLikeReturnTypes = { enabled = true },
enumMemberValues = { enabled = true },
},
},
},
})
vim.lsp.config('rust_analyzer', {
settings = {
['rust-analyzer'] = {
cargo = {
allFeatures = true, -- Enable all cargo features
},
check = {
command = 'clippy', -- Use clippy for errors/warnings on save
},
diagnostics = {
enable = true,
},
},
},
settings = {
vtsls = {
autoUseWorkspaceTsdk = true,
experimental = {
completion = {
enableServerSideFuzzyMatch = true,
},
},
},
typescript = {
tsserver = {
maxTsServerMemory = 8192,
},
updateImportsOnFileMove = { enabled = 'always' },
preferences = {
importModuleSpecifier = 'non-relative',
},
},
javascript = {
updateImportsOnFileMove = { enabled = 'always' },
},
},
})
vim.lsp.enable({
'lua_ls',
'clangd',
'pylsp',
'rust_analyzer',
'gopls',
'lua_ls',
'clangd',
'gopls',
--- Web
'vtsls',
'superhtml',
--- Web
'vtsls',
'html',
})
+8 -25
View File
@@ -8,7 +8,8 @@ vim.opt.swapfile = false
vim.opt.termguicolors = true
vim.opt.signcolumn = 'yes'
vim.opt.wrap = false
vim.opt.showmode = false
vim.opt.confirm = true
-- vim.opt.showmode = false
vim.o.winborder = 'rounded'
vim.opt.scrolloff = 15
@@ -17,31 +18,13 @@ vim.opt.smoothscroll = true
vim.opt.updatetime = 50
vim.opt.smartindent = true
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
local shifts = {
lua = 4,
python = 4,
rust = 4,
html = 2,
go = 4,
javascript = 2,
typescript = 2,
}
vim.api.nvim_create_autocmd('FileType', {
group = vim.api.nvim_create_augroup('IndentSettings', { clear = true }),
pattern = vim.tbl_keys(shifts),
callback = function(ev)
local size = shifts[ev.match]
local bo = vim.bo[ev.buf]
bo.tabstop = size
bo.shiftwidth = size
bo.softtabstop = size
bo.expandtab = true
end,
})
vim.opt.tabstop = 2
vim.opt.shiftwidth = 2
vim.opt.softtabstop = -1
vim.opt.expandtab = true
vim.diagnostic.config({
virtual_text = true,
severity_sort = true,
virtual_text = true,
severity_sort = true,
})
@@ -1,20 +1,20 @@
vim.pack.add({
{ src = 'https://github.com/nvim-mini/mini.nvim.git', version = vim.version.range('*') },
{ src = 'https://github.com/nvim-treesitter/nvim-treesitter' },
{ src = 'https://github.com/saghen/blink.cmp', version = vim.version.range('*') },
{ src = 'https://github.com/mason-org/mason.nvim' },
{ src = 'https://github.com/mason-org/mason-lspconfig.nvim' },
{ src = 'https://github.com/neovim/nvim-lspconfig' },
{ src = 'https://github.com/stevearc/conform.nvim' },
{ src = 'https://git.moomancer.xyz/DarthMooMancer/mason-conform.nvim.git' },
{ src = 'https://github.com/brianhuster/live-preview.nvim' },
{ src = 'https://github.com/alexghergh/nvim-tmux-navigation' },
{ src = 'https://github.com/nvim-mini/mini.nvim.git', version = vim.version.range('*') },
{ src = 'https://github.com/nvim-treesitter/nvim-treesitter' },
{ src = 'https://github.com/saghen/blink.cmp', version = vim.version.range('*') },
{ src = 'https://github.com/mason-org/mason.nvim' },
{ src = 'https://github.com/mason-org/mason-lspconfig.nvim' },
{ src = 'https://github.com/neovim/nvim-lspconfig' },
{ src = 'https://github.com/stevearc/conform.nvim' },
{ src = 'https://git.moomancer.xyz/DarthMooMancer/mason-conform.nvim.git' },
{ src = 'https://github.com/brianhuster/live-preview.nvim' },
{ src = 'https://github.com/alexghergh/nvim-tmux-navigation' },
})
vim.opt.rtp:append('/Users/andrew/personal/Projects/Lua/vern-nvim')
vim.cmd('packadd nvim.undotree')
require('nvim-tmux-navigation').setup({
disable_when_zoomed = true, -- defaults to false
disable_when_zoomed = true, -- defaults to false
})
require('DarthMooMancer.plugins.blink-cmp')
@@ -1,20 +1,30 @@
require('conform').setup({
formatters_by_ft = {
lua = { 'stylua', lsp_format = 'fallback' },
javascript = { 'prettier', stop_after_first = true },
typescript = { 'prettier', stop_after_first = true },
json = { 'prettier' },
html = { 'prettier' },
c = { 'clang-format' },
-- go = { 'goimports', 'crlfmt' },
go = { 'goimports' },
cpp = { 'clang-format' },
python = { 'ruff_fix', 'ruff_format' },
rust = { 'rustfmt' },
['_'] = { 'trim_whitespace' },
},
format_on_save = {
timeout_ms = 500,
lsp_format = 'fallback',
},
local conform = require('conform')
conform.setup({
formatters_by_ft = {
lua = { 'stylua' },
c = { 'clang-format' },
cpp = { 'clang-format' },
go = { 'goimports' },
--- Web
javascript = { 'prettier', stop_after_first = true },
typescript = { 'prettier', stop_after_first = true },
json = { 'prettier' },
html = { 'prettier' },
css = { 'prettier' },
markdown = { 'prettier' },
yaml = { 'prettier' },
['_'] = { 'trim_whitespace' },
},
format_on_save = {
timeout_ms = 2000,
lsp_format = 'fallback',
},
})
vim.keymap.set('n', '<leader>ff', function()
conform.format({ async = true, lsp_format = 'fallback' })
end)
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
@@ -1,13 +1,11 @@
require('mason').setup()
require('mason-lspconfig').setup({
ensure_installed = {
'vtsls',
'lua_ls',
'pylsp',
'cssls',
'superhtml',
'gopls',
},
automatic_enable = false,
ensure_installed = {
'gopls',
'lua_ls',
'vtsls', -- typescript, javascript
'html',
},
automatic_enable = false,
})
require('mason-conform').setup()
@@ -1,25 +1,25 @@
local hipatterns = require('mini.hipatterns')
hipatterns.setup({
highlighters = {
fixme = {
pattern = '%f[%w]()FIXME()%f[%W]',
group = 'MiniHipatternsFixme',
},
hack = {
pattern = '%f[%w]()HACK()%f[%W]',
group = 'MiniHipatternsHack',
},
todo = {
pattern = '%f[%w]()TODO()%f[%W]',
group = 'MiniHipatternsTodo',
},
note = {
pattern = '%f[%w]()NOTE()%f[%W]',
group = 'MiniHipatternsNote',
},
highlighters = {
fixme = {
pattern = '%f[%w]()FIXME()%f[%W]',
group = 'MiniHipatternsFixme',
},
hack = {
pattern = '%f[%w]()HACK()%f[%W]',
group = 'MiniHipatternsHack',
},
todo = {
pattern = '%f[%w]()TODO()%f[%W]',
group = 'MiniHipatternsTodo',
},
note = {
pattern = '%f[%w]()NOTE()%f[%W]',
group = 'MiniHipatternsNote',
},
hex_color = hipatterns.gen_highlighter.hex_color(),
},
hex_color = hipatterns.gen_highlighter.hex_color(),
},
})
require('mini.pairs').setup()
@@ -30,13 +30,17 @@ require('mini.extra').setup()
require('mini.input').setup()
require('mini.pick').setup({
window = {
config = {
anchor = 'NW',
row = math.floor(0.5 * (vim.o.lines - math.floor(0.618 * vim.o.lines))),
col = math.floor(0.5 * (vim.o.columns - math.floor(0.618 * vim.o.columns))),
height = math.floor(0.618 * vim.o.lines),
width = math.floor(0.618 * vim.o.columns),
},
},
window = {
config = function()
local height = math.floor(0.618 * vim.o.lines)
local width = math.floor(0.618 * vim.o.columns)
return {
anchor = 'NW',
row = math.floor(0.5 * (vim.o.lines - height)),
col = math.floor(0.5 * (vim.o.columns - width)),
height = height,
width = width,
}
end,
},
})
@@ -1,29 +1,53 @@
local parsers = {
'json',
'rust',
'c',
'cpp',
'lua',
'html',
'javascript',
'typescript',
'tsx',
'css',
'python',
'yaml',
'lua',
'luadoc', -- highlights ---@ annotations, useful for your plugin work
'go',
'gomod',
'c',
'cpp',
'vim',
'vimdoc',
'query',
'json',
'yaml',
'toml',
'bash',
'markdown',
'markdown_inline',
'gitcommit',
'gitignore',
'diff',
-- web: keep the installed parsers, but don't auto-install for now
-- 'javascript',
-- 'typescript',
-- 'tsx',
-- 'html',
-- 'css',
}
require('nvim-treesitter').install(parsers)
local group = vim.api.nvim_create_augroup('UserTreesitter', { clear = true })
vim.api.nvim_create_autocmd('VimEnter', {
group = group,
once = true,
callback = function()
require('nvim-treesitter').install(parsers)
end,
})
vim.api.nvim_create_autocmd('FileType', {
group = group,
desc = 'Start treesitter highlighting when a parser is installed',
callback = function(ev)
local lang = vim.treesitter.language.get_lang(ev.match) or ev.match
if not vim.treesitter.language.add(lang) then
return
end
vim.treesitter.start(ev.buf, lang)
end,
group = group,
desc = 'Start treesitter highlighting when a parser is installed',
pattern = '*',
callback = function(ev)
if vim.bo.buftype ~= '' then
return
end
local ok = pcall(vim.treesitter.start, ev.buf)
if ok then
vim.bo[ev.buf].indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
end
end,
})
+1 -1
View File
@@ -1,5 +1,5 @@
column_width = 100
line_endings = "Unix"
indent_type = "Tabs"
indent_type = "Spaces"
indent_width = 2
quote_style = "AutoPreferSingle"