Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
317fc7a53c | ||
|
|
db9c20378f | ||
|
|
e8eb46696d | ||
|
|
0a7fbc1b29 |
No files matched your search
@@ -8,6 +8,8 @@ brew "tmux"
|
||||
brew "fzf"
|
||||
brew "zoxide"
|
||||
brew "opencode"
|
||||
brew "colima"
|
||||
brew "docker"
|
||||
|
||||
# Utilities
|
||||
brew "ripgrep"
|
||||
@@ -25,10 +27,24 @@ cask "font-jetbrains-mono-nerd-font"
|
||||
|
||||
# Languages & Runtimes
|
||||
brew "python"
|
||||
|
||||
brew "cmake"
|
||||
brew "clang-format"
|
||||
|
||||
brew "node"
|
||||
brew "vtsls"
|
||||
brew "vscode-langservers-extracted"
|
||||
brew "prettier"
|
||||
|
||||
brew "go"
|
||||
brew "gopls"
|
||||
brew "goimports"
|
||||
|
||||
brew "uv"
|
||||
|
||||
brew "lua"
|
||||
brew "lua-language-server"
|
||||
brew "stylua"
|
||||
|
||||
brew "bun"
|
||||
brew "tree-sitter-cli"
|
||||
@@ -1,6 +1,6 @@
|
||||
theme = kanso-zen
|
||||
# theme = koda-dark
|
||||
font-family = "JetBrainsMono Nerd Font Medium"
|
||||
font-thicken = true
|
||||
font-size = 14
|
||||
|
||||
scrollback-limit-bytes = 10000
|
||||
@@ -10,6 +10,6 @@ macos-option-as-alt = true
|
||||
title = " "
|
||||
confirm-close-surface = false
|
||||
window-padding-x = 5
|
||||
window-padding-y = 5, 0
|
||||
window-padding-y = 2
|
||||
mouse-hide-while-typing = true
|
||||
copy-on-select = clipboard
|
||||
@@ -1,4 +1,5 @@
|
||||
palette = 0=#090E13
|
||||
# palette = 0=#090E13
|
||||
palette = 0=#0E0E0E
|
||||
palette = 1=#c4746e
|
||||
palette = 2=#8a9a7b
|
||||
palette = 3=#c4b28a
|
||||
@@ -15,7 +16,8 @@ palette = 13=#938aa9
|
||||
palette = 14=#7aa89f
|
||||
palette = 15=#c5c9c7
|
||||
|
||||
background = #090E13
|
||||
# background = #090E13
|
||||
background = #0E0E0E
|
||||
foreground = #c5c9c7
|
||||
cursor-color = #c5c9c7
|
||||
selection-background = #22262D
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
# Forces bold text to use the bright color palette
|
||||
bold-is-bright = true
|
||||
|
||||
# Background and foreground
|
||||
# background = #101010
|
||||
background = #0E0E0E
|
||||
foreground = #ffffff
|
||||
|
||||
# Cursor colors
|
||||
cursor-color = #b0b0b0
|
||||
cursor-text = #101010
|
||||
|
||||
# Selection colors
|
||||
selection-background = #272727
|
||||
selection-foreground = #b0b0b0
|
||||
|
||||
# ANSI color palette (0-15)
|
||||
# palette = 0=#101010
|
||||
palette = 0=#0E0E0E
|
||||
palette = 1=#ff7676
|
||||
palette = 2=#a3d6a3
|
||||
palette = 3=#ffffff
|
||||
palette = 4=#b3b3b3
|
||||
palette = 5=#f4b8e4
|
||||
palette = 6=#fafafa
|
||||
palette = 7=#a5adce
|
||||
palette = 8=#50585d
|
||||
palette = 9=#ff5733
|
||||
palette = 10=#86cd82
|
||||
palette = 11=#d9ba73
|
||||
palette = 12=#ffffff
|
||||
palette = 13=#f2a4db
|
||||
palette = 14=#5abfb5
|
||||
palette = 15=#b5bfe2
|
||||
@@ -1,4 +0,0 @@
|
||||
vim.opt_local.tabstop = 8
|
||||
vim.opt_local.shiftwidth = 8
|
||||
vim.opt_local.softtabstop = 0
|
||||
vim.opt_local.expandtab = false
|
||||
@@ -1,4 +0,0 @@
|
||||
vim.opt_local.tabstop = 8
|
||||
vim.opt_local.shiftwidth = 8
|
||||
vim.opt_local.softtabstop = 0
|
||||
vim.opt_local.expandtab = false
|
||||
@@ -1 +0,0 @@
|
||||
vim.opt_local.tabstop = 4
|
||||
@@ -54,7 +54,7 @@ vim.api.nvim_set_hl(0, 'Normal', { fg = palette.fg0, bg = palette.bg0 })
|
||||
vim.api.nvim_set_hl(0, 'NormalFloat', { fg = palette.gray0, bg = palette.bg1 })
|
||||
|
||||
vim.api.nvim_set_hl(0, 'FloatBorder', { fg = palette.gray4, bg = palette.bg1 })
|
||||
vim.api.nvim_set_hl(0, 'FloatTitle', { fg = palette.gray0, bg = palette.bg1, bold = true })
|
||||
vim.api.nvim_set_hl(0, 'FloatTitle', { link = 'NormalFloat', bold = true })
|
||||
vim.api.nvim_set_hl(0, 'FloatFooter', { fg = palette.gray3, bg = palette.bg1 })
|
||||
vim.api.nvim_set_hl(0, 'Pmenu', { link = 'NormalFloat' })
|
||||
vim.api.nvim_set_hl(0, 'PmenuSel', { fg = palette.none, bg = palette.gray4 })
|
||||
|
||||
@@ -0,0 +1,266 @@
|
||||
vim.cmd('highlight clear')
|
||||
if vim.fn.exists('syntax_on') then
|
||||
vim.cmd.syntax('reset')
|
||||
end
|
||||
vim.o.background = 'dark'
|
||||
vim.g.colors_name = 'minikoda-dark'
|
||||
|
||||
local palette = {
|
||||
bg = '#101010',
|
||||
fg = '#b0b0b0',
|
||||
dim = '#474747',
|
||||
line = '#272727',
|
||||
keyword = '#777777',
|
||||
type = '#777777',
|
||||
operator = '#777777',
|
||||
comment = '#50585d',
|
||||
|
||||
border = '#3E4447',
|
||||
emphasis = '#ffffff',
|
||||
func = '#ffffff',
|
||||
string = '#ffffff',
|
||||
char = '#ffffff',
|
||||
special = '#ffffff',
|
||||
|
||||
const = '#d9ba73',
|
||||
highlight = '#458ee6',
|
||||
info = '#8ebeec',
|
||||
success = '#86cd82',
|
||||
warning = '#d9ba73',
|
||||
danger = '#ff7676',
|
||||
green = '#14ba19',
|
||||
orange = '#ff5733',
|
||||
red = '#701516',
|
||||
pink = '#f2a4db',
|
||||
cyan = '#5abfb5',
|
||||
}
|
||||
|
||||
local hl = vim.api.nvim_set_hl
|
||||
local groups = {
|
||||
-- Base / UI (flat surfaces, like Koda)
|
||||
Normal = { fg = palette.fg, bg = palette.bg },
|
||||
NormalFloat = { link = 'Normal' },
|
||||
FloatBorder = { fg = palette.border, bg = palette.bg },
|
||||
Cursor = { fg = palette.bg, bg = palette.fg },
|
||||
TermCursor = { link = 'Cursor' },
|
||||
lCursor = { link = 'Cursor' },
|
||||
CursorIM = { link = 'Cursor' },
|
||||
CursorColumn = { bg = palette.line },
|
||||
CursorLine = { bg = palette.line },
|
||||
ColorColumn = { bg = palette.line },
|
||||
CursorLineNr = { fg = palette.emphasis, bold = true },
|
||||
LineNr = { fg = palette.comment },
|
||||
StatusLine = { fg = palette.fg, bg = palette.line },
|
||||
StatusLineNC = { fg = palette.comment, bg = palette.line },
|
||||
StatusLineTerm = { link = 'StatusLine' },
|
||||
StatusLineTermNC = { link = 'StatusLineNC' },
|
||||
WinBar = { link = 'Normal' },
|
||||
WinBarNC = { link = 'Normal' },
|
||||
WinSeparator = { fg = palette.border },
|
||||
Pmenu = { bg = palette.bg },
|
||||
PmenuSel = { fg = palette.fg, bg = palette.line, bold = true },
|
||||
PmenuThumb = { bg = palette.fg },
|
||||
PmenuMatch = { fg = palette.const, bold = true },
|
||||
Visual = { bg = palette.line },
|
||||
Search = { link = 'Visual' },
|
||||
CurSearch = { link = 'DiffChange' },
|
||||
IncSearch = { link = 'CurSearch' },
|
||||
Substitute = { link = 'DiffAdd' },
|
||||
MatchParen = { fg = palette.special, bold = true },
|
||||
NonText = { fg = palette.dim },
|
||||
EndOfBuffer = { fg = palette.line },
|
||||
Question = { fg = palette.const },
|
||||
MoreMsg = { link = 'Question' },
|
||||
ErrorMsg = { fg = palette.danger },
|
||||
WarningMsg = { link = 'Question' },
|
||||
ModeMsg = { link = 'Question' },
|
||||
MsgSeparator = { fg = palette.fg },
|
||||
Directory = { fg = palette.emphasis },
|
||||
QuickFixLine = { fg = palette.const, underline = true },
|
||||
qfLineNr = { fg = palette.comment },
|
||||
SpecialKey = { fg = palette.comment },
|
||||
TabLineSel = { fg = palette.emphasis, bg = palette.line },
|
||||
Title = { fg = palette.emphasis, bold = true },
|
||||
DiffAdd = { fg = palette.success, bg = palette.diff_add_bg },
|
||||
DiffChange = { fg = palette.warning, bg = palette.diff_change_bg },
|
||||
DiffDelete = { fg = palette.danger, bg = palette.diff_delete_bg },
|
||||
DiffText = { fg = palette.warning, bg = palette.diff_text_bg },
|
||||
|
||||
-- Syntax (Koda's grayscale spine, tinted with Kanso hues)
|
||||
Comment = { fg = palette.comment },
|
||||
Constant = { fg = palette.const },
|
||||
String = { fg = palette.string },
|
||||
Character = { fg = palette.char },
|
||||
Number = { fg = palette.const },
|
||||
Boolean = { fg = palette.const },
|
||||
Float = { fg = palette.const },
|
||||
Identifier = { fg = palette.emphasis },
|
||||
Function = { fg = palette.func, bold = true },
|
||||
Keyword = { fg = palette.keyword },
|
||||
Statement = { fg = palette.keyword },
|
||||
Conditional = { link = 'Keyword' },
|
||||
Repeat = { link = 'Keyword' },
|
||||
Label = { fg = palette.keyword },
|
||||
Operator = { fg = palette.operator },
|
||||
Exception = { link = 'Keyword' },
|
||||
PreProc = { fg = palette.fg },
|
||||
Include = { link = 'Keyword' },
|
||||
Define = { link = 'Keyword' },
|
||||
Macro = { link = 'Constant' },
|
||||
PreCondit = { link = 'Keyword' },
|
||||
Type = { fg = palette.type },
|
||||
StorageClass = { link = 'Keyword' },
|
||||
Structure = { link = 'Keyword' },
|
||||
Typedef = { link = 'Keyword' },
|
||||
Special = { fg = palette.special },
|
||||
SpecialChar = { link = 'Special' },
|
||||
Tag = { fg = palette.fg },
|
||||
Delimiter = { fg = palette.type },
|
||||
SpecialComment = { link = 'Comment' },
|
||||
Debug = { link = 'Constant' },
|
||||
Underlined = { underline = true },
|
||||
Error = { fg = palette.danger },
|
||||
Added = { fg = palette.success },
|
||||
Changed = { fg = palette.warning },
|
||||
Removed = { fg = palette.danger },
|
||||
|
||||
-- Treesitter (Koda's explicit mapping, muted values)
|
||||
['@variable'] = { fg = palette.fg },
|
||||
['@variable.builtin'] = { link = 'Constant' },
|
||||
['@variable.parameter'] = { fg = palette.fg },
|
||||
['@variable.parameter.builtin'] = { fg = palette.fg },
|
||||
['@variable.member'] = { fg = palette.fg },
|
||||
['@constant'] = { link = 'Constant' },
|
||||
['@constant.macro'] = { link = 'Constant' },
|
||||
['@constant.builtin'] = { link = 'Constant' },
|
||||
['@module'] = { fg = palette.fg },
|
||||
['@module.builtin'] = { link = 'Special' },
|
||||
['@label'] = { link = 'Structure' },
|
||||
['@string'] = { link = 'String' },
|
||||
['@string.documentation'] = { link = 'Comment' },
|
||||
['@string.regexp'] = { link = 'String' },
|
||||
['@string.escape'] = { link = 'Special' },
|
||||
['@string.special'] = { link = 'Special' },
|
||||
['@string.special.symbol'] = { link = 'Special' },
|
||||
['@string.special.path'] = { link = 'Special' },
|
||||
['@string.special.url'] = { link = 'Underlined' },
|
||||
['@character'] = { link = 'Character' },
|
||||
['@character.special'] = { fg = palette.special },
|
||||
['@boolean'] = { link = 'Boolean' },
|
||||
['@number'] = { link = 'Number' },
|
||||
['@number.float'] = { link = 'Number' },
|
||||
['@type'] = { link = 'Type' },
|
||||
['@type.builtin'] = { link = 'Type' },
|
||||
['@type.definition'] = { fg = palette.fg },
|
||||
['@attribute'] = { link = 'Keyword' },
|
||||
['@attribute.builtin'] = { link = 'Keyword' },
|
||||
['@property'] = { fg = palette.fg },
|
||||
['@function'] = { link = 'Function' },
|
||||
['@function.builtin'] = { link = 'Function' },
|
||||
['@function.call'] = { link = 'Function' },
|
||||
['@function.macro'] = { link = 'Macro' },
|
||||
['@function.method'] = { link = 'Function' },
|
||||
['@function.method.call'] = { link = 'Function' },
|
||||
['@constructor'] = { fg = palette.fg },
|
||||
['@operator'] = { link = 'Operator' },
|
||||
['@keyword'] = { link = 'Keyword' },
|
||||
['@keyword.coroutine'] = { link = 'Keyword' },
|
||||
['@keyword.function'] = { link = 'Keyword' },
|
||||
['@keyword.operator'] = { link = 'Operator' },
|
||||
['@keyword.import'] = { link = 'Include' },
|
||||
['@keyword.type'] = { link = 'Keyword' },
|
||||
['@keyword.modifier'] = { link = 'Keyword' },
|
||||
['@keyword.repeat'] = { link = 'Repeat' },
|
||||
['@keyword.return'] = { fg = palette.emphasis },
|
||||
['@keyword.debug'] = { link = 'Keyword' },
|
||||
['@keyword.exception'] = { link = 'Exception' },
|
||||
['@keyword.conditional'] = { link = 'Conditional' },
|
||||
['@keyword.conditional.ternary'] = { link = 'Conditional' },
|
||||
['@keyword.directive'] = { link = 'Keyword' },
|
||||
['@keyword.directive.define'] = { link = 'Keyword' },
|
||||
['@punctuation'] = { link = 'Keyword' },
|
||||
['@punctuation.delimiter'] = { link = 'Delimiter' },
|
||||
['@punctuation.bracket'] = { fg = palette.fg },
|
||||
['@punctuation.special'] = { fg = palette.fg },
|
||||
['@comment'] = { link = 'Comment' },
|
||||
['@comment.documentation'] = { link = 'Comment' },
|
||||
['@comment.error'] = { fg = palette.danger },
|
||||
['@comment.warning'] = { fg = palette.warning },
|
||||
['@comment.todo'] = { fg = palette.info },
|
||||
['@comment.note'] = { fg = palette.emphasis },
|
||||
['@markup.strong'] = { bold = true },
|
||||
['@markup.italic'] = { italic = true },
|
||||
['@markup.strikethrough'] = { fg = palette.danger, strikethrough = true },
|
||||
['@markup.underline'] = { underline = true },
|
||||
['@markup.heading'] = { fg = palette.emphasis, bold = true },
|
||||
['@markup.heading.gitcommit'] = { fg = palette.fg },
|
||||
['@markup.heading.1.markdown'] = { link = '@markup.heading' },
|
||||
['@markup.heading.2.markdown'] = { link = '@markup.heading' },
|
||||
['@markup.heading.3.markdown'] = { link = '@markup.heading' },
|
||||
['@markup.heading.4.markdown'] = { link = '@markup.heading' },
|
||||
['@markup.heading.5.markdown'] = { link = '@markup.heading' },
|
||||
['@markup.heading.6.markdown'] = { link = '@markup.heading' },
|
||||
['@markup.quote'] = { link = 'Comment' },
|
||||
['@markup.math'] = { link = 'Special' },
|
||||
['@markup.link'] = { fg = palette.emphasis, underline = true },
|
||||
['@markup.link.label'] = { fg = palette.emphasis, underline = false },
|
||||
['@markup.link.url'] = { fg = palette.info, underline = true },
|
||||
['@markup.raw'] = { fg = palette.const },
|
||||
['@markup.raw.block'] = { fg = palette.const },
|
||||
['@markup.list'] = { fg = palette.emphasis },
|
||||
['@markup.list.checked'] = { fg = palette.success },
|
||||
['@markup.list.unchecked'] = { fg = palette.danger },
|
||||
['@diff.plus'] = { link = 'DiffAdd' },
|
||||
['@diff.minus'] = { link = 'DiffDelete' },
|
||||
['@diff.delta'] = { link = 'DiffChange' },
|
||||
['@tag'] = { link = 'Keyword' },
|
||||
['@tag.builtin'] = { fg = palette.fg },
|
||||
['@tag.delimiter'] = { link = 'Keyword' },
|
||||
['@tag.attribute'] = { link = 'Keyword' },
|
||||
|
||||
-- Diagnostics / LSP (where color is allowed)
|
||||
DiagnosticError = { fg = palette.danger },
|
||||
DiagnosticWarn = { fg = palette.warning },
|
||||
DiagnosticInfo = { fg = palette.info },
|
||||
DiagnosticHint = { fg = palette.cyan },
|
||||
DiagnosticOk = { fg = palette.success },
|
||||
DiagnosticUnderlineError = { undercurl = true, sp = palette.danger },
|
||||
DiagnosticUnderlineWarn = { undercurl = true, sp = palette.warning },
|
||||
DiagnosticUnderlineInfo = { undercurl = true, sp = palette.info },
|
||||
DiagnosticUnderlineHint = { undercurl = true, sp = palette.cyan },
|
||||
DiagnosticUnderlineOk = { undercurl = true, sp = palette.success },
|
||||
LspInlayHint = { fg = palette.comment },
|
||||
['@lsp.type.comment'] = {}, -- use treesitter styles
|
||||
['@lsp.type.lifetime'] = { fg = palette.const },
|
||||
['@lsp.type.modifier'] = { link = 'Keyword' },
|
||||
['@lsp.type.struct'] = { fg = palette.fg },
|
||||
['@lsp.typemod.namespace.attribute'] = { link = 'Keyword' },
|
||||
['@lsp.typemod.interface.declaration'] = { fg = palette.fg },
|
||||
['@lsp.typemod.interface.public'] = { fg = palette.fg },
|
||||
['@lsp.typemod.struct.declaration'] = { fg = palette.fg },
|
||||
['@lsp.typemod.enum.declaration'] = { fg = palette.fg },
|
||||
['@lsp.typemod.type.declaration'] = { fg = palette.fg },
|
||||
['@lsp.typemod.class.declaration'] = { fg = palette.fg },
|
||||
['@lsp.typemod.class.globalScope'] = { fg = palette.fg },
|
||||
['@lsp.typemod.generic.attribute'] = { fg = palette.fg },
|
||||
['@lsp.typemod.variable.defaultLibrary'] = { link = '@variable.builtin' },
|
||||
|
||||
-- Plugin groups you actually use
|
||||
BlinkCmpLabelMatch = { fg = palette.const },
|
||||
MiniPickMatchRanges = { fg = palette.const },
|
||||
MiniStatuslineModeNormal = { fg = palette.bg, bg = palette.fg },
|
||||
MiniJump2dSpot = { fg = palette.fg, bg = palette.line, bold = true },
|
||||
MiniIconsGrey = { fg = palette.fg },
|
||||
MiniIconsAzure = { fg = palette.emphasis },
|
||||
MiniIconsBlue = { fg = palette.info },
|
||||
MiniIconsCyan = { fg = palette.info },
|
||||
MiniIconsGreen = { fg = palette.success },
|
||||
MiniIconsOrange = { fg = palette.warning },
|
||||
MiniIconsPurple = { fg = palette.pink },
|
||||
MiniIconsRed = { fg = palette.danger },
|
||||
MiniIconsYellow = { fg = palette.const },
|
||||
}
|
||||
|
||||
for name, spec in pairs(groups) do
|
||||
hl(0, name, spec)
|
||||
end
|
||||
@@ -0,0 +1,129 @@
|
||||
local c = {
|
||||
bg = '#0e0e0e',
|
||||
bg_alt = '#191919',
|
||||
fg = '#eeeeee',
|
||||
gray1 = '#222222',
|
||||
gray2 = '#353535',
|
||||
gray3 = '#494949',
|
||||
gray4 = '#5e5e5e',
|
||||
gray6 = '#8b8b8b',
|
||||
gray7 = '#a3a3a3',
|
||||
gray8 = '#bbbbbb',
|
||||
gray9 = '#d4d4d4',
|
||||
bright_blue = '#c9e6fd',
|
||||
faded_blue = '#8abae1',
|
||||
neutral_red = '#eca8a8',
|
||||
neutral_green = '#ccd389',
|
||||
neutral_blue = '#a5c6e1',
|
||||
orange = '#b6927b',
|
||||
green = '#8a9a7b',
|
||||
purple = '#a292a3',
|
||||
}
|
||||
|
||||
if vim.o.background == 'light' then
|
||||
c.bg = '#f7f7f7'
|
||||
c.bg_alt = '#e8e8e8'
|
||||
c.fg = '#111111'
|
||||
c.gray1 = '#d8d8d8'
|
||||
c.gray2 = '#a8a8a8'
|
||||
c.gray3 = '#7a7a7a'
|
||||
c.gray4 = '#626262'
|
||||
c.gray6 = '#3d3d3d'
|
||||
c.gray7 = '#2e2e2e'
|
||||
c.gray8 = '#1f1f1f'
|
||||
c.gray9 = '#0a0a0a'
|
||||
c.bright_blue = '#2a2a2a'
|
||||
c.faded_blue = '#4a4a4a'
|
||||
c.neutral_red = '#111111'
|
||||
c.neutral_green = '#2b2b2b'
|
||||
c.neutral_blue = '#555555'
|
||||
c.orange = '#3a3a3a'
|
||||
c.green = '#9a9a9a'
|
||||
c.purple = '#1f1f1f'
|
||||
end
|
||||
|
||||
vim.api.nvim_command('hi clear')
|
||||
if vim.fn.exists('syntax_on') then
|
||||
vim.api.nvim_command('syntax reset')
|
||||
end
|
||||
vim.g.colors_name = 'minimal'
|
||||
|
||||
-- Core
|
||||
vim.api.nvim_set_hl(0, 'Normal', { fg = c.fg, bg = c.bg })
|
||||
vim.api.nvim_set_hl(0, 'Visual', { fg = c.bg, bg = c.fg })
|
||||
vim.api.nvim_set_hl(0, 'Cursor', { fg = c.bg, bg = c.fg })
|
||||
vim.api.nvim_set_hl(0, 'CursorColumn', { fg = c.fg })
|
||||
vim.api.nvim_set_hl(0, 'CursorLine', { bg = c.bg_alt })
|
||||
vim.api.nvim_set_hl(0, 'ColorColumn', { bg = c.bg_alt })
|
||||
vim.api.nvim_set_hl(0, 'Conceal', { fg = c.gray2 })
|
||||
vim.api.nvim_set_hl(0, 'LineNr', { fg = c.gray3 })
|
||||
vim.api.nvim_set_hl(0, 'CursorLineNr', { fg = c.gray8, bg = c.bg_alt })
|
||||
vim.api.nvim_set_hl(0, 'VertSplit', { fg = c.bg, bg = c.bg })
|
||||
vim.api.nvim_set_hl(0, 'IncSearch', { fg = c.bg, bg = c.bright_blue, bold = true })
|
||||
vim.api.nvim_set_hl(0, 'Search', { fg = c.bg, bg = c.faded_blue })
|
||||
vim.api.nvim_set_hl(0, 'MatchParen', { bold = true })
|
||||
vim.api.nvim_set_hl(0, 'Pmenu', { fg = c.fg, bg = c.gray1 })
|
||||
vim.api.nvim_set_hl(0, 'PmenuSel', { fg = c.gray1, bg = c.fg })
|
||||
vim.api.nvim_set_hl(0, 'PmenuSbar', { fg = c.fg, bg = c.gray1 })
|
||||
vim.api.nvim_set_hl(0, 'PmenuThumb', { fg = c.bg, bg = c.gray8 })
|
||||
vim.api.nvim_set_hl(0, 'Todo', { fg = c.purple, bold = true })
|
||||
vim.api.nvim_set_hl(0, 'SpellBad', { fg = c.orange, underline = true })
|
||||
vim.api.nvim_set_hl(0, 'Substitute', { fg = c.orange, bold = true, reverse = true })
|
||||
vim.api.nvim_set_hl(0, 'ErrorMsg', { reverse = true })
|
||||
vim.api.nvim_set_hl(0, 'NonText', { fg = c.green })
|
||||
vim.api.nvim_set_hl(0, 'Whitespace', { fg = c.gray2 })
|
||||
|
||||
vim.api.nvim_set_hl(0, 'WinSeparator', { fg = c.gray3, bg = c.bg })
|
||||
vim.api.nvim_set_hl(0, 'StatusLine', { fg = c.fg, bg = c.bg_alt })
|
||||
vim.api.nvim_set_hl(0, 'StatusLineNC', { fg = c.gray6, bg = c.bg_alt })
|
||||
vim.api.nvim_set_hl(0, 'FloatBorder', { fg = c.gray3, bg = c.bg })
|
||||
|
||||
vim.api.nvim_set_hl(0, 'DiffAdd', { fg = c.neutral_green })
|
||||
vim.api.nvim_set_hl(0, 'DiffChange', { fg = c.neutral_blue })
|
||||
vim.api.nvim_set_hl(0, 'DiffDelete', { fg = c.neutral_red })
|
||||
vim.api.nvim_set_hl(0, 'DiffText', { fg = c.neutral_blue })
|
||||
|
||||
vim.api.nvim_set_hl(0, 'Comment', { fg = c.gray3, italic = true })
|
||||
vim.api.nvim_set_hl(0, 'Constant', { fg = c.fg })
|
||||
vim.api.nvim_set_hl(0, 'Define', { fg = c.gray3 })
|
||||
vim.api.nvim_set_hl(0, 'Delimiter', { fg = c.fg })
|
||||
vim.api.nvim_set_hl(0, 'Error', { underline = true, italic = true })
|
||||
vim.api.nvim_set_hl(0, 'Exception', { underline = true, bold = true })
|
||||
vim.api.nvim_set_hl(0, 'Function', { fg = c.gray6 })
|
||||
vim.api.nvim_set_hl(0, 'Identifier', { fg = c.gray8 })
|
||||
vim.api.nvim_set_hl(0, 'Include', { fg = c.gray7 })
|
||||
vim.api.nvim_set_hl(0, 'Keyword', { fg = c.gray4 })
|
||||
vim.api.nvim_set_hl(0, 'Conditional', { fg = c.gray4 })
|
||||
vim.api.nvim_set_hl(0, 'Repeat', { fg = c.gray4 })
|
||||
vim.api.nvim_set_hl(0, 'Label', { fg = c.fg })
|
||||
vim.api.nvim_set_hl(0, 'Macro', { fg = c.gray6 })
|
||||
vim.api.nvim_set_hl(0, 'Number', { fg = c.fg, bold = true })
|
||||
vim.api.nvim_set_hl(0, 'Boolean', { fg = c.fg, bold = true })
|
||||
vim.api.nvim_set_hl(0, 'Float', { fg = c.fg, bold = true })
|
||||
vim.api.nvim_set_hl(0, 'Operator', { fg = c.fg })
|
||||
vim.api.nvim_set_hl(0, 'SpecialChar', { fg = c.gray9 })
|
||||
vim.api.nvim_set_hl(0, 'String', { fg = c.gray9 })
|
||||
vim.api.nvim_set_hl(0, 'Character', { fg = c.fg })
|
||||
vim.api.nvim_set_hl(0, 'Tag', { fg = c.fg })
|
||||
vim.api.nvim_set_hl(0, 'Type', { fg = c.gray4 })
|
||||
vim.api.nvim_set_hl(0, 'Underlined', { underline = true })
|
||||
vim.api.nvim_set_hl(0, 'Bold', { bold = true })
|
||||
vim.api.nvim_set_hl(0, 'Italic', { italic = true })
|
||||
vim.api.nvim_set_hl(0, 'Statement', { fg = c.gray6 })
|
||||
vim.api.nvim_set_hl(0, 'healthError', { bold = true })
|
||||
vim.api.nvim_set_hl(0, 'healthWarning', { bold = true })
|
||||
|
||||
vim.api.nvim_set_hl(0, '@variable', { fg = c.gray8 })
|
||||
vim.api.nvim_set_hl(0, '@variable.parameter', { fg = c.gray8 })
|
||||
|
||||
local cleared = vim.trim([[
|
||||
SpellCap SpellLocal SpellRare
|
||||
ModeMsg MoreMsg
|
||||
Directory EndOfBuffer FoldColumn Folded Question SignColumn SpecialKey
|
||||
TabLine TabLineFill WarningMsg Ignore PreProc Special
|
||||
qfLineNr PmenuSelBold NormalFloat QuickFixLine Debug debugBreakpoint PreCondit
|
||||
Structure Title
|
||||
]])
|
||||
for group in vim.gsplit(cleared, '%s+') do
|
||||
vim.api.nvim_set_hl(0, group, {})
|
||||
end
|
||||
+295
-5
@@ -10,7 +10,7 @@ vim.opt.undofile = true
|
||||
vim.opt.swapfile = false
|
||||
|
||||
vim.opt.termguicolors = true
|
||||
vim.opt.signcolumn = 'yes'
|
||||
-- vim.opt.signcolumn = 'yes'
|
||||
vim.opt.wrap = false
|
||||
vim.opt.confirm = true
|
||||
|
||||
@@ -25,11 +25,301 @@ vim.opt.expandtab = true
|
||||
vim.diagnostic.config({
|
||||
virtual_text = true,
|
||||
severity_sort = true,
|
||||
signs = false,
|
||||
})
|
||||
|
||||
require('DarthMooMancer.plugins')
|
||||
vim.g.loaded_node_provider = 0
|
||||
vim.g.loaded_perl_provider = 0
|
||||
vim.g.loaded_python3_provider = 0
|
||||
vim.g.loaded_ruby_provider = 0
|
||||
|
||||
vim.cmd.colorscheme('minikanso-zen')
|
||||
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/stevearc/conform.nvim' },
|
||||
{ src = 'https://github.com/saghen/blink.cmp', version = vim.version.range('*') },
|
||||
{ src = 'https://git.moomancer.xyz/DarthMooMancer/vern-nvim.git' },
|
||||
})
|
||||
|
||||
require('DarthMooMancer.keymaps')
|
||||
require('DarthMooMancer.lsp')
|
||||
-- vim.cmd.colorscheme('minikanso-zen')
|
||||
-- vim.cmd.colorscheme('minikoda-dark')
|
||||
-- vim.o.background = 'light'
|
||||
vim.cmd.colorscheme('minimal')
|
||||
|
||||
vim.api.nvim_create_user_command('Theme', function(opts)
|
||||
local mode = opts.args
|
||||
if mode == '' or mode == 'toggle' then
|
||||
mode = vim.o.background == 'light' and 'dark' or 'light'
|
||||
end
|
||||
vim.o.background = mode
|
||||
end, {
|
||||
nargs = '?',
|
||||
complete = function()
|
||||
return { 'light', 'dark', 'toggle' }
|
||||
end,
|
||||
})
|
||||
vim.keymap.set('n', '<leader>t', ':Theme<CR>', { desc = 'Toggle light/dark theme' })
|
||||
|
||||
local parsers = {
|
||||
'lua',
|
||||
'luadoc',
|
||||
'vim',
|
||||
'vimdoc',
|
||||
'query',
|
||||
|
||||
'go',
|
||||
'gomod',
|
||||
'c',
|
||||
'cpp',
|
||||
'javascript',
|
||||
'typescript',
|
||||
'tsx',
|
||||
'html',
|
||||
'css',
|
||||
|
||||
'json',
|
||||
'yaml',
|
||||
'toml',
|
||||
'bash',
|
||||
}
|
||||
|
||||
local group = vim.api.nvim_create_augroup('UserTreesitter', { clear = true })
|
||||
local ft_indent = {
|
||||
c = { tabstop = 8, shiftwidth = 8, softtabstop = 0, expandtab = false },
|
||||
cpp = { tabstop = 8, shiftwidth = 8, softtabstop = 0, expandtab = false },
|
||||
go = { tabstop = 4 },
|
||||
}
|
||||
|
||||
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',
|
||||
pattern = '*',
|
||||
callback = function(ev)
|
||||
if vim.bo[ev.buf].buftype ~= '' then
|
||||
return
|
||||
end
|
||||
|
||||
if pcall(vim.treesitter.start, ev.buf) then
|
||||
vim.bo[ev.buf].indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
|
||||
end
|
||||
|
||||
for k, v in pairs(ft_indent[ev.match] or {}) do
|
||||
vim.bo[ev.buf][k] = v
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
require('mini.pairs').setup()
|
||||
require('mini.icons').setup()
|
||||
require('mini.notify').setup()
|
||||
require('mini.input').setup()
|
||||
require('mini.pick').setup()
|
||||
local hipatterns = require('mini.hipatterns')
|
||||
hipatterns.setup({
|
||||
highlighters = {
|
||||
hex_color = hipatterns.gen_highlighter.hex_color(),
|
||||
},
|
||||
})
|
||||
|
||||
local conform = require('conform')
|
||||
conform.setup({
|
||||
formatters_by_ft = {
|
||||
lua = { 'stylua' },
|
||||
c = { 'clang-format' },
|
||||
cpp = { 'clang-format' },
|
||||
go = { 'goimports' },
|
||||
|
||||
javascript = { 'prettier' },
|
||||
typescript = { 'prettier' },
|
||||
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()"
|
||||
|
||||
require('vern-nvim').setup({
|
||||
env = {
|
||||
author = 'DarthMooMancer',
|
||||
},
|
||||
})
|
||||
|
||||
require('blink.cmp').setup({
|
||||
completion = {
|
||||
documentation = {
|
||||
auto_show = true,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
for d, flag in pairs({ h = '-L', j = '-D', k = '-U', l = '-R' }) do
|
||||
vim.keymap.set('n', '<C-' .. d .. '>', function()
|
||||
local win = vim.api.nvim_get_current_win()
|
||||
vim.cmd.wincmd(d)
|
||||
if vim.api.nvim_get_current_win() == win and vim.env.TMUX then
|
||||
vim.system({ 'tmux', 'if-shell', '-F', '#{window_zoomed_flag}', '', 'select-pane ' .. flag })
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
vim.keymap.set('n', 'gd', vim.lsp.buf.definition)
|
||||
|
||||
vim.keymap.set('v', 'J', ":m '>+1<CR>gv=gv")
|
||||
vim.keymap.set('v', 'K', ":m '<-2<CR>gv=gv")
|
||||
|
||||
vim.keymap.set('n', '<C-u>', '<C-u>zz')
|
||||
vim.keymap.set('n', '<C-d>', '<C-d>zz')
|
||||
vim.keymap.set('n', 'n', 'nzzzv')
|
||||
vim.keymap.set('n', 'N', 'Nzzzv')
|
||||
|
||||
vim.keymap.set('x', '<leader>p', [["_dP]])
|
||||
|
||||
vim.keymap.set('n', '<leader>vs', ':vsplit<CR>')
|
||||
vim.keymap.set('n', '<leader>ss', ':split<CR>')
|
||||
|
||||
vim.keymap.set('n', '<leader>E', ':Ex<CR>')
|
||||
|
||||
vim.keymap.set('n', '<leader><leader>', ':Pick files<CR>', { silent = true })
|
||||
vim.keymap.set('n', '<leader>fh', ':Pick help<CR>', { silent = true })
|
||||
vim.keymap.set('n', '<leader>fg', ':Pick grep_live<CR>', { silent = true })
|
||||
|
||||
vim.keymap.set('n', '<leader>uu', function()
|
||||
vim.cmd('packadd nvim.undotree')
|
||||
require('undotree').open({
|
||||
command = 'topleft 45vnew',
|
||||
title = 'Undo Tree',
|
||||
})
|
||||
end, { desc = 'native undotree', silent = true })
|
||||
|
||||
local function qf_open()
|
||||
return vim.fn.getqflist({ winid = 0 }).winid ~= 0
|
||||
end
|
||||
|
||||
vim.keymap.set('n', '<leader>xx', function()
|
||||
if qf_open() then
|
||||
vim.cmd.cclose()
|
||||
elseif #vim.diagnostic.get() == 0 then
|
||||
vim.notify('No diagnostics found', vim.log.levels.WARN)
|
||||
else
|
||||
vim.diagnostic.setqflist({ open = true, title = 'Diagnostics' })
|
||||
end
|
||||
end, { desc = 'Toggle diagnostics quickfix' })
|
||||
|
||||
vim.api.nvim_create_autocmd('DiagnosticChanged', {
|
||||
group = vim.api.nvim_create_augroup('DiagnosticsQuickfix', { clear = true }),
|
||||
callback = function()
|
||||
if not qf_open() then
|
||||
return
|
||||
end
|
||||
if #vim.diagnostic.get() == 0 then
|
||||
vim.cmd.cclose()
|
||||
else
|
||||
vim.diagnostic.setqflist({ open = false, title = 'Diagnostics' })
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
vim.lsp.config('*', {
|
||||
capabilities = require('blink.cmp').get_lsp_capabilities(nil, true),
|
||||
})
|
||||
|
||||
vim.lsp.config('gopls', {
|
||||
cmd = { 'gopls' },
|
||||
filetypes = { 'go', 'gomod', 'gowork' },
|
||||
root_markers = { 'go.work', 'go.mod' },
|
||||
settings = {
|
||||
gopls = {
|
||||
semanticTokens = true,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
vim.lsp.config('lua_ls', {
|
||||
cmd = { 'lua-language-server' },
|
||||
filetypes = { 'lua' },
|
||||
root_markers = { '.luarc.json', '.luarc.jsonc', 'stylua.toml', '.git' },
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = { version = 'LuaJIT' },
|
||||
diagnostics = { globals = { 'vim' } },
|
||||
completion = { callSnippet = 'Replace' },
|
||||
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('clangd', {
|
||||
cmd = { 'clangd' },
|
||||
filetypes = { 'c', 'cpp' },
|
||||
root_markers = { 'compile_commands.json', '.clangd', '.git' },
|
||||
})
|
||||
|
||||
vim.lsp.config('html', {
|
||||
cmd = { 'vscode-html-language-server', '--stdio' },
|
||||
filetypes = { 'html' },
|
||||
root_markers = { 'package.json', '.git' },
|
||||
init_options = {
|
||||
provideFormatter = true,
|
||||
embeddedLanguages = { css = true, javascript = true },
|
||||
configurationSection = { 'html', 'css', 'javascript' },
|
||||
},
|
||||
})
|
||||
|
||||
vim.lsp.config('vtsls', {
|
||||
cmd = { 'vtsls', '--stdio' },
|
||||
filetypes = { 'javascript', 'javascriptreact', 'typescript', 'typescriptreact' },
|
||||
root_markers = { 'package.json', 'tsconfig.json', 'jsconfig.json', '.git' },
|
||||
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',
|
||||
'gopls',
|
||||
'vtsls',
|
||||
'html',
|
||||
})
|
||||
@@ -1,62 +0,0 @@
|
||||
local map = vim.keymap.set
|
||||
|
||||
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', '<C-u>', '<C-u>zz')
|
||||
map('n', '<C-d>', '<C-d>zz')
|
||||
map('n', 'n', 'nzzzv')
|
||||
map('n', 'N', 'Nzzzv')
|
||||
|
||||
map('x', '<leader>p', [["_dP]])
|
||||
|
||||
map('n', '<leader>vs', ':vsplit<CR>')
|
||||
map('n', '<leader>ss', ':split<CR>')
|
||||
|
||||
map('n', '<leader>E', ':Ex<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_live<CR>', { silent = true })
|
||||
|
||||
map('n', '<leader>uu', function()
|
||||
vim.cmd('packadd nvim.undotree')
|
||||
require('undotree').open({
|
||||
command = 'topleft 45vnew',
|
||||
title = 'Undo Tree',
|
||||
})
|
||||
end, { desc = 'native undotree', silent = true })
|
||||
|
||||
local qf_group = vim.api.nvim_create_augroup('DiagnosticsQuickfix', { clear = true })
|
||||
|
||||
local function qf_open()
|
||||
return vim.fn.getqflist({ winid = 0 }).winid ~= 0
|
||||
end
|
||||
|
||||
map('n', '<leader>xx', function()
|
||||
if qf_open() then
|
||||
vim.cmd('cclose')
|
||||
return
|
||||
end
|
||||
if #vim.diagnostic.get() == 0 then
|
||||
vim.notify('No diagnostics found', vim.log.levels.WARN)
|
||||
return
|
||||
end
|
||||
vim.diagnostic.setqflist({ open = true, title = 'Diagnostics' })
|
||||
end, { desc = 'Toggle diagnostics quickfix' })
|
||||
|
||||
vim.api.nvim_create_autocmd('DiagnosticChanged', {
|
||||
group = qf_group,
|
||||
callback = function()
|
||||
if not qf_open() then
|
||||
return
|
||||
end
|
||||
if #vim.diagnostic.get() == 0 then
|
||||
vim.cmd('cclose')
|
||||
else
|
||||
vim.diagnostic.setqflist({ open = false, title = 'Diagnostics' })
|
||||
end
|
||||
end,
|
||||
})
|
||||
@@ -1,117 +0,0 @@
|
||||
local capabilities = require('blink.cmp').get_lsp_capabilities(nil, true)
|
||||
-- if capabilities.workspace then
|
||||
-- capabilities.workspace.didChangeWatchedFiles = nil
|
||||
-- end
|
||||
vim.lsp.config('*', {
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
vim.lsp.config('gopls', {
|
||||
cmd = { 'gopls' },
|
||||
filetypes = { 'go', 'gomod', 'gowork' },
|
||||
root_markers = { { 'go.work' }, { 'go.mod' }, { '.git' } },
|
||||
settings = {
|
||||
gopls = {
|
||||
semanticTokens = true,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
vim.lsp.config('lua_ls', {
|
||||
cmd = { 'lua-language-server' },
|
||||
filetypes = { 'lua' },
|
||||
root_markers = {
|
||||
{ '.emmyrc.json', '.luarc.json', '.luarc.jsonc' },
|
||||
{ '.luacheckrc', '.stylua.toml', 'stylua.toml', 'selene.toml', 'selene.yml' },
|
||||
{ '.git' },
|
||||
},
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
version = 'LuaJIT',
|
||||
},
|
||||
diagnostics = { globals = { 'vim' } },
|
||||
completion = { callSnippet = 'Replace' },
|
||||
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('clangd', {
|
||||
cmd = { 'clangd' },
|
||||
filetypes = { 'c', 'cpp' },
|
||||
root_markers = {
|
||||
'.clangd',
|
||||
'.clang-tidy',
|
||||
'.clang-format',
|
||||
'compile_commands.json',
|
||||
'compile_flags.txt',
|
||||
'configure.ac',
|
||||
'.git',
|
||||
},
|
||||
})
|
||||
|
||||
vim.lsp.config('html', {
|
||||
cmd = { 'vscode-html-language-server', '--stdio' },
|
||||
filetypes = { 'html' },
|
||||
root_markers = { 'package.json', '.git' },
|
||||
init_options = {
|
||||
provideFormatter = true,
|
||||
embeddedLanguages = { css = true, javascript = true },
|
||||
configurationSection = { 'html', 'css', 'javascript' },
|
||||
},
|
||||
})
|
||||
|
||||
vim.lsp.config('vtsls', {
|
||||
cmd = { 'vtsls', '--stdio' },
|
||||
init_options = { hostInfo = 'neovim' },
|
||||
filetypes = { 'javascript', 'javascriptreact', 'typescript', 'typescriptreact' },
|
||||
settings = {
|
||||
vtsls = {
|
||||
autoUseWorkspaceTsdk = true,
|
||||
experimental = { completion = { enableServerSideFuzzyMatch = true } },
|
||||
},
|
||||
typescript = {
|
||||
tsserver = { maxTsServerMemory = 8192 },
|
||||
updateImportsOnFileMove = { enabled = 'always' },
|
||||
preferences = { importModuleSpecifier = 'non-relative' },
|
||||
},
|
||||
javascript = {
|
||||
updateImportsOnFileMove = { enabled = 'always' },
|
||||
},
|
||||
},
|
||||
root_dir = function(bufnr, on_dir)
|
||||
local root_markers = {
|
||||
{ 'package-lock.json', 'yarn.lock', 'pnpm-lock.yaml', 'bun.lockb', 'bun.lock' },
|
||||
{ '.git' },
|
||||
}
|
||||
local deno_root = vim.fs.root(bufnr, { 'deno.json', 'deno.jsonc' })
|
||||
local deno_lock_root = vim.fs.root(bufnr, { 'deno.lock' })
|
||||
local project_root = vim.fs.root(bufnr, root_markers)
|
||||
if deno_lock_root and (not project_root or #deno_lock_root > #project_root) then
|
||||
return
|
||||
end
|
||||
if deno_root and (not project_root or #deno_root >= #project_root) then
|
||||
return
|
||||
end
|
||||
on_dir(project_root or vim.fn.getcwd())
|
||||
end,
|
||||
})
|
||||
|
||||
vim.lsp.enable({
|
||||
'lua_ls',
|
||||
'clangd',
|
||||
'gopls',
|
||||
'vtsls',
|
||||
'html',
|
||||
})
|
||||
@@ -1,147 +0,0 @@
|
||||
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/stevearc/conform.nvim' },
|
||||
{ src = 'https://github.com/alexghergh/nvim-tmux-navigation' },
|
||||
{ src = 'https://github.com/saghen/blink.cmp', version = vim.version.range('*') },
|
||||
{ src = 'https://git.moomancer.xyz/DarthMooMancer/vern-nvim.git' },
|
||||
})
|
||||
|
||||
local parsers = {
|
||||
'lua',
|
||||
'luadoc', -- highlights ---@ annotations, useful for your plugin work
|
||||
'go',
|
||||
'gomod',
|
||||
'c',
|
||||
'cpp',
|
||||
'javascript',
|
||||
'typescript',
|
||||
'tsx',
|
||||
'html',
|
||||
'css',
|
||||
|
||||
'vim',
|
||||
'vimdoc',
|
||||
'query',
|
||||
'json',
|
||||
'yaml',
|
||||
'toml',
|
||||
'bash',
|
||||
'markdown',
|
||||
'markdown_inline',
|
||||
'gitcommit',
|
||||
'gitignore',
|
||||
'diff',
|
||||
}
|
||||
|
||||
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',
|
||||
pattern = '*',
|
||||
callback = function(ev)
|
||||
if vim.bo[ev.buf].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,
|
||||
})
|
||||
|
||||
local hipatterns = require('mini.hipatterns')
|
||||
hipatterns.setup({
|
||||
highlighters = {
|
||||
hex_color = hipatterns.gen_highlighter.hex_color(),
|
||||
},
|
||||
})
|
||||
|
||||
require('mini.pairs').setup()
|
||||
require('mini.icons').setup()
|
||||
require('mini.notify').setup()
|
||||
require('mini.input').setup()
|
||||
|
||||
require('mini.pick').setup({
|
||||
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,
|
||||
},
|
||||
})
|
||||
|
||||
local conform = require('conform')
|
||||
conform.setup({
|
||||
formatters_by_ft = {
|
||||
lua = { 'stylua' },
|
||||
c = { 'clang-format' },
|
||||
cpp = { 'clang-format' },
|
||||
go = { 'goimports' },
|
||||
|
||||
javascript = { 'prettier' },
|
||||
typescript = { 'prettier' },
|
||||
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()"
|
||||
|
||||
-- vim.opt.rtp:append('/Users/andrew/personal/Projects/Lua/vern-nvim')
|
||||
require('vern-nvim').setup({
|
||||
env = {
|
||||
author = 'DarthMooMancer',
|
||||
},
|
||||
})
|
||||
|
||||
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>',
|
||||
},
|
||||
})
|
||||
|
||||
require('blink.cmp').setup({
|
||||
completion = {
|
||||
documentation = {
|
||||
auto_show = true,
|
||||
auto_show_delay_ms = 50,
|
||||
},
|
||||
menu = {
|
||||
scrollbar = false,
|
||||
},
|
||||
},
|
||||
})
|
||||
@@ -14,10 +14,6 @@
|
||||
"src": "https://github.com/nvim-mini/mini.nvim.git",
|
||||
"version": ">=0.0.0"
|
||||
},
|
||||
"nvim-tmux-navigation": {
|
||||
"rev": "4898c98702954439233fdaf764c39636681e2861",
|
||||
"src": "https://github.com/alexghergh/nvim-tmux-navigation"
|
||||
},
|
||||
"nvim-treesitter": {
|
||||
"rev": "b706d642dd20d0922e7e92365dc73617f0fdb4ea",
|
||||
"src": "https://github.com/nvim-treesitter/nvim-treesitter"
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
column_width = 100
|
||||
# line_endings = "Unix"
|
||||
indent_type = "Spaces"
|
||||
indent_width = 2
|
||||
quote_style = "AutoPreferSingle"
|
||||
@@ -1,3 +1,5 @@
|
||||
Include /Users/andrew/.colima/ssh_config
|
||||
|
||||
Host *
|
||||
AddKeysToAgent yes
|
||||
UseKeychain yes # macOS specific
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
set -g prefix C-Space
|
||||
bind C-Space send-prefix
|
||||
unbind C-b
|
||||
|
||||
# 1. Set your primary prefix (Meh + A via CSI u)
|
||||
set-option -g prefix C-M-S-a
|
||||
bind-key C-M-S-a send-prefix
|
||||
|
||||
# 2. Set Ctrl + Space as your fallback/secondary prefix
|
||||
set-option -g prefix2 C-Space
|
||||
bind-key C-Space send-prefix
|
||||
|
||||
set -s escape-time 0
|
||||
set -g focus-events on
|
||||
@@ -8,6 +15,8 @@ set -g set-clipboard on
|
||||
set -g detach-on-destroy off
|
||||
set -g status off
|
||||
|
||||
set -s extended-keys on
|
||||
set -as terminal-features 'xterm*:extkeys,ghostty*:extkeys'
|
||||
set -g default-terminal "tmux-256color"
|
||||
set -as terminal-overrides ',xterm*:Tc,ghostty:RGB'
|
||||
|
||||
|
||||
Reference in new issue
Block a user