chore(statusline, colorscheme): minmized statuline closer to defaults
and removed redundant things in colorscheme
This commit is contained in:
1 parent
f3f80668e2
commit
e6de129e02
12 files changed
+276
-443
No files matched your search
@@ -1,4 +1 @@
|
||||
vim.opt_local.expandtab = false
|
||||
vim.opt_local.tabstop = 4
|
||||
vim.opt_local.shiftwidth = 0 -- fall back to tabstop
|
||||
vim.opt_local.softtabstop = 0
|
||||
@@ -1,341 +0,0 @@
|
||||
vim.cmd('highlight clear')
|
||||
if vim.fn.exists('syntax_on') then
|
||||
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',
|
||||
}
|
||||
|
||||
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,
|
||||
},
|
||||
}
|
||||
|
||||
-- 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
|
||||
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 },
|
||||
|
||||
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 },
|
||||
|
||||
-- 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 },
|
||||
|
||||
-- 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 },
|
||||
|
||||
-- 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 },
|
||||
})
|
||||
@@ -0,0 +1,191 @@
|
||||
vim.cmd('highlight clear')
|
||||
if vim.fn.exists('syntax_on') then
|
||||
vim.cmd.syntax('reset')
|
||||
end
|
||||
vim.o.background = 'dark'
|
||||
vim.g.colors_name = 'minikanso-zen'
|
||||
|
||||
local palette = {
|
||||
none = 'NONE',
|
||||
bg0 = '#090E13', --- bg0
|
||||
bg1 = '#14171d', --- bg1
|
||||
bg2 = '#1C1E25', --- bg2
|
||||
bg3 = '#22262D', --- bg3
|
||||
bg4 = '#393B44', --- bg4
|
||||
blue0 = '#223249', --- blue0
|
||||
blue1 = '#2D4F67', --- blue1
|
||||
blue2 = '#658594', --- blue2
|
||||
blue3 = '#8ba4b0', --- blue3
|
||||
red0 = '#C34043', --- red0
|
||||
red1 = '#c4746e', --- red1
|
||||
yellow0 = '#DCA561', --- yellow0
|
||||
yellow1 = '#c4b28a', --- yellow1
|
||||
green0 = '#98BB6C', --- green0
|
||||
green1 = '#8a9a7b', --- green1
|
||||
aqua0 = '#6A9589', --- aqua0
|
||||
aqua1 = '#8ea4a2', --- aqua1
|
||||
violet0 = '#8992a7', --- violet0
|
||||
pink0 = '#a292a3', --- pink0
|
||||
orange0 = '#b6927b', --- orange0
|
||||
fg0 = '#C5C9C7', --- fg0
|
||||
fg1 = '#f2f1ef', --- fg1
|
||||
gray0 = '#A4A7A4', ---gray0
|
||||
gray1 = '#909398', ---gray2
|
||||
gray2 = '#75797f', ---gray3
|
||||
gray3 = '#5C6066', --- gray4
|
||||
gray4 = '#43464E', --- gray5
|
||||
}
|
||||
|
||||
local function set_highlights(highlights)
|
||||
for group, opts in pairs(highlights) do
|
||||
vim.api.nvim_set_hl(0, group, opts)
|
||||
end
|
||||
end
|
||||
|
||||
set_highlights({
|
||||
ColorColumn = { bg = palette.bg2 },
|
||||
Conceal = { fg = palette.gray3, bold = true },
|
||||
|
||||
CurSearch = { fg = palette.fg0, bg = palette.blue1, bold = true },
|
||||
Cursor = { fg = palette.bg0, bg = palette.fg1 },
|
||||
lCursor = { link = 'Cursor' },
|
||||
CursorIM = { link = 'Cursor' },
|
||||
CursorLine = { bg = palette.bg3 },
|
||||
CursorColumn = { link = 'CursorLine' },
|
||||
CursorLineSign = { link = 'CursorLine' },
|
||||
CursorLineFold = { link = 'CursorLine' },
|
||||
CursorLineNr = { fg = palette.fg1, bg = palette.none },
|
||||
|
||||
Directory = { fg = palette.blue3 },
|
||||
EndOfBuffer = { fg = palette.bg0 },
|
||||
Error = { fg = palette.red0 },
|
||||
ErrorMsg = { link = 'Error' },
|
||||
WinSeparator = { fg = palette.bg0, bg = palette.none },
|
||||
VertSplit = { link = 'WinSeparator' },
|
||||
SignColumn = { fg = palette.gray3, bg = palette.none },
|
||||
IncSearch = { fg = palette.blue0, bg = palette.yellow0 },
|
||||
Substitute = { fg = palette.fg0, bg = palette.red0 },
|
||||
LineNr = { fg = palette.gray3, bg = palette.none },
|
||||
MatchParen = { fg = palette.yellow0, bold = true },
|
||||
ModeMsg = { fg = palette.yellow0, bold = true },
|
||||
MsgArea = { fg = palette.gray0 },
|
||||
MsgSeparator = { bg = palette.bg0 },
|
||||
MoreMsg = { link = 'DiagnosticInfo' },
|
||||
NonText = { fg = palette.gray3 },
|
||||
|
||||
Normal = { fg = palette.fg0, bg = palette.bg0 },
|
||||
NormalNC = { link = 'Normal' },
|
||||
NormalFloat = { fg = palette.gray0, bg = palette.bg1 },
|
||||
|
||||
FloatBorder = { fg = palette.gray4, bg = palette.bg1 },
|
||||
FloatTitle = { fg = palette.gray3, bg = palette.bg1, bold = true },
|
||||
FloatFooter = { fg = palette.gray3, bg = palette.bg1 },
|
||||
Pmenu = { link = 'NormalFloat' },
|
||||
PmenuSel = { fg = palette.none, bg = palette.gray4 },
|
||||
PmenuKind = { link = 'Pmenu' },
|
||||
PmenuKindSel = { fg = palette.gray0, bg = palette.gray4 },
|
||||
PmenuExtra = { fg = palette.gray3, bg = palette.bg1 },
|
||||
PmenuExtraSel = { fg = palette.gray3, bg = palette.gray4 },
|
||||
PmenuBorder = { link = 'FloatBorder' },
|
||||
PmenuSbar = { bg = palette.bg0 },
|
||||
PmenuThumb = { bg = palette.bg4 },
|
||||
|
||||
Question = { link = 'MoreMsg' },
|
||||
QuickFixLine = { bg = palette.bg2 },
|
||||
Search = { fg = palette.fg0, bg = palette.blue1 },
|
||||
SpecialKey = { link = 'NonText' },
|
||||
StatusLine = { fg = palette.gray0, bg = palette.bg1 },
|
||||
StatusLineNC = { fg = palette.gray3, bg = palette.bg1 },
|
||||
Title = { fg = palette.blue3, bold = true },
|
||||
Visual = { bg = palette.bg4 },
|
||||
VisualNOS = { link = 'Visual' },
|
||||
WarningMsg = { fg = palette.yellow0 },
|
||||
WildMenu = { link = 'Pmenu' },
|
||||
|
||||
SpellBad = { link = 'DiagnosticUnderlineError' },
|
||||
SpellCap = { link = 'DiagnosticUnderlineWarn' },
|
||||
SpellRare = { undercurl = true, sp = palette.violet0 },
|
||||
SpellLocal = { undercurl = true, sp = palette.aqua1 },
|
||||
|
||||
DiagnosticError = { fg = palette.red0 },
|
||||
DiagnosticWarn = { fg = palette.yellow0 },
|
||||
DiagnosticInfo = { fg = palette.blue2 },
|
||||
DiagnosticHint = { fg = palette.aqua0 },
|
||||
DiagnosticOk = { fg = palette.green0 },
|
||||
|
||||
DiagnosticUnderlineError = { undercurl = true, sp = palette.red0 },
|
||||
DiagnosticUnderlineWarn = { undercurl = true, sp = palette.yellow0 },
|
||||
DiagnosticUnderlineInfo = { undercurl = true, sp = palette.blue2 },
|
||||
DiagnosticUnderlineHint = { undercurl = true, sp = palette.aqua0 },
|
||||
DiagnosticUnderlineOk = { undercurl = true, sp = palette.green0 },
|
||||
|
||||
LspSignatureActiveParameter = { fg = palette.yellow0 },
|
||||
|
||||
Comment = { fg = palette.gray2, italic = true },
|
||||
Constant = { fg = palette.orange0 },
|
||||
String = { fg = palette.green1 },
|
||||
Character = { link = 'String' },
|
||||
Number = { fg = palette.pink0 },
|
||||
Boolean = { link = 'Constant' },
|
||||
Float = { link = 'Number' },
|
||||
Identifier = { fg = palette.violet0 },
|
||||
Function = { fg = palette.blue3 },
|
||||
Statement = { fg = palette.violet0 },
|
||||
Operator = { fg = palette.gray1 },
|
||||
Keyword = { fg = palette.violet0, italic = true },
|
||||
Exception = { link = 'Statement' },
|
||||
PreProc = { fg = palette.gray1 },
|
||||
Type = { fg = palette.aqua1 },
|
||||
Special = { fg = palette.yellow1 },
|
||||
Delimiter = { fg = palette.gray1 },
|
||||
Underlined = { fg = palette.yellow1, underline = true },
|
||||
Bold = { bold = true },
|
||||
Italic = { italic = true },
|
||||
Ignore = { link = 'NonText' },
|
||||
Todo = { fg = palette.blue0, bg = palette.blue2, bold = true },
|
||||
qfLineNr = { link = 'LineNr' },
|
||||
qfFileName = { link = 'Directory' },
|
||||
Added = { fg = palette.green0 },
|
||||
Removed = { fg = palette.red0 },
|
||||
|
||||
['@variable'] = { fg = palette.fg0 },
|
||||
['@variable.builtin'] = { fg = palette.violet0, italic = true },
|
||||
['@variable.parameter'] = { fg = palette.gray1 },
|
||||
['@variable.member'] = { fg = palette.violet0 },
|
||||
['@string.regexp'] = { fg = palette.red1 },
|
||||
['@string.escape'] = { fg = palette.red1 },
|
||||
['@type'] = { link = 'Type' },
|
||||
['@type.builtin'] = { link = 'Type' },
|
||||
['@attribute'] = { link = 'Constant' },
|
||||
['@property'] = { link = '@variable.member' },
|
||||
['@function'] = { link = 'Function' },
|
||||
['@function.builtin'] = { link = 'Function' },
|
||||
['@function.call'] = { link = 'Function' },
|
||||
['@function.method'] = { link = 'Function' },
|
||||
['@function.method.call'] = { link = 'Function' },
|
||||
['@constructor'] = { fg = palette.yellow1 },
|
||||
['@constructor.lua'] = { fg = palette.violet0 },
|
||||
['@operator'] = { link = 'Operator' },
|
||||
['@keyword.coroutine'] = { fg = palette.violet0 },
|
||||
['@keyword.function'] = { fg = palette.violet0 },
|
||||
['@keyword.operator'] = { fg = palette.gray1 },
|
||||
['@keyword.import'] = { link = 'PreProc' },
|
||||
['@keyword.modifier'] = { fg = palette.violet0 },
|
||||
['@keyword.return'] = { fg = palette.violet0, italic = true },
|
||||
['@keyword.exception'] = { fg = palette.violet0 },
|
||||
['@keyword.conditional'] = { fg = palette.violet0 },
|
||||
['@punctuation.delimiter'] = { fg = palette.gray1 },
|
||||
['@punctuation.bracket'] = { fg = palette.gray1 },
|
||||
['@punctuation.special'] = { fg = palette.yellow1 },
|
||||
['@comment.error'] = { fg = palette.fg0, bg = palette.red0, bold = true },
|
||||
['@comment.warning'] = { fg = palette.blue0, bg = palette.yellow0, bold = true },
|
||||
['@comment.note'] = { fg = palette.blue0, bg = palette.aqua0, bold = true },
|
||||
['@markup.strong'] = { link = 'Bold' },
|
||||
['@markup.italic'] = { link = 'Italic' },
|
||||
['@markup.strikethrough'] = { strikethrough = true },
|
||||
['@markup.underline'] = { underline = true },
|
||||
['@markup.heading'] = { link = 'Function' },
|
||||
['@markup.quote'] = { link = '@variable.parameter' },
|
||||
['@markup.raw'] = { link = 'String' },
|
||||
['@lsp.type.keyword.lua'] = { fg = palette.red1 },
|
||||
})
|
||||
@@ -1,12 +1,47 @@
|
||||
vim.loader.enable()
|
||||
vim.g.mapleader = ' '
|
||||
require('DarthMooMancer.opts')
|
||||
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = true
|
||||
|
||||
-- vim.opt.hlsearch = false
|
||||
vim.opt.undofile = true
|
||||
vim.opt.swapfile = false
|
||||
|
||||
vim.opt.termguicolors = true
|
||||
vim.opt.signcolumn = 'yes'
|
||||
vim.opt.wrap = false
|
||||
vim.opt.confirm = true
|
||||
-- vim.o.winborder = 'rounded'
|
||||
|
||||
vim.opt.scrolloff = 15
|
||||
vim.opt.sidescrolloff = 15
|
||||
vim.opt.smoothscroll = true
|
||||
vim.opt.updatetime = 50
|
||||
|
||||
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,
|
||||
})
|
||||
|
||||
vim.opt.statusline = '%<%f %h%m%r%=%{%v:lua.GetDiagnostics()%}%l:%L'
|
||||
|
||||
function _G.GetDiagnostics()
|
||||
local win = tonumber(vim.g.statusline_winid)
|
||||
local buf = (win and vim.api.nvim_win_is_valid(win)) and vim.api.nvim_win_get_buf(win)
|
||||
or vim.api.nvim_get_current_buf()
|
||||
local dg = vim.diagnostic.status(buf)
|
||||
return dg ~= '' and (dg .. ' ') or ''
|
||||
end
|
||||
|
||||
require('DarthMooMancer.plugins')
|
||||
vim.cmd.colorscheme('min-kanso')
|
||||
-- vim.cmd.colorscheme('vague')
|
||||
-- vim.cmd.colorscheme('rose-pine-moon')
|
||||
|
||||
vim.cmd.colorscheme('minikanso-zen')
|
||||
|
||||
require('DarthMooMancer.keymaps')
|
||||
require('DarthMooMancer.statusline')
|
||||
require('DarthMooMancer.lsp')
|
||||
@@ -6,6 +6,8 @@ map('n', 'gd', vim.lsp.buf.definition)
|
||||
map('v', 'J', ":m '>+1<CR>gv=gv")
|
||||
map('v', 'K', ":m '<-2<CR>gv=gv")
|
||||
|
||||
map('n', '<leader>cs', '<cmd>nohlsearch<CR>', { desc = 'Clear search highlights' })
|
||||
|
||||
map('n', '<C-u>', '<C-u>zz')
|
||||
map('n', '<C-d>', '<C-d>zz')
|
||||
map('n', 'n', 'nzzzv')
|
||||
@@ -18,11 +20,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>', ':NvimTmuxNavigateLeft<CR>', { silent = true })
|
||||
map('n', '<C-j>', ':NvimTmuxNavigateDown<CR>', { silent = true })
|
||||
map('n', '<C-k>', ':NvimTmuxNavigateUp<CR>', { silent = true })
|
||||
map('n', '<C-l>', ':NvimTmuxNavigateRight<CR>', { silent = true })
|
||||
|
||||
map('n', '<leader>E', ':Ex<CR>')
|
||||
map('n', '<leader>lp', '<cmd>LivePreview pick<cr>')
|
||||
|
||||
@@ -30,6 +27,7 @@ map('n', '<leader><leader>', ':Pick files<CR>', { silent = true })
|
||||
map('n', '<leader>fh', ':Pick help<CR>', { silent = true })
|
||||
map('n', '<leader>fg', ':Pick grep_live<CR>', { silent = true })
|
||||
map('n', '<leader>uu', function()
|
||||
vim.cmd('packadd nvim.undotree')
|
||||
require('undotree').open({
|
||||
command = 'topleft 45vnew',
|
||||
title = 'Undo Tree',
|
||||
@@ -37,7 +35,7 @@ map('n', '<leader>uu', function()
|
||||
end, { desc = 'native undotree', silent = true })
|
||||
|
||||
map('n', '<leader>xx', function()
|
||||
if vim.fn.getqflist({ win = 0 }).winid == 0 then
|
||||
if vim.fn.getqflist({ winid = 0 }).winid ~= 0 then
|
||||
vim.cmd('cclose')
|
||||
return
|
||||
end
|
||||
@@ -55,7 +53,7 @@ local qf_group = vim.api.nvim_create_augroup('DiagnosticsQuickfix', { clear = tr
|
||||
vim.api.nvim_create_autocmd('DiagnosticChanged', {
|
||||
group = qf_group,
|
||||
callback = function()
|
||||
if vim.fn.getqflist({ win = 0 }).winid == 0 then
|
||||
if vim.fn.getqflist({ winid = 0 }).winid == 0 then
|
||||
return
|
||||
end
|
||||
local items = vim.diagnostic.toqflist(vim.diagnostic.get())
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
-- vim.lsp.config('*', {
|
||||
-- capabilities = require('blink.cmp').get_lsp_capabilities(nil, true),
|
||||
-- })
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
if capabilities.workspace then
|
||||
capabilities.workspace.didChangeWatchedFiles = nil
|
||||
end
|
||||
vim.lsp.config('*', {
|
||||
capabilities = require('blink.cmp').get_lsp_capabilities({
|
||||
workspace = { didChangeWatchedFiles = { dynamicRegistration = false } },
|
||||
}, true),
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
vim.lsp.config('lua_ls', {
|
||||
@@ -66,3 +71,11 @@ vim.lsp.enable({
|
||||
'vtsls',
|
||||
'html',
|
||||
})
|
||||
|
||||
-- vim.opt.autocomplete = true
|
||||
-- vim.opt.complete = { 'o', '.', 'w' }
|
||||
-- vim.opt.completeopt = { 'fuzzy', 'menu', 'menuone', 'noselect', 'popup' }
|
||||
--
|
||||
-- vim.opt.pumheight = 10
|
||||
-- vim.opt.pumwidth = 15
|
||||
-- vim.opt.pumborder = vim.o.winborder -- currently 'rounded'
|
||||
@@ -1,30 +0,0 @@
|
||||
vim.opt.nu = true
|
||||
vim.opt.relativenumber = true
|
||||
|
||||
vim.opt.hlsearch = false
|
||||
vim.opt.undofile = true
|
||||
vim.opt.swapfile = false
|
||||
|
||||
vim.opt.termguicolors = true
|
||||
vim.opt.signcolumn = 'yes'
|
||||
vim.opt.wrap = false
|
||||
vim.opt.confirm = true
|
||||
-- vim.opt.showmode = false
|
||||
vim.o.winborder = 'rounded'
|
||||
|
||||
vim.opt.scrolloff = 15
|
||||
vim.opt.sidescrolloff = 15
|
||||
vim.opt.smoothscroll = true
|
||||
vim.opt.updatetime = 50
|
||||
|
||||
vim.opt.smartindent = true
|
||||
|
||||
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,
|
||||
})
|
||||
@@ -10,16 +10,21 @@ vim.pack.add({
|
||||
{ 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
|
||||
})
|
||||
|
||||
require('DarthMooMancer.plugins.blink-cmp')
|
||||
require('DarthMooMancer.plugins.mini-nvim')
|
||||
require('DarthMooMancer.plugins.vern')
|
||||
require('DarthMooMancer.plugins.treesitter')
|
||||
require('DarthMooMancer.plugins.mason')
|
||||
require('DarthMooMancer.plugins.mini-nvim')
|
||||
require('DarthMooMancer.plugins.conform')
|
||||
require('DarthMooMancer.plugins.blink-cmp')
|
||||
require('DarthMooMancer.plugins.vern')
|
||||
require('nvim-tmux-navigation').setup({
|
||||
disable_when_zoomed = true, -- defaults to false
|
||||
keybindings = {
|
||||
left = '<C-h>',
|
||||
down = '<C-j>',
|
||||
up = '<C-k>',
|
||||
right = '<C-l>',
|
||||
},
|
||||
})
|
||||
@@ -1,11 +1,11 @@
|
||||
require('blink.cmp').setup({
|
||||
completion = {
|
||||
documentation = {
|
||||
auto_show = true,
|
||||
auto_show_delay_ms = 150,
|
||||
},
|
||||
menu = {
|
||||
scrollbar = false,
|
||||
},
|
||||
},
|
||||
completion = {
|
||||
documentation = {
|
||||
auto_show = true,
|
||||
auto_show_delay_ms = 50,
|
||||
},
|
||||
menu = {
|
||||
scrollbar = false,
|
||||
},
|
||||
},
|
||||
})
|
||||
@@ -23,10 +23,9 @@ hipatterns.setup({
|
||||
})
|
||||
|
||||
require('mini.pairs').setup()
|
||||
require('mini.surround').setup()
|
||||
-- require('mini.surround').setup()
|
||||
require('mini.icons').setup()
|
||||
require('mini.notify').setup()
|
||||
require('mini.extra').setup()
|
||||
require('mini.input').setup()
|
||||
|
||||
require('mini.pick').setup({
|
||||
|
||||
@@ -42,7 +42,7 @@ vim.api.nvim_create_autocmd('FileType', {
|
||||
desc = 'Start treesitter highlighting when a parser is installed',
|
||||
pattern = '*',
|
||||
callback = function(ev)
|
||||
if vim.bo.buftype ~= '' then
|
||||
if vim.bo[ev.buf].buftype ~= '' then
|
||||
return
|
||||
end
|
||||
local ok = pcall(vim.treesitter.start, ev.buf)
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
local ok, icons = pcall(require, 'mini.icons')
|
||||
|
||||
function _G.Status()
|
||||
local win = tonumber(vim.g.statusline_winid)
|
||||
local buf = (win and vim.api.nvim_win_is_valid(win)) and vim.api.nvim_win_get_buf(win)
|
||||
or vim.api.nvim_get_current_buf()
|
||||
|
||||
local path = vim.fn.fnamemodify(vim.api.nvim_buf_get_name(buf), ':.')
|
||||
if path == '' then
|
||||
path = '[No Name]'
|
||||
end
|
||||
|
||||
local nm = ' ' .. path
|
||||
if ok then
|
||||
local icon, hl = icons.get('file', path)
|
||||
if hl and hl ~= '' then
|
||||
nm = ('%%#%s#%s%%* %s'):format(hl, icon or '', path)
|
||||
end
|
||||
end
|
||||
|
||||
local dg = vim.diagnostic.status(buf)
|
||||
dg = dg ~= '' and (dg .. ' ') or ''
|
||||
|
||||
return string.format('%s%%m%%r %%=%s%%l:%%L', nm, dg)
|
||||
end
|
||||
|
||||
vim.opt.statusline = '%!v:lua.Status()'
|
||||
|
||||
vim.api.nvim_create_autocmd({ 'DiagnosticChanged' }, {
|
||||
group = vim.api.nvim_create_augroup('CustomStatusline', { clear = true }),
|
||||
callback = function()
|
||||
vim.cmd.redrawstatus()
|
||||
end,
|
||||
})
|
||||
Reference in new issue
Block a user