Compare commits
2
Commits
50dbf88e19
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1f58fc6411 | ||
|
|
d750bb2da1 |
@@ -0,0 +1,342 @@
|
|||||||
|
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 },
|
||||||
|
-- ['@comment.documentation'] = { link = '@tag' },
|
||||||
|
['@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 },
|
||||||
|
})
|
||||||
@@ -1,4 +1,7 @@
|
|||||||
|
vim.loader.enable()
|
||||||
require('DarthMooMancer.opts')
|
require('DarthMooMancer.opts')
|
||||||
|
vim.cmd.colorscheme('min-kanso')
|
||||||
|
|
||||||
require('DarthMooMancer.plugins')
|
require('DarthMooMancer.plugins')
|
||||||
require('DarthMooMancer.keymaps')
|
require('DarthMooMancer.keymaps')
|
||||||
require('DarthMooMancer.statusline')
|
require('DarthMooMancer.statusline')
|
||||||
|
|||||||
@@ -1,54 +1,46 @@
|
|||||||
vim.keymap.set('v', 'J', ":m '>+1<CR>gv=gv")
|
local map = vim.keymap.set
|
||||||
vim.keymap.set('v', 'K', ":m '<-2<CR>gv=gv")
|
|
||||||
vim.keymap.set('n', '<leader>ff', function()
|
map('v', 'J', ":m '>+1<CR>gv=gv")
|
||||||
|
map('v', 'K', ":m '<-2<CR>gv=gv")
|
||||||
|
map('n', '<leader>ff', function()
|
||||||
require('conform').format({ async = true, lsp_format = 'never' })
|
require('conform').format({ async = true, lsp_format = 'never' })
|
||||||
end)
|
end)
|
||||||
vim.keymap.set('n', '<leader>vs', ':vsplit<CR>')
|
map('n', '<leader>vs', ':vsplit<CR>')
|
||||||
vim.keymap.set('n', '<leader>ss', ':split<CR>')
|
map('n', '<leader>ss', ':split<CR>')
|
||||||
vim.keymap.set('n', '<leader>E', ':Ex<CR>')
|
map('n', '<C-u>', '<C-u>zz')
|
||||||
vim.keymap.set('n', '<C-u>', '<C-u>zz')
|
map('n', '<C-d>', '<C-d>zz')
|
||||||
vim.keymap.set('n', '<C-d>', '<C-d>zz')
|
map('n', 'n', 'nzzzv')
|
||||||
vim.keymap.set('n', 'n', 'nzzzv')
|
map('n', 'N', 'Nzzzv')
|
||||||
vim.keymap.set('n', 'N', 'Nzzzv')
|
map('x', '<leader>p', [["_dP]])
|
||||||
vim.keymap.set('x', '<leader>p', [["_dP]])
|
map('n', '<leader><leader>', function()
|
||||||
vim.keymap.set('n', '<leader><leader>', function()
|
|
||||||
Snacks.picker.files()
|
Snacks.picker.files()
|
||||||
end)
|
end)
|
||||||
vim.keymap.set('n', '<leader>fh', function()
|
map('n', '<leader>fh', function()
|
||||||
Snacks.picker.help()
|
Snacks.picker.help()
|
||||||
end)
|
end)
|
||||||
vim.keymap.set('n', '<leader>fg', function()
|
map('n', '<leader>fg', function()
|
||||||
Snacks.picker.grep()
|
Snacks.picker.grep()
|
||||||
end)
|
end)
|
||||||
vim.keymap.set('n', '<leader>fm', function()
|
map('n', '<leader>uu', function()
|
||||||
Snacks.picker.man()
|
|
||||||
end)
|
|
||||||
vim.keymap.set('n', '<leader>xn', function()
|
|
||||||
Snacks.picker.notifications()
|
|
||||||
end)
|
|
||||||
|
|
||||||
vim.keymap.set('n', '<leader>uu', function()
|
|
||||||
Snacks.picker.undo()
|
Snacks.picker.undo()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
vim.keymap.set('n', '<leader>fs', vim.lsp.buf.document_symbol)
|
map('n', '<leader>E', ':Ex<CR>')
|
||||||
vim.keymap.set('n', '<leader>gd', vim.lsp.buf.definition)
|
map('n', '<leader>fs', vim.lsp.buf.document_symbol)
|
||||||
vim.keymap.set('n', '<leader>gr', vim.lsp.buf.references)
|
map('n', '<leader>gd', vim.lsp.buf.definition)
|
||||||
vim.keymap.set('n', '<leader>gR', vim.lsp.buf.rename)
|
map('n', '<leader>gr', vim.lsp.buf.references)
|
||||||
vim.keymap.set('n', '<leader>gc', vim.lsp.buf.code_action)
|
map('n', '<leader>gR', vim.lsp.buf.rename)
|
||||||
vim.keymap.set('n', '<leader>[', '<c-w>H', { silent = true, noremap = true })
|
map('n', '<leader>gc', vim.lsp.buf.code_action)
|
||||||
vim.keymap.set('n', '<leader>]', '<c-w>K', { silent = true, noremap = true })
|
map('n', '<leader>[', '<c-w>H', { silent = true, noremap = true })
|
||||||
vim.keymap.set('n', '[q', ':cprev<CR>zz', { desc = 'Previous Quickfix Item' })
|
map('n', '<leader>]', '<c-w>K', { silent = true, noremap = true })
|
||||||
vim.keymap.set('n', ']q', ':cnext<CR>zz', { desc = 'Next Quickfix Item' })
|
map('n', '<leader>lp', '<cmd>LivePreview pick<cr>')
|
||||||
vim.keymap.set('n', '<leader>qo', ':copen<CR>', { desc = 'Open Quickfix' })
|
map('n', '<C-h>', '<cmd>NvimTmuxNavigateLeft<CR>', { silent = true })
|
||||||
vim.keymap.set('n', '<leader>qc', ':cclose<CR>', { desc = 'Close Quickfix' })
|
map('n', '<C-j>', '<cmd>NvimTmuxNavigateDown<CR>', { silent = true })
|
||||||
vim.keymap.set('n', '<leader>lp', ':LivePreview pick<cr>')
|
map('n', '<C-k>', '<cmd>NvimTmuxNavigateUp<CR>', { silent = true })
|
||||||
vim.keymap.set('n', '<C-h>', ':NvimTmuxNavigateLeft<CR>', { silent = true })
|
map('n', '<C-l>', '<cmd>NvimTmuxNavigateRight<CR>', { silent = true })
|
||||||
vim.keymap.set('n', '<C-j>', ':NvimTmuxNavigateDown<CR>', { silent = true })
|
map('n', '<leader>xx', function()
|
||||||
vim.keymap.set('n', '<C-k>', ':NvimTmuxNavigateUp<CR>', { silent = true })
|
vim.diagnostic.jump({ count = 1, float = false })
|
||||||
vim.keymap.set('n', '<C-l>', ':NvimTmuxNavigateRight<CR>', { silent = true })
|
end)
|
||||||
vim.keymap.set('n', '<leader>xx', ':Trouble diagnostics toggle<cr>')
|
map('n', '<leader>zz', function()
|
||||||
vim.keymap.set('n', '<leader>zz', function()
|
|
||||||
Snacks.zen()
|
Snacks.zen()
|
||||||
end)
|
end)
|
||||||
-- vim.keymap.set('n', '<leader>mp', ':Vellum<cr>', { desc = 'Markdown preview' })
|
|
||||||
|
|||||||
@@ -1,18 +1,34 @@
|
|||||||
local capabilities = require('blink.cmp').get_lsp_capabilities()
|
require('lazydev').setup({
|
||||||
|
library = {
|
||||||
|
{ path = '${3rd}/luv/library', words = { 'vim%.uv' } },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.lsp.config('*', { capabilities = require('blink.cmp').get_lsp_capabilities() })
|
||||||
vim.lsp.config('lua_ls', {
|
vim.lsp.config('lua_ls', {
|
||||||
capabilities = capabilities,
|
|
||||||
settings = {
|
settings = {
|
||||||
Lua = {
|
Lua = {
|
||||||
diagnostics = { globals = { 'vim' } },
|
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 = {
|
workspace = {
|
||||||
library = vim.api.nvim_get_runtime_file('', true),
|
|
||||||
checkThirdParty = false,
|
checkThirdParty = false,
|
||||||
},
|
},
|
||||||
|
didChangeWatchedFiles = {
|
||||||
|
dynamicRegistration = false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.lsp.config('vtsls', {
|
vim.lsp.config('vtsls', {
|
||||||
capabilities = capabilities,
|
|
||||||
settings = {
|
settings = {
|
||||||
typescript = {
|
typescript = {
|
||||||
updateImportsOnFileMove = { enabled = 'always' },
|
updateImportsOnFileMove = { enabled = 'always' },
|
||||||
@@ -24,18 +40,13 @@ vim.lsp.config('vtsls', {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.lsp.config('html', {
|
|
||||||
capabilities = capabilities,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.lsp.enable({
|
vim.lsp.enable({
|
||||||
'lua_ls',
|
'lua_ls',
|
||||||
'clangd',
|
'clangd',
|
||||||
'rust-analyzer',
|
|
||||||
'vtsls',
|
|
||||||
'tailwindcss-language-server',
|
|
||||||
'cssls',
|
|
||||||
'html',
|
|
||||||
'gopls',
|
|
||||||
'pylsp',
|
'pylsp',
|
||||||
|
-- 'rust-analyzer',
|
||||||
|
-- 'vtsls',
|
||||||
|
-- 'tailwindcss-language-server',
|
||||||
|
-- 'cssls',
|
||||||
|
-- 'html',
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -2,76 +2,42 @@ vim.opt.termguicolors = true
|
|||||||
vim.g.mapleader = ' '
|
vim.g.mapleader = ' '
|
||||||
vim.opt.number = true
|
vim.opt.number = true
|
||||||
vim.opt.relativenumber = true
|
vim.opt.relativenumber = true
|
||||||
vim.opt.tabstop = 8 -- Number of spaces a <Tab> counts for
|
vim.opt.colorcolumn = '100'
|
||||||
vim.opt.shiftwidth = 8 -- Number of spaces for autoindent (>>, <<, etc.)
|
local shifts = {
|
||||||
vim.opt.softtabstop = 8 -- Number of spaces for <Tab> in insert mode (backspace deletes 4 spaces)
|
lua = 4,
|
||||||
vim.opt.expandtab = true -- Use spaces instead of tabs
|
python = 4,
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
|
||||||
callback = function(ev)
|
rust = 4,
|
||||||
local map = {
|
dart = 2,
|
||||||
rust = { ts = 4, sw = 4, sts = 4 },
|
html = 2,
|
||||||
lua = { ts = 4, sw = 4, sts = 4 },
|
javascript = 2,
|
||||||
python = { ts = 4, sw = 4, sts = 4 },
|
typescript = 2,
|
||||||
dart = { ts = 2, sw = 2, sts = 2 },
|
|
||||||
html = { ts = 2, sw = 2, sts = 2 },
|
|
||||||
javascript = { ts = 2, sw = 2, sts = 2 },
|
|
||||||
typescript = { ts = 2, sw = 2, sts = 2 },
|
|
||||||
}
|
}
|
||||||
local ft = map[ev.match]
|
vim.api.nvim_create_autocmd('FileType', {
|
||||||
if ft then
|
pattern = vim.tbl_keys(shifts),
|
||||||
vim.bo[ev.buf].tabstop = ft.ts
|
callback = function(ev)
|
||||||
vim.bo[ev.buf].shiftwidth = ft.sw
|
local size = shifts[ev.match]
|
||||||
vim.bo[ev.buf].softtabstop = ft.sts
|
vim.bo[ev.buf].tabstop = size
|
||||||
vim.bo[ev.buf].expandtab = ft.et ~= nil and ft.et or true
|
vim.bo[ev.buf].shiftwidth = size
|
||||||
end
|
vim.bo[ev.buf].softtabstop = size
|
||||||
|
vim.bo[ev.buf].expandtab = true
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
vim.opt.autoindent = true -- Copy indent from current line when starting a new line
|
|
||||||
vim.opt.wrap = false
|
vim.opt.wrap = false
|
||||||
vim.opt.swapfile = false
|
vim.opt.swapfile = false
|
||||||
vim.opt.signcolumn = 'yes'
|
vim.opt.signcolumn = 'number'
|
||||||
vim.opt.undofile = true -- Keeps undo history even after we close a file
|
vim.opt.undofile = true -- Keeps undo history even after we close a file
|
||||||
vim.opt.scrolloff = 4
|
vim.opt.scrolloff = 15
|
||||||
vim.opt.sidescrolloff = 8
|
vim.opt.sidescrolloff = 15
|
||||||
vim.opt.hlsearch = false
|
vim.opt.hlsearch = false
|
||||||
vim.opt.completeopt = { 'menuone', 'noselect', 'popup' }
|
|
||||||
vim.opt.wrapscan = true -- begin search from top of the file when nothng is found
|
|
||||||
vim.opt.cursorline = true -- enable cursorline
|
vim.opt.cursorline = true -- enable cursorline
|
||||||
vim.opt.cursorlineopt = { 'screenline', 'number' } -- cursorline look
|
vim.opt.cursorlineopt = { 'screenline', 'number' } -- cursorline look
|
||||||
vim.opt.foldmethod = 'indent'
|
vim.g.netrw_browse_split = 0
|
||||||
vim.opt.foldcolumn = '0'
|
vim.g.netrw_banner = 0
|
||||||
vim.opt.foldenable = false
|
vim.g.netrw_liststyle = 3
|
||||||
vim.opt.shortmess = 'aFI' -- abbreviates messages and prevents file name being echoed when opened
|
vim.g.netrw_winsize = 25
|
||||||
vim.opt.ignorecase = false -- ignore cases when searching
|
|
||||||
vim.opt.smartcase = true -- However if we use a capital in search string we then consider case-sensitivity, ignorecase is disabled
|
|
||||||
vim.opt.smartindent = false -- smarter indentation
|
|
||||||
vim.opt.smarttab = true -- make tab behaviour smarter
|
|
||||||
vim.opt.laststatus = 3
|
|
||||||
vim.opt.showmode = false
|
vim.opt.showmode = false
|
||||||
-- vim.opt.cmdheight = 0
|
|
||||||
vim.opt.smoothscroll = true
|
vim.opt.smoothscroll = true
|
||||||
vim.opt.spell = true
|
vim.diagnostic.config({ severity_sort = true })
|
||||||
vim.diagnostic.config({
|
|
||||||
virtual_text = true, -- This is the magic line
|
|
||||||
signs = true, -- Shows icons in the gutter
|
|
||||||
underline = true,
|
|
||||||
update_in_insert = false, -- Don't clutter the screen while typing
|
|
||||||
severity_sort = true,
|
|
||||||
})
|
|
||||||
vim.o.winborder = 'rounded'
|
vim.o.winborder = 'rounded'
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
vim.opt.updatetime = 250
|
||||||
pattern = { 'text', 'plaintex' },
|
|
||||||
callback = function()
|
|
||||||
-- Enable visual soft-wrapping
|
|
||||||
vim.opt_local.wrap = true
|
|
||||||
vim.opt_local.linebreak = true
|
|
||||||
vim.opt_local.breakindent = true
|
|
||||||
|
|
||||||
-- Remap j/k to visual lines only inside this buffer
|
|
||||||
vim.keymap.set('n', 'j', 'gj', { buffer = true })
|
|
||||||
vim.keymap.set('n', 'k', 'gk', { buffer = true })
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.g.loaded_netrw = 1
|
|
||||||
vim.g.loaded_netrwPlugin = 1
|
|
||||||
|
|||||||
@@ -1,11 +1,38 @@
|
|||||||
require('DarthMooMancer.plugins.utils')
|
vim.pack.add({
|
||||||
|
{ src = 'https://github.com/folke/snacks.nvim' },
|
||||||
|
{ 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/windwp/nvim-ts-autotag' },
|
||||||
|
{ src = 'https://github.com/saghen/blink.cmp', version = vim.version.range('*') },
|
||||||
|
{ src = 'https://github.com/folke/lazydev.nvim' },
|
||||||
|
{ 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/alexghergh/nvim-tmux-navigation' },
|
||||||
|
{ src = 'https://github.com/brianhuster/live-preview.nvim' },
|
||||||
|
{ src = 'https://github.com/rachartier/tiny-inline-diagnostic.nvim' },
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.opt.rtp:append('/Users/andrew/personal/Projects/Lua/vern-nvim')
|
||||||
|
require('nvim-tmux-navigation').setup({
|
||||||
|
disable_when_zoomed = true, -- defaults to false
|
||||||
|
})
|
||||||
|
|
||||||
|
require('tiny-inline-diagnostic').setup({
|
||||||
|
preset = 'minimal',
|
||||||
|
options = {
|
||||||
|
multilines = {
|
||||||
|
enabled = true,
|
||||||
|
always_show = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
require('DarthMooMancer.plugins.blink-cmp')
|
require('DarthMooMancer.plugins.blink-cmp')
|
||||||
require('DarthMooMancer.plugins.kanso')
|
|
||||||
require('DarthMooMancer.plugins.mini-nvim')
|
require('DarthMooMancer.plugins.mini-nvim')
|
||||||
require('DarthMooMancer.plugins.polydev')
|
require('DarthMooMancer.plugins.vern')
|
||||||
require('DarthMooMancer.plugins.treesitter')
|
require('DarthMooMancer.plugins.treesitter')
|
||||||
require('DarthMooMancer.plugins.mason')
|
require('DarthMooMancer.plugins.mason')
|
||||||
require('DarthMooMancer.plugins.snacks')
|
require('DarthMooMancer.plugins.snacks')
|
||||||
require('DarthMooMancer.plugins.trouble')
|
|
||||||
require('DarthMooMancer.plugins.conform')
|
require('DarthMooMancer.plugins.conform')
|
||||||
require('DarthMooMancer.plugins.mason-conform')
|
|
||||||
|
|||||||
@@ -1,29 +1,21 @@
|
|||||||
vim.pack.add({
|
|
||||||
{
|
|
||||||
src = 'https://github.com/saghen/blink.cmp',
|
|
||||||
version = vim.version.range('*'),
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
require('blink.cmp').setup({
|
require('blink.cmp').setup({
|
||||||
completion = {
|
completion = {
|
||||||
documentation = {
|
documentation = {
|
||||||
auto_show = true,
|
auto_show = true,
|
||||||
auto_show_delay_ms = 100,
|
auto_show_delay_ms = 150,
|
||||||
window = {
|
|
||||||
winhighlight = 'Normal:NormalFloat,FloatBorder:SnacksPickerBorder,CursorLine:Visual,Search:None',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
menu = {
|
menu = {
|
||||||
draw = {
|
|
||||||
columns = {
|
|
||||||
{ 'label', 'label_description', gap = 1 },
|
|
||||||
{ 'kind_icon', 'kind', gap = 1 },
|
|
||||||
{ 'source_name', gap = 1 },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
scrollbar = false,
|
scrollbar = false,
|
||||||
winhighlight = 'Pmenu:NormalFloat,FloatBorder:SnacksPickerBorder,PmenuSel:Visual,CursorLine:Visual,Search:None',
|
},
|
||||||
|
},
|
||||||
|
sources = {
|
||||||
|
default = { 'lazydev', 'lsp', 'buffer', 'snippets', 'path' },
|
||||||
|
providers = {
|
||||||
|
lazydev = {
|
||||||
|
name = 'LazyDev',
|
||||||
|
module = 'lazydev.integrations.blink',
|
||||||
|
score_offset = 100,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
vim.pack.add({ 'https://github.com/stevearc/conform.nvim' })
|
|
||||||
|
|
||||||
require('conform').setup({
|
require('conform').setup({
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
rust = { 'rustfmt', lsp_format = 'fallback' },
|
|
||||||
lua = { 'stylua', lsp_format = 'fallback' },
|
lua = { 'stylua', lsp_format = 'fallback' },
|
||||||
javascript = { 'prettier', stop_after_first = true },
|
javascript = { 'prettier', stop_after_first = true },
|
||||||
typescript = { 'prettier', stop_after_first = true },
|
typescript = { 'prettier', stop_after_first = true },
|
||||||
@@ -10,8 +7,7 @@ require('conform').setup({
|
|||||||
html = { 'prettier' },
|
html = { 'prettier' },
|
||||||
c = { 'clang-format' },
|
c = { 'clang-format' },
|
||||||
cpp = { 'clang-format' },
|
cpp = { 'clang-format' },
|
||||||
css = { 'csskit' },
|
python = { 'ruff_fix', 'ruff_format' },
|
||||||
python = { 'autopep8' },
|
|
||||||
['_'] = { 'trim_whitespace' },
|
['_'] = { 'trim_whitespace' },
|
||||||
},
|
},
|
||||||
format_on_save = {
|
format_on_save = {
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
vim.pack.add({'https://github.com/webhooked/kanso.nvim' })
|
|
||||||
|
|
||||||
require('kanso').setup({
|
|
||||||
transparent = true,
|
|
||||||
overrides = function(colors)
|
|
||||||
local theme = colors.theme
|
|
||||||
return {
|
|
||||||
Normal = { bg = "none" },
|
|
||||||
NormalFloat = { bg = "none" },
|
|
||||||
FloatBorder = { bg = "none" },
|
|
||||||
FloatTitle = { bg = "none" },
|
|
||||||
SnacksPickerBorder = { fg = theme.ui.special, bg = "none" },
|
|
||||||
SnacksPickerTitle = { fg = theme.ui.special, bg = "none" },
|
|
||||||
SnacksInputBorder = { fg = theme.ui.special, bg = "none" },
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.cmd.colorscheme('kanso-zen')
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
vim.pack.add({
|
|
||||||
{ src = 'https://git.moomancer.xyz/DarthMooMancer/mason-conform.nvim.git' },
|
|
||||||
})
|
|
||||||
require('mason-conform').setup({
|
|
||||||
ignore_install = {},
|
|
||||||
})
|
|
||||||
@@ -1,19 +1,12 @@
|
|||||||
vim.pack.add({
|
|
||||||
{ src = 'https://github.com/mason-org/mason.nvim' },
|
|
||||||
{ src = 'https://github.com/mason-org/mason-lspconfig.nvim' },
|
|
||||||
{ src = 'https://github.com/neovim/nvim-lspconfig' },
|
|
||||||
})
|
|
||||||
|
|
||||||
require('mason').setup()
|
require('mason').setup()
|
||||||
require('mason-lspconfig').setup({
|
require('mason-lspconfig').setup({
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
'vtsls',
|
'vtsls',
|
||||||
'lua_ls',
|
'lua_ls',
|
||||||
'pylsp',
|
'pylsp',
|
||||||
'gopls',
|
|
||||||
'html',
|
'html',
|
||||||
'cssls',
|
'cssls',
|
||||||
'bashls',
|
|
||||||
},
|
},
|
||||||
automatic_enable = false,
|
automatic_enable = false,
|
||||||
})
|
})
|
||||||
|
require('mason-conform').setup()
|
||||||
|
|||||||
@@ -1,10 +1,3 @@
|
|||||||
vim.pack.add({
|
|
||||||
{
|
|
||||||
src = 'https://github.com/nvim-mini/mini.nvim.git',
|
|
||||||
version = vim.version.range('*'),
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
local hipatterns = require('mini.hipatterns')
|
local hipatterns = require('mini.hipatterns')
|
||||||
hipatterns.setup({
|
hipatterns.setup({
|
||||||
highlighters = {
|
highlighters = {
|
||||||
@@ -31,3 +24,4 @@ hipatterns.setup({
|
|||||||
|
|
||||||
require('mini.pairs').setup()
|
require('mini.pairs').setup()
|
||||||
require('mini.surround').setup()
|
require('mini.surround').setup()
|
||||||
|
require('mini.icons').setup()
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
vim.pack.add({'https://git.moomancer.xyz/DarthMooMancer/polydev.git' })
|
|
||||||
|
|
||||||
require('Polydev').setup()
|
|
||||||
@@ -1,33 +1,9 @@
|
|||||||
vim.pack.add({ 'https://github.com/folke/snacks.nvim' })
|
|
||||||
|
|
||||||
require('snacks').setup({
|
require('snacks').setup({
|
||||||
notifier = {
|
notifier = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
},
|
},
|
||||||
animate = { enabled = true },
|
animate = { enabled = true },
|
||||||
input = { enabled = true },
|
input = { enabled = true },
|
||||||
-- scroll = {
|
|
||||||
-- enabled = true,
|
|
||||||
-- animate = {
|
|
||||||
-- -- duration = { step = 5, total = 120 },
|
|
||||||
-- duration = { step = 2, total = 60 },
|
|
||||||
-- easing = 'linear',
|
|
||||||
-- },
|
|
||||||
-- -- faster animation when repeating scroll after delay
|
|
||||||
-- animate_repeat = {
|
|
||||||
-- -- delay = 100, -- delay in ms before using the repeat animation
|
|
||||||
-- delay = 40, -- delay in ms before using the repeat animation
|
|
||||||
-- -- duration = { step = 2, total = 40 },
|
|
||||||
-- duration = { step = 1, total = 20 },
|
|
||||||
-- easing = 'linear',
|
|
||||||
-- },
|
|
||||||
-- -- what buffers to animate
|
|
||||||
-- filter = function(buf)
|
|
||||||
-- return vim.g.snacks_scroll ~= false
|
|
||||||
-- and vim.b[buf].snacks_scroll ~= false
|
|
||||||
-- and vim.bo[buf].buftype ~= 'terminal'
|
|
||||||
-- end,
|
|
||||||
-- },
|
|
||||||
picker = {
|
picker = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
prompt = ' ',
|
prompt = ' ',
|
||||||
@@ -37,19 +13,26 @@ require('snacks').setup({
|
|||||||
selected = ' ',
|
selected = ' ',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
sources = {
|
|
||||||
files = {
|
|
||||||
layout = {
|
|
||||||
preview = false, -- This now ONLY applies to Snacks.picker.files()
|
|
||||||
},
|
},
|
||||||
|
dim = {
|
||||||
|
scope = {
|
||||||
|
min_size = 3, -- Lower minimum so short loops/branches don't get ignored
|
||||||
|
max_size = 40, -- Allow slightly larger blocks (functions/structs) to stay lit
|
||||||
|
siblings = false, -- Set to false so only the exact active scope is highlighted
|
||||||
|
},
|
||||||
|
animate = {
|
||||||
|
enabled = vim.fn.has('nvim-0.10') == 1,
|
||||||
|
easing = 'outCubic',
|
||||||
|
duration = {
|
||||||
|
step = 15, -- ms per step
|
||||||
|
total = 180, -- maximum duration
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
zen = {
|
zen = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
toggles = {
|
toggles = {
|
||||||
dim = false,
|
dim = true,
|
||||||
diagnostics = true,
|
diagnostics = true,
|
||||||
inlay_hints = false,
|
inlay_hints = false,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,24 +1,18 @@
|
|||||||
vim.pack.add({
|
local parsers = {
|
||||||
{
|
'json',
|
||||||
src = 'https://github.com/nvim-treesitter/nvim-treesitter',
|
|
||||||
build = ':TSUpdate',
|
|
||||||
},
|
|
||||||
{ src = 'https://github.com/windwp/nvim-ts-autotag' },
|
|
||||||
})
|
|
||||||
|
|
||||||
require('nvim-treesitter').install({
|
|
||||||
'rust',
|
'rust',
|
||||||
'c',
|
'c',
|
||||||
'cpp',
|
'cpp',
|
||||||
'lua',
|
'lua',
|
||||||
'javascript',
|
'javascript',
|
||||||
'go',
|
|
||||||
'typescript',
|
'typescript',
|
||||||
|
'tsx',
|
||||||
'css',
|
'css',
|
||||||
'html',
|
'html',
|
||||||
'python',
|
'python',
|
||||||
'yaml',
|
'yaml',
|
||||||
})
|
}
|
||||||
|
require('nvim-treesitter').install(parsers)
|
||||||
|
|
||||||
require('nvim-ts-autotag').setup({
|
require('nvim-ts-autotag').setup({
|
||||||
opts = {
|
opts = {
|
||||||
@@ -28,22 +22,16 @@ require('nvim-ts-autotag').setup({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local group = vim.api.nvim_create_augroup('UserTreesitter', { clear = true })
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
vim.api.nvim_create_autocmd('FileType', {
|
||||||
pattern = {
|
group = group,
|
||||||
'c',
|
desc = 'Start treesitter highlighting when a parser is installed',
|
||||||
'cpp',
|
callback = function(ev)
|
||||||
'rust',
|
local lang = vim.treesitter.language.get_lang(ev.match) or ev.match
|
||||||
'lua',
|
if not vim.treesitter.language.add(lang) then
|
||||||
'typescript',
|
return
|
||||||
'javascript',
|
end
|
||||||
'css',
|
vim.treesitter.start(ev.buf, lang)
|
||||||
'html',
|
|
||||||
'python',
|
|
||||||
'go',
|
|
||||||
'yaml',
|
|
||||||
},
|
|
||||||
callback = function()
|
|
||||||
vim.treesitter.start()
|
|
||||||
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
|
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
vim.pack.add({ 'https://github.com/folke/trouble.nvim' })
|
|
||||||
require('trouble').setup({})
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
vim.pack.add({
|
|
||||||
{ src = 'https://github.com/nvim-tree/nvim-web-devicons' },
|
|
||||||
{ src = 'https://github.com/alexghergh/nvim-tmux-navigation' },
|
|
||||||
|
|
||||||
{ src = 'https://github.com/brianhuster/live-preview.nvim' },
|
|
||||||
{ src = 'https://github.com/m4xshen/hardtime.nvim' },
|
|
||||||
})
|
|
||||||
|
|
||||||
require('nvim-tmux-navigation').setup({
|
|
||||||
disable_when_zoomed = true, -- defaults to false
|
|
||||||
})
|
|
||||||
|
|
||||||
require("hardtime").setup()
|
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
require('vern-nvim').setup({
|
||||||
|
workspace_root = '~/personal/Projects_Testing',
|
||||||
|
c = {
|
||||||
|
templates = {
|
||||||
|
extras = {
|
||||||
|
linter = {
|
||||||
|
enabled = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
@@ -1,89 +1,71 @@
|
|||||||
local D, a, S = require('nvim-web-devicons'), vim.api, vim.diagnostic.severity
|
local icon_cache = {}
|
||||||
local now, cur = (vim.uv or vim.loop).now, a.nvim_get_current_buf
|
|
||||||
local function cn(c)
|
|
||||||
return c.name
|
|
||||||
end
|
|
||||||
local R = function()
|
|
||||||
vim.cmd.redrawstatus()
|
|
||||||
end
|
|
||||||
local T, JOB, LAST = {}, nil, 0
|
|
||||||
|
|
||||||
local function snap(b)
|
local diagnostic_configs = {
|
||||||
local i, hl = D.get_icon(a.nvim_buf_get_name(b), nil, { default = true })
|
{ sev = vim.diagnostic.severity.ERROR, label = 'E', hl = 'DiagnosticError' },
|
||||||
local nm = i and ('%#' .. hl .. '#' .. i .. ' %*%t') or ' %t'
|
{ sev = vim.diagnostic.severity.WARN, label = 'W', hl = 'DiagnosticWarn' },
|
||||||
local x = vim.diagnostic.count(b)
|
{ sev = vim.diagnostic.severity.HINT, label = 'H', hl = 'DiagnosticHint' },
|
||||||
local e, w, h = x[S.ERROR] or 0, x[S.WARN] or 0, x[S.HINT] or 0
|
}
|
||||||
local dg = (e > 0 and '%#DiagnosticError#E' .. e .. '%* ' or '')
|
|
||||||
.. (w > 0 and '%#DiagnosticWarn#W' .. w .. '%* ' or '')
|
|
||||||
.. (h > 0 and '%#DiagnosticHint#H' .. h .. '%* ' or '')
|
|
||||||
local cs = vim.lsp.get_clients({ bufnr = b })
|
|
||||||
local rd = #cs > 0 and (' ' .. table.concat(vim.tbl_map(cn, cs), '/') .. ' ') or ''
|
|
||||||
return nm .. '%m%r %=' .. dg, rd
|
|
||||||
end
|
|
||||||
|
|
||||||
local function touch(b, redraw)
|
|
||||||
vim.b[b].d = true
|
|
||||||
if redraw then
|
|
||||||
R()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function sync(force)
|
|
||||||
local prev = JOB
|
|
||||||
JOB = nil
|
|
||||||
for _, t in pairs(T) do
|
|
||||||
local _, m = next(t)
|
|
||||||
if m then
|
|
||||||
JOB = m
|
|
||||||
break
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if JOB ~= prev and (force or now() - LAST >= 750) then
|
|
||||||
LAST = now()
|
|
||||||
R()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local G = a.nvim_create_augroup('STL5', { clear = true })
|
|
||||||
local function au(ev, cb)
|
|
||||||
a.nvim_create_autocmd(ev, { group = G, callback = cb })
|
|
||||||
end
|
|
||||||
|
|
||||||
au({ 'BufEnter', 'BufFilePost' }, function(e)
|
|
||||||
touch(e.buf, true)
|
|
||||||
end)
|
|
||||||
au('DiagnosticChanged', function(e)
|
|
||||||
touch(e.buf, e.buf == cur())
|
|
||||||
end)
|
|
||||||
au('FocusGained', R)
|
|
||||||
au({ 'LspAttach', 'LspDetach' }, function(e)
|
|
||||||
if e.event == 'LspDetach' then
|
|
||||||
T[e.data.client_id] = nil
|
|
||||||
sync(true)
|
|
||||||
end
|
|
||||||
touch(e.buf, true)
|
|
||||||
end)
|
|
||||||
au('LspProgress', function(e)
|
|
||||||
local v, id, tk = e.data.params.value, e.data.client_id, e.data.params.token or 'default'
|
|
||||||
T[id] = T[id] or {}
|
|
||||||
if v.kind == 'end' or (v.kind == 'report' and v.percentage == 100) then
|
|
||||||
T[id][tk] = nil
|
|
||||||
sync(true)
|
|
||||||
else
|
|
||||||
local title = (v.title and v.title ~= '') and v.title
|
|
||||||
local msg = (v.message and v.message ~= '') and v.message
|
|
||||||
T[id][tk] = (title and msg and title .. ' ' .. msg) or title or msg or 'Loading...'
|
|
||||||
sync()
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
function _G.Status()
|
function _G.Status()
|
||||||
local buf = vim.g.statusline_winid and a.nvim_win_get_buf(vim.g.statusline_winid) or a.nvim_get_current_buf()
|
local win = tonumber(vim.g.statusline_winid)
|
||||||
local v = vim.b[buf]
|
local buf = (win and vim.api.nvim_win_is_valid(win)) and vim.api.nvim_win_get_buf(win)
|
||||||
if not v.h or v.d then
|
or vim.api.nvim_get_current_buf()
|
||||||
v.h, v.r = snap(buf)
|
local bufname = vim.api.nvim_buf_get_name(buf)
|
||||||
v.stl, v.d = v.h .. v.r, nil
|
local display_path = vim.fn.fnamemodify(bufname, ':.')
|
||||||
|
if display_path == '' then
|
||||||
|
display_path = '[No Name]'
|
||||||
end
|
end
|
||||||
return JOB and (v.h .. '%#DiagnosticInfo#' .. JOB .. '%*') or v.stl
|
|
||||||
|
local ext = vim.fn.fnamemodify(bufname, ':e')
|
||||||
|
if ext == '' then
|
||||||
|
ext = display_path
|
||||||
end
|
end
|
||||||
|
local icon, hl = icon_cache[ext]
|
||||||
|
if not icon then
|
||||||
|
icon, hl = MiniIcons.get('file', display_path)
|
||||||
|
icon_cache[ext] = { icon, hl }
|
||||||
|
else
|
||||||
|
icon, hl = icon[1], icon[2]
|
||||||
|
end
|
||||||
|
|
||||||
|
local nm = (icon ~= '' and hl ~= '') and ('%#' .. hl .. '#' .. icon .. '%* ' .. display_path)
|
||||||
|
or (' ' .. display_path)
|
||||||
|
|
||||||
|
local counts = vim.diagnostic.count(buf)
|
||||||
|
local parts = {}
|
||||||
|
|
||||||
|
for _, cfg in ipairs(diagnostic_configs) do
|
||||||
|
local n = counts[cfg.sev]
|
||||||
|
if n and n > 0 then
|
||||||
|
parts[#parts + 1] = ('%%#%s#%s%d%%*'):format(cfg.hl, cfg.label, n)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local dg = #parts > 0 and (table.concat(parts, ' ') .. ' ') or ''
|
||||||
|
|
||||||
|
local clients = vim.lsp.get_clients({ bufnr = buf })
|
||||||
|
local lsp_clients = ''
|
||||||
|
if #clients > 0 then
|
||||||
|
local names = vim.tbl_map(function(c)
|
||||||
|
return c.name
|
||||||
|
end, clients)
|
||||||
|
lsp_clients = ' ' .. table.concat(names, '/') .. ' '
|
||||||
|
end
|
||||||
|
|
||||||
|
local lsp_progress = vim.lsp.status()
|
||||||
|
local progress_str = lsp_progress ~= '' and ('%#DiagnosticInfo#' .. lsp_progress .. '%* ') or ''
|
||||||
|
|
||||||
|
return nm .. '%m%r %=' .. dg .. lsp_clients .. progress_str
|
||||||
|
end
|
||||||
|
|
||||||
vim.opt.statusline = '%!v:lua.Status()'
|
vim.opt.statusline = '%!v:lua.Status()'
|
||||||
|
|
||||||
|
local augroup = vim.api.nvim_create_augroup('CustomStatusline', { clear = true })
|
||||||
|
vim.api.nvim_create_autocmd(
|
||||||
|
{ 'DiagnosticChanged', 'LspAttach', 'LspDetach', 'BufEnter', 'LspProgress' },
|
||||||
|
{
|
||||||
|
group = augroup,
|
||||||
|
callback = function()
|
||||||
|
vim.cmd.redrawstatus()
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|||||||
@@ -9,16 +9,12 @@
|
|||||||
"rev": "016802de402556da54c36bd7359b441266b01cdd",
|
"rev": "016802de402556da54c36bd7359b441266b01cdd",
|
||||||
"src": "https://github.com/stevearc/conform.nvim"
|
"src": "https://github.com/stevearc/conform.nvim"
|
||||||
},
|
},
|
||||||
"hardtime.nvim": {
|
"lazydev.nvim": {
|
||||||
"rev": "721a75b9a0c2eb1fb811d34507708ee315cb04eb",
|
"rev": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d",
|
||||||
"src": "https://github.com/m4xshen/hardtime.nvim"
|
"src": "https://github.com/folke/lazydev.nvim"
|
||||||
},
|
|
||||||
"kanso.nvim": {
|
|
||||||
"rev": "1afbbb449aa0254823dbe1932e3cbb51886ff9fe",
|
|
||||||
"src": "https://github.com/webhooked/kanso.nvim"
|
|
||||||
},
|
},
|
||||||
"live-preview.nvim": {
|
"live-preview.nvim": {
|
||||||
"rev": "a6307fa340ed7c0d96f5c567afc8c991aad94ce0",
|
"rev": "dad92ae9599f9b19a7dffe7d597d3376c110b818",
|
||||||
"src": "https://github.com/brianhuster/live-preview.nvim"
|
"src": "https://github.com/brianhuster/live-preview.nvim"
|
||||||
},
|
},
|
||||||
"mason-conform.nvim": {
|
"mason-conform.nvim": {
|
||||||
@@ -26,7 +22,7 @@
|
|||||||
"src": "https://git.moomancer.xyz/DarthMooMancer/mason-conform.nvim.git"
|
"src": "https://git.moomancer.xyz/DarthMooMancer/mason-conform.nvim.git"
|
||||||
},
|
},
|
||||||
"mason-lspconfig.nvim": {
|
"mason-lspconfig.nvim": {
|
||||||
"rev": "e17625cdc8c2650787467398e02c5d63a2cde966",
|
"rev": "a338f44149f5673882c32629697d67b0c0547aec",
|
||||||
"src": "https://github.com/mason-org/mason-lspconfig.nvim"
|
"src": "https://github.com/mason-org/mason-lspconfig.nvim"
|
||||||
},
|
},
|
||||||
"mason.nvim": {
|
"mason.nvim": {
|
||||||
@@ -39,7 +35,7 @@
|
|||||||
"version": ">=0.0.0"
|
"version": ">=0.0.0"
|
||||||
},
|
},
|
||||||
"nvim-lspconfig": {
|
"nvim-lspconfig": {
|
||||||
"rev": "c59fc922f718fa055f69f5f3bc888f23211571eb",
|
"rev": "77b7432d4770d23b277d37923e5a08a442d8bb07",
|
||||||
"src": "https://github.com/neovim/nvim-lspconfig"
|
"src": "https://github.com/neovim/nvim-lspconfig"
|
||||||
},
|
},
|
||||||
"nvim-tmux-navigation": {
|
"nvim-tmux-navigation": {
|
||||||
@@ -47,7 +43,7 @@
|
|||||||
"src": "https://github.com/alexghergh/nvim-tmux-navigation"
|
"src": "https://github.com/alexghergh/nvim-tmux-navigation"
|
||||||
},
|
},
|
||||||
"nvim-treesitter": {
|
"nvim-treesitter": {
|
||||||
"rev": "e289100ff98969e118c702199d88b764ce9e7fdf",
|
"rev": "a2f694478be07f89c2d03cc17858a8745a400c4b",
|
||||||
"src": "https://github.com/nvim-treesitter/nvim-treesitter"
|
"src": "https://github.com/nvim-treesitter/nvim-treesitter"
|
||||||
},
|
},
|
||||||
"nvim-ts-autotag": {
|
"nvim-ts-autotag": {
|
||||||
@@ -55,20 +51,16 @@
|
|||||||
"src": "https://github.com/windwp/nvim-ts-autotag"
|
"src": "https://github.com/windwp/nvim-ts-autotag"
|
||||||
},
|
},
|
||||||
"nvim-web-devicons": {
|
"nvim-web-devicons": {
|
||||||
"rev": "58447c1fca354bbf184425e4a8d01deecbd6f3c4",
|
"rev": "ec309a0eaff6ea967e58c275996155ab5c16938d",
|
||||||
"src": "https://github.com/nvim-tree/nvim-web-devicons"
|
"src": "https://github.com/nvim-tree/nvim-web-devicons"
|
||||||
},
|
},
|
||||||
"polydev": {
|
|
||||||
"rev": "2b30e36fade3272081f7166bc0ec614b0b7da1c9",
|
|
||||||
"src": "https://git.moomancer.xyz/DarthMooMancer/polydev.git"
|
|
||||||
},
|
|
||||||
"snacks.nvim": {
|
"snacks.nvim": {
|
||||||
"rev": "882c996cf28183f4d63640de0b4c02ec886d01f2",
|
"rev": "882c996cf28183f4d63640de0b4c02ec886d01f2",
|
||||||
"src": "https://github.com/folke/snacks.nvim"
|
"src": "https://github.com/folke/snacks.nvim"
|
||||||
},
|
},
|
||||||
"trouble.nvim": {
|
"tiny-inline-diagnostic.nvim": {
|
||||||
"rev": "bd67efe408d4816e25e8491cc5ad4088e708a69a",
|
"rev": "46ae9b3c8f3039e96ff4497d190ad0aee091f30d",
|
||||||
"src": "https://github.com/folke/trouble.nvim"
|
"src": "https://github.com/rachartier/tiny-inline-diagnostic.nvim"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
column_width = 120
|
column_width = 100
|
||||||
line_endings = "Unix"
|
line_endings = "Unix"
|
||||||
indent_type = "Tabs"
|
indent_type = "Tabs"
|
||||||
indent_width = 2
|
indent_width = 2
|
||||||
|
|||||||
Reference in New Issue
Block a user