feat: add colors, add outline

This commit is contained in:
2025-09-13 11:55:10 +09:00
parent d52234a409
commit f085be7085
6 changed files with 347 additions and 1 deletions

50
autoload/pop_punk.vim Normal file
View File

@@ -0,0 +1,50 @@
let s:colors = {}
let s:colors.white = ['#ffffff', 231]
let s:colors.gray_1 = ['#1a1a1a', 234]
let s:colors.gray_2 = ['#2e373e', 237]
let s:colors.gray_3 = ['#3a3a3a', 237]
let s:colors.gray_4 = ['#5a5a5a', 59]
let s:colors.gray_5 = ['#767c88', 60]
let s:colors.gray_6 = ['#8b8a7c', 101]
let s:colors.gray_7 = ['#8787af', 103]
let s:colors.black = ['#000000', 16]
let s:colors.eggshell = ['#ffffcd', 230]
let s:colors.mauve = ['#e4dfff', 189]
let s:colors.blue = ['#0088ff', 33]
let s:colors.teal = ['#40e0d0', 80]
let s:colors.magenta = ['#c526ff', 165]
let s:colors.burgundy = ['#5f2a5f', 53]
let s:colors.red_1 = ['#d70061', 161]
let s:colors.red_2 = ['#ff005f', 197]
let s:colors.orange = ['#ff9d00', 214]
let s:colors.sun = ['#ffdd00', 220]
let s:colors.yellow = ['#ffff00', 226]
let s:colors.pink = ['#f9e0f5', 225]
let s:colors.green = ['#5ff967', 76]
let s:colors.cobalt_1 = ['#306b8f', 24]
let s:colors.cobalt_2 = ['#445291', 60]
function! pop_punk#GetColors()
return s:colors
endfunction
function! pop_punk#AnsiColors()
return [
\s:colors.black[0],
\s:colors.red_2[0],
\s:colors.green[0],
\s:colors.orange[0],
\s:colors.blue[0],
\s:colors.magenta[0],
\s:colors.teal[0],
\s:colors.white[0],
\s:colors.gray_7[0],
\s:colors.red_2[0],
\s:colors.green[0],
\s:colors.yellow[0],
\s:colors.blue[0],
\s:colors.magenta[0],
\s:colors.teal[0],
\s:colors.pink[0]
\]
endfunction

263
colors/pop-punk.vim Normal file
View File

@@ -0,0 +1,263 @@
" Pop-Punk
"
" by Jeff Auriemma
" @bignimbus
scriptencoding utf8
set t_Co=256
let &t_Cs = "\e[4:3m"
let &t_Ce = "\e[4:0m"
let g:colors_name = "pop-punk"
" Palette
let s:colors = pop_punk#GetColors()
let s:white = s:colors.white
let s:gray_1 = s:colors.gray_1
let s:gray_2 = s:colors.gray_2
let s:gray_3 = s:colors.gray_3
let s:gray_4 = s:colors.gray_4
let s:gray_5 = s:colors.gray_5
let s:gray_6 = s:colors.gray_6
let s:gray_7 = s:colors.gray_7
let s:black = s:colors.black
let s:eggshell = s:colors.eggshell
let s:mauve = s:colors.mauve
let s:blue = s:colors.blue
let s:teal = s:colors.teal
let s:magenta = s:colors.magenta
let s:burgundy = s:colors.burgundy
let s:red_1 = s:colors.red_1
let s:red_2 = s:colors.red_2
let s:orange = s:colors.orange
let s:sun = s:colors.sun
let s:yellow = s:colors.yellow
let s:pink = s:colors.pink
let s:green = s:colors.green
let s:cobalt_1 = s:colors.cobalt_1
let s:cobalt_2 = s:colors.cobalt_2
let s:none = ['NONE', 'NONE']
" User Configuration
if !exists('g:pop_punk_bold')
let g:pop_punk_bold = 1
endif
if !exists('g:pop_punk_italic')
let g:pop_punk_italic = 1
endif
if !exists('g:pop_punk_underline')
let g:pop_punk_underline = 1
endif
if !exists('g:pop_punk_undercurl') && g:pop_punk_underline != 0
let g:pop_punk_undercurl = 1
endif
if !exists('g:pop_punk_inverse')
let g:pop_punk_inverse = 1
endif
if !exists('g:pop_punk_colorterm')
let g:pop_punk_colorterm = 1
endif
" Script Helpers
let s:attrs = {
\ 'bold': g:pop_punk_bold == 1 ? 'bold' : 0,
\ 'italic': g:pop_punk_italic == 1 ? 'italic' : 0,
\ 'underline': g:pop_punk_underline == 1 ? 'underline' : 0,
\ 'undercurl': g:pop_punk_undercurl == 1 ? 'undercurl' : 0,
\ 'inverse': g:pop_punk_inverse == 1 ? 'inverse' : 0,
\}
function! s:h(scope, fg, ...) " bg, attr_list, special
let l:fg = copy(a:fg)
let l:bg = get(a:, 1, ['NONE', 'NONE'])
let l:attr_list = filter(get(a:, 2, ['NONE']), 'type(v:val) == 1')
let l:attrs = len(l:attr_list) > 0 ? join(l:attr_list, ',') : 'NONE'
let l:special = get(a:, 3, ['NONE', 'NONE'])
" Falls back to coloring foreground group on terminals because
" nearly all do not support undercurl
" if l:special[0] !=# 'NONE' && l:fg[0] ==# 'NONE' && !has('gui_running')
" let l:fg[0] = l:special[0]
" let l:fg[1] = l:special[1]
" endif
let l:hl_string = [
\ 'highlight', a:scope,
\ 'guifg=' . l:fg[0], 'ctermfg=' . l:fg[1],
\ 'guibg=' . l:bg[0], 'ctermbg=' . l:bg[1],
\ 'gui=' . l:attrs, 'cterm=' . l:attrs,
\ 'guisp=' . l:special[0],
\]
execute join(l:hl_string, ' ')
endfunction
" User Interface
set background=dark
" Required as some plugins will overwrite
call s:h('Normal', s:white, s:black)
call s:h('StatusLine', s:magenta, s:gray_2, [s:attrs.bold])
call s:h('StatusLineNC', s:gray_7, s:gray_2, [s:attrs.italic])
" call s:h('StatusLineTerm', s:none, s:bglighter, [s:attrs.bold])
" call s:h('StatusLineTermNC', s:none, s:bglight)
call s:h('WildMenu', s:none, s:gray_7)
call s:h('Cursor', s:black, s:mauve)
call s:h('CursorLine', s:none, s:gray_1)
call s:h('CursorColumn', s:none, s:gray_1)
call s:h('CursorLineNr', s:yellow, s:none)
call s:h('Debug', s:gray_6, s:none)
call s:h('DiffAdd', s:none, s:gray_3)
call s:h('DiffChange', s:eggshell, s:cobalt_1)
call s:h('DiffDelete', s:red_2, s:none)
" call s:h('DiffRemoved', s:red_2, s:none)
call s:h('DiffText', s:eggshell, s:burgundy)
call s:h('Directory', s:magenta, s:none)
call s:h('ErrorMsg', s:red_2, s:none)
call s:h('FoldColumn', s:gray_1, s:gray_7, [s:attrs.italic])
call s:h('Folded', s:gray_1, s:gray_7, [s:attrs.italic])
call s:h('IncSearch', s:mauve, s:cobalt_2)
call s:h('LineNr', s:gray_7, s:black)
call s:h('MoreMsg', s:pink, s:gray_2)
call s:h('NonText', s:gray_5, s:none)
call s:h('Pmenu', s:white, s:gray_2)
call s:h('PmenuSbar', s:none, s:gray_2)
call s:h('PmenuSel', s:white, s:red_1)
call s:h('PmenuThumb', s:none, s:cobalt_1)
call s:h('Question', s:pink, s:gray_2)
call s:h('Search', s:white, s:red_1)
call s:h('SignColumn', s:gray_1, s:black)
call s:h('TabLine', s:magenta, s:gray_2)
call s:h('TabLineFill', s:white, s:black)
call s:h('TabLineSel', s:white, s:magenta, [s:attrs.bold])
call s:h('Title', s:white, s:none)
call s:h('VertSplit', s:magenta, s:black)
call s:h('Visual', s:gray_1, s:mauve)
" call s:h('VisualNOS', s:gray_1, s:mauve)
call s:h('WarningMsg', s:yellow, s:black)
" Syntax
" Required as some plugins will overwrite
call s:h('MatchParen', s:mauve, s:cobalt_2)
" call s:h('Conceal', s:cyan, s:none)
call s:h('SpecialKey', s:gray_5, s:none)
call s:h('Comment', s:blue, s:none, [s:attrs.italic])
call s:h('Underlined', s:blue, s:none, [s:attrs.underline])
call s:h('Todo', s:orange, s:black)
call s:h('Error', s:red_2, s:none)
call s:h('SpellBad', s:none, s:none, [s:attrs.undercurl], s:red_2)
" call s:h('SpellLocal', s:none, s:none, [s:attrs.undercurl], s:red_2)
call s:h('SpellCap', s:none, s:none, [s:attrs.undercurl], s:yellow)
" call s:h('SpellRare', s:none, s:none)
call s:h('Constant', s:red_2, s:none)
call s:h('String', s:green, s:none)
call s:h('Character', s:red_2, s:none)
hi! link Character Constant
hi! link Number Constant
hi! link Boolean Constant
hi! link Float Constant
call s:h('Identifier', s:teal, s:none)
call s:h('Function', s:teal, s:none, [s:attrs.bold])
call s:h('Statement', s:orange, s:none, [s:attrs.bold])
hi! link Conditional Statement
hi! link Repeat Statement
hi! link Label Statement
hi! link Operator Statement
hi! link Exception Statement
call s:h('Keyword', s:sun, s:none, [s:attrs.bold])
call s:h('PreProc', s:magenta, s:none)
hi! link Include PreProc
hi! link PreCondit PreProc
call s:h('Define', s:gray_6, s:none)
call s:h('Macro', s:sun, s:none)
call s:h('StorageClass', s:teal, s:none, [s:attrs.bold])
hi! link Typedef StorageClass
call s:h('Structure', s:orange, s:none, [s:attrs.bold])
call s:h('Type', s:teal, s:none, [s:attrs.bold])
call s:h('Delimiter', s:gray_6, s:none)
call s:h('Special', s:magenta, s:none, [s:attrs.bold])
call s:h('SpecialComment', s:blue, s:none, [s:attrs.bold])
call s:h('Tag', s:orange, s:none)
" netrw
call s:h('netrwTreeBar', s:blue, s:none)
call s:h('netrwDir', s:magenta, s:none)
call s:h('netrwClassify', s:orange, s:none)
call s:h('netrwSuffixes', s:sun, s:none)
" vim-ale
call s:h('ALEErrorSign', s:red_2, s:none)
call s:h('ALEWarningSign', s:yellow, s:none)
" coc.nvim
hi! link CocErrorSign ALEErrorSign
hi! link CocWarningSign ALEWarningSign
hi! link CocInfoSign ALEWarningSign
call s:h('CocErrorFloat', s:red_2, s:none, [s:attrs.bold])
call s:h('CocWarningFloat', s:orange, s:none, [s:attrs.bold])
hi default CocUnderline cterm=undercurl gui=undercurl
call s:h('CocMenuSel', s:none, s:red_1)
" vim-indent-guides
call s:h('IndentGuidesOdd', s:gray_4, s:none)
call s:h('IndentGuidesEven', s:gray_4, s:none)
" you-are-here.vim
call s:h('YouAreHereActiveBorder', s:magenta, s:gray_2)
" vim-startify
call s:h('StartifyHeader', s:magenta, s:none)
" vim-graphql
call s:h('graphqlType', s:pink, s:none)
call s:h('graphqlVariable', s:red_1, s:none)
call s:h('graphqlTemplateString', s:blue, s:none)
" vim-css
call s:h('cssClassName', s:pink, s:none, [s:attrs.bold])
call s:h('cssPseudoClassId', s:yellow, s:none, [s:attrs.bold])
call s:h('cssAtRule', s:sun, s:none)
call s:h('cssProp', s:teal, s:none)
call s:h('cssDefinition', s:teal, s:none)
call s:h('cssFunctionName', s:pink, s:none, [s:attrs.bold])
call s:h('cssCustomProp', s:magenta, s:none)
call s:h('cssBraces', s:white, s:none, [s:attrs.bold])
" vim-typescript
call s:h('typescriptBraces', s:pink, s:none, [s:attrs.bold])
call s:h('typescriptVariableDeclaration', s:pink, s:none)
call s:h('typescriptDotNotation', s:blue, s:none)
call s:h('typescriptBOM', s:pink, s:none, [s:attrs.bold])
call s:h('typescriptTemplateSB', s:magenta, s:none, [s:attrs.bold])
" vim-markdown
call s:h('mkdHeading', s:orange, s:none, [s:attrs.bold])
" hi! link helpHyperTextJump PopPunkLink
" hi! link helpCommand PopPunkPurple
" hi! link helpExample PopPunkGreen
" hi! link helpBacktick Special

View File

@@ -1,6 +1,6 @@
vim.opt.termguicolors = true
vim.cmd("colorscheme eldar")
vim.cmd("colorscheme pop-punk")
vim.opt.tabstop = 4
vim.opt.shiftwidth = 4
vim.opt.expandtab = true

View File

@@ -10,6 +10,7 @@
"fzf-lua": { "branch": "main", "commit": "d6e899e8dfdaf47bf849c0875ca3ca0e5a0e0d12" },
"gitsigns.nvim": { "branch": "main", "commit": "6e3c66548035e50db7bd8e360a29aec6620c3641" },
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
"lazygit.nvim": { "branch": "main", "commit": "2305deed25bc61b866d5d39189e9105a45cf1cfb" },
"lsp-lens.nvim": { "branch": "main", "commit": "48bb1a7e271424c15f3d588d54adc9b7c319d977" },
"lualine.nvim": { "branch": "master", "commit": "b8c23159c0161f4b89196f74ee3a6d02cdc3a955" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "1ec4da522fa49dcecee8d190efda273464dd2192" },
@@ -22,6 +23,7 @@
"nvim-lspconfig": { "branch": "master", "commit": "61fdd3a8609071ce44519e405f3424d84ec94d9d" },
"nvim-treesitter": { "branch": "main", "commit": "32cb9f9b9db71b0dc2454817727cd9a5d840658c" },
"nvim-web-devicons": { "branch": "master", "commit": "c2599a81ecabaae07c49ff9b45dcd032a8d90f1a" },
"outline.nvim": { "branch": "main", "commit": "6b62f73a6bf317531d15a7ae1b724e85485d8148" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },

20
lua/plugins/lazygit.lua Normal file
View File

@@ -0,0 +1,20 @@
return {
"kdheepak/lazygit.nvim",
lazy = true,
cmd = {
"LazyGit",
"LazyGitConfig",
"LazyGitCurrentFile",
"LazyGitFilter",
"LazyGitFilterCurrentFile",
},
-- optional for floating window border decoration
dependencies = {
"nvim-lua/plenary.nvim",
},
-- setting the keybinding for LazyGit with 'keys' is recommended in
-- order to load the plugin when the command is run for the first time
keys = {
{ "<leader>lg", "<cmd>LazyGit<cr>", desc = "LazyGit" }
}
}

11
lua/plugins/outline.lua Normal file
View File

@@ -0,0 +1,11 @@
return {
"hedyhli/outline.nvim",
lazy = true,
cmd = { "Outline", "OutlineOpen" },
keys = { -- Example mapping to toggle outline
{ "<leader>o", "<cmd>Outline<CR>", desc = "Toggle outline" },
},
opts = {
-- Your setup opts here
},
}