├── .gitignore ├── LICENSE.txt ├── Makefile ├── ReadMe.md ├── autoload ├── airline │ └── themes │ │ └── kreative.vim └── lightline │ └── colorscheme │ └── kreative.vim ├── doc └── kreative.txt ├── fnl ├── externals │ └── hsluv.lua ├── kreative │ ├── color.fnl │ ├── highlights │ │ ├── filetype │ │ │ ├── markdown.fnl │ │ │ ├── vim.fnl │ │ │ └── vimwiki.fnl │ │ ├── integrations │ │ │ ├── airline.fnl │ │ │ ├── bufferline.fnl │ │ │ ├── cmp.fnl │ │ │ ├── coc.fnl │ │ │ ├── fugitive.fnl │ │ │ ├── gitsigns.fnl │ │ │ ├── indent_blankline.fnl │ │ │ ├── lightline.fnl │ │ │ ├── lsp.fnl │ │ │ ├── startify.fnl │ │ │ ├── treesitter.fnl │ │ │ └── ts_rainbow.fnl │ │ ├── main.fnl │ │ ├── syntax.fnl │ │ └── terminal.fnl │ ├── main.fnl │ └── utils │ │ ├── export │ │ ├── alacritty.fnl │ │ ├── init.fnl │ │ ├── kitty.fnl │ │ ├── konsole.fnl │ │ ├── render.fnl │ │ └── rxvt.fnl │ │ ├── highlight │ │ ├── get.fnl │ │ ├── init.fnl │ │ ├── run.fnl │ │ └── utils.fnl │ │ ├── json │ │ ├── init.fnl │ │ ├── read.fnl │ │ └── write.fnl │ │ ├── message │ │ └── init.fnl │ │ ├── options │ │ └── init.fnl │ │ └── override │ │ └── init.fnl └── lualine │ └── themes │ └── kreative.fnl ├── lua ├── externals │ └── hsluv.lua ├── kreative │ ├── aniseed │ │ ├── autoload.lua │ │ ├── compile.lua │ │ ├── core.lua │ │ ├── deps │ │ │ ├── fennel.lua │ │ │ ├── fun.lua │ │ │ └── nvim.lua │ │ ├── env.lua │ │ ├── eval.lua │ │ ├── fennel.lua │ │ ├── fs.lua │ │ ├── macros.fnl │ │ ├── nvim.lua │ │ ├── nvim │ │ │ └── util.lua │ │ ├── setup.lua │ │ ├── string.lua │ │ ├── test.lua │ │ └── view.lua │ ├── color.lua │ ├── highlights │ │ ├── filetype │ │ │ ├── markdown.lua │ │ │ ├── vim.lua │ │ │ └── vimwiki.lua │ │ ├── integrations │ │ │ ├── airline.lua │ │ │ ├── bufferline.lua │ │ │ ├── cmp.lua │ │ │ ├── coc.lua │ │ │ ├── fugitive.lua │ │ │ ├── gitsigns.lua │ │ │ ├── indent_blankline.lua │ │ │ ├── lightline.lua │ │ │ ├── lsp.lua │ │ │ ├── startify.lua │ │ │ ├── treesitter.lua │ │ │ └── ts_rainbow.lua │ │ ├── main.lua │ │ ├── syntax.lua │ │ └── terminal.lua │ ├── katcros-fnl │ │ └── macros │ │ │ ├── lispism │ │ │ └── macros.fnl │ │ │ └── nvim │ │ │ ├── api │ │ │ ├── autocommands │ │ │ │ └── macros.fnl │ │ │ ├── colors │ │ │ │ └── macros.fnl │ │ │ ├── maps │ │ │ │ └── macros.fnl │ │ │ ├── options │ │ │ │ └── macros.fnl │ │ │ └── utils │ │ │ │ └── macros.fnl │ │ │ └── packer │ │ │ └── macros.fnl │ ├── main.lua │ └── utils │ │ ├── export │ │ ├── alacritty.lua │ │ ├── init.lua │ │ ├── kitty.lua │ │ ├── konsole.lua │ │ ├── render.lua │ │ └── rxvt.lua │ │ ├── highlight │ │ ├── get.lua │ │ ├── init.lua │ │ ├── run.lua │ │ └── utils.lua │ │ ├── json │ │ ├── init.lua │ │ ├── read.lua │ │ └── write.lua │ │ ├── message │ │ └── init.lua │ │ ├── options │ │ └── init.lua │ │ └── override │ │ └── init.lua └── lualine │ └── themes │ └── kreative.lua └── scripts └── fnlfmt.sh /.gitignore: -------------------------------------------------------------------------------- 1 | /deps/ 2 | /test/lua/ 3 | /doc/tags 4 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: deps compile test 2 | 3 | default: deps compile test 4 | 5 | format: 6 | scripts/fnlfmt.sh 7 | 8 | deps: 9 | deps/aniseed/scripts/dep.sh Olical aniseed origin/master 10 | deps/aniseed/scripts/dep.sh katawful katcros-fnl origin/main 11 | 12 | compile: 13 | rm -rf lua/kreative 14 | 15 | # Remove this if you only want Aniseed at compile time. 16 | deps/aniseed/scripts/embed.sh aniseed kreative 17 | deps/aniseed/scripts/embed.sh katcros-fnl kreative 18 | 19 | # Also remove this embed prefix if you're not using Aniseed inside your plugin at runtime. 20 | ANISEED_EMBED_PREFIX=kreative deps/aniseed/scripts/compile.sh 21 | 22 | test: 23 | rm -rf test/lua 24 | deps/aniseed/scripts/test.sh 25 | -------------------------------------------------------------------------------- /autoload/airline/themes/kreative.vim: -------------------------------------------------------------------------------- 1 | let g:airline#themes#kat#palette = {} 2 | "noremap s :source % 3 | function! airline#themes#kat#refresh() 4 | 5 | " lua require('kreative.highlights.integrations.airline').init() 6 | let g:airline#themes#kat#palette = {} 7 | let M0 = airline#themes#get_highlight('Identifier') 8 | let accents_group = airline#themes#get_highlight('Special') 9 | let modified_group = [M0[1], '', M0[2], '', ''] 10 | let modified_group_norm = luaeval('require("kreative.highlights.integrations.airline").modifiedC("normal")') 11 | let modified_group_inactive = luaeval('require("kreative.highlights.integrations.airline").modifiedC("inactive")') 12 | let warning_group = luaeval('require("kreative.highlights.integrations.airline").warningGroup()') 13 | let error_group = luaeval('require("kreative.highlights.integrations.airline").errorGroup()') 14 | 15 | let s:N1 = luaeval('require("kreative.highlights.integrations.airline").normalMode_a()') 16 | let s:N2 = luaeval('require("kreative.highlights.integrations.airline").normalMode_b()') 17 | let s:N3 = luaeval('require("kreative.highlights.integrations.airline").normalMode_c()') 18 | 19 | let g:airline#themes#kat#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) 20 | let g:airline#themes#kat#palette.normal_modified = { 'airline_c': modified_group_norm } 21 | let g:airline#themes#kat#palette.normal.airline_warning = warning_group 22 | let g:airline#themes#kat#palette.normal_modified.airline_warning = warning_group 23 | let g:airline#themes#kat#palette.normal.airline_error = error_group 24 | let g:airline#themes#kat#palette.normal_modified.airline_error = error_group 25 | 26 | let s:I1 = luaeval('require("kreative.highlights.integrations.airline").insertMode_a()') 27 | let s:I2 = luaeval('require("kreative.highlights.integrations.airline").insertMode_b()') 28 | let s:I3 = luaeval('require("kreative.highlights.integrations.airline").insertMode_c()') 29 | let g:airline#themes#kat#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) 30 | let g:airline#themes#kat#palette.insert_modified = g:airline#themes#kat#palette.normal_modified 31 | let g:airline#themes#kat#palette.insert.airline_warning = g:airline#themes#kat#palette.normal.airline_warning 32 | let g:airline#themes#kat#palette.insert_modified.airline_warning = g:airline#themes#kat#palette.normal_modified.airline_warning 33 | let g:airline#themes#kat#palette.insert.airline_error = g:airline#themes#kat#palette.normal.airline_error 34 | let g:airline#themes#kat#palette.insert_modified.airline_error = g:airline#themes#kat#palette.normal_modified.airline_error 35 | 36 | let s:R1 = luaeval('require("kreative.highlights.integrations.airline").replaceMode_a()') 37 | let s:R2 = luaeval('require("kreative.highlights.integrations.airline").replaceMode_b()') 38 | let s:R3 = luaeval('require("kreative.highlights.integrations.airline").replaceMode_c()') 39 | let g:airline#themes#kat#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) 40 | let g:airline#themes#kat#palette.replace_modified = g:airline#themes#kat#palette.normal_modified 41 | let g:airline#themes#kat#palette.replace.airline_warning = g:airline#themes#kat#palette.normal.airline_warning 42 | let g:airline#themes#kat#palette.replace_modified.airline_warning = g:airline#themes#kat#palette.normal_modified.airline_warning 43 | let g:airline#themes#kat#palette.replace.airline_error = g:airline#themes#kat#palette.normal.airline_error 44 | let g:airline#themes#kat#palette.replace_modified.airline_error = g:airline#themes#kat#palette.normal_modified.airline_error 45 | 46 | let s:V1 = luaeval('require("kreative.highlights.integrations.airline").visualMode_a()') 47 | let s:V2 = luaeval('require("kreative.highlights.integrations.airline").visualMode_b()') 48 | let s:V3 = luaeval('require("kreative.highlights.integrations.airline").visualMode_c()') 49 | let g:airline#themes#kat#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) 50 | let g:airline#themes#kat#palette.visual_modified = { 'airline_c': [ s:V3[0], '', s:V3[2], '', '' ] } 51 | let g:airline#themes#kat#palette.visual.airline_warning = g:airline#themes#kat#palette.normal.airline_warning 52 | let g:airline#themes#kat#palette.visual_modified.airline_warning = g:airline#themes#kat#palette.normal_modified.airline_warning 53 | let g:airline#themes#kat#palette.visual.airline_error = g:airline#themes#kat#palette.normal.airline_error 54 | let g:airline#themes#kat#palette.visual_modified.airline_error = g:airline#themes#kat#palette.normal_modified.airline_error 55 | 56 | let s:IA = luaeval('require("kreative.highlights.integrations.airline").inactiveGroup()') 57 | let g:airline#themes#kat#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA) 58 | let g:airline#themes#kat#palette.inactive_modified = { 'airline_c': modified_group_inactive } 59 | 60 | let g:airline#themes#kat#palette.accents = { 'red': accents_group } 61 | 62 | let s:T1 = luaeval('require("kreative.highlights.integrations.airline").terminalMode_a()') 63 | let s:T2 = luaeval('require("kreative.highlights.integrations.airline").terminalMode_b()') 64 | let s:T3 = luaeval('require("kreative.highlights.integrations.airline").terminalMode_c()') 65 | let g:airline#themes#kat#palette.terminal = airline#themes#generate_color_map(s:T1, s:T2, s:T3) 66 | let g:airline#themes#kat#palette.normal.airline_term = s:N1 67 | let g:airline#themes#kat#palette.terminal.airline_term = s:T1 68 | let g:airline#themes#kat#palette.visual.airline_term = s:V1 69 | 70 | let g:airline#themes#kat#palette.tabline = { 71 | \ 'airline_tab': s:N1, 72 | \ 'airline_tabsel': s:I1, 73 | \ 'airline_tabtype': s:N1, 74 | \ 'airline_tabfill': s:N3, 75 | \ 'airline_tabhid': s:I3, 76 | \ 'airline_tabmod': s:I1 77 | \ } 78 | 79 | endfunction 80 | 81 | call airline#themes#kat#refresh() 82 | -------------------------------------------------------------------------------- /autoload/lightline/colorscheme/kreative.vim: -------------------------------------------------------------------------------- 1 | " define color dictionary {{{ 2 | let s:kat = {} 3 | 4 | let s:kat.fg = ['#daf6ff', 5 | \'#b5d5df', 6 | \'#8dbcca', 7 | \'#699faf', 8 | \'#4f7e8c', 9 | \'#325049' 10 | \] 11 | 12 | let s:kat.bg = ['#121c2d', 13 | \'#1c2e4a', 14 | \'#2c466e', 15 | \'#46689c', 16 | \'#6690d0', 17 | \'#78adff', 18 | \] 19 | 20 | " order: normal, contrast, dull 21 | let s:kat.red = ['#eb4949', '#ff5a5a', '#9c3636'] 22 | let s:kat.green = ['#8ceba9', '#9dffd2', '#60b77a'] 23 | let s:kat.orange = ['#f2b15c', '#ffe861', '#ce8b33'] 24 | let s:kat.pink = ['#f29cb1', '#ffaed5', '#a73953'] 25 | let s:kat.purple = ['#c8a5f1', '#f9b5ff', '#7a53a8'] 26 | let s:kat.blue = ['#7bb7c9', '#8af9ff', '#388ba4'] 27 | 28 | 29 | let g:lightline = { 30 | \ 'colorscheme': 'kat' 31 | \ } 32 | let s:N1 = luaeval('require("kreative.highlights.integrations.lightline").normalMode_a()') 33 | let s:N2 = luaeval('require("kreative.highlights.integrations.lightline").normalMode_b()') 34 | let s:N3 = luaeval('require("kreative.highlights.integrations.lightline").normalMode_c()') 35 | let s:I1 = luaeval('require("kreative.highlights.integrations.lightline").insertMode_a()') 36 | let s:I2 = luaeval('require("kreative.highlights.integrations.lightline").insertMode_b()') 37 | let s:I3 = luaeval('require("kreative.highlights.integrations.lightline").insertMode_c()') 38 | let s:R1 = luaeval('require("kreative.highlights.integrations.lightline").replaceMode_a()') 39 | let s:R2 = luaeval('require("kreative.highlights.integrations.lightline").replaceMode_b()') 40 | let s:R3 = luaeval('require("kreative.highlights.integrations.lightline").replaceMode_c()') 41 | let s:V1 = luaeval('require("kreative.highlights.integrations.lightline").visualMode_a()') 42 | let s:V2 = luaeval('require("kreative.highlights.integrations.lightline").visualMode_b()') 43 | let s:V3 = luaeval('require("kreative.highlights.integrations.lightline").visualMode_c()') 44 | let s:IA = luaeval('require("kreative.highlights.integrations.lightline").inactiveGroup()') 45 | let s:T1 = luaeval('require("kreative.highlights.integrations.lightline").terminalMode_a()') 46 | let s:T2 = luaeval('require("kreative.highlights.integrations.lightline").terminalMode_b()') 47 | let s:T3 = luaeval('require("kreative.highlights.integrations.lightline").terminalMode_c()') 48 | 49 | let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}} 50 | 51 | " Color options {{{ 52 | " Normal: {{{ 53 | let s:p.normal.left = [ s:N1, s:N2 ] 54 | let s:p.normal.middle = [ s:N3 ] 55 | let s:p.normal.right = [ s:N1, s:N2 ] 56 | " }}} 57 | " Inactive: {{{ 58 | let s:p.inactive.left = [ s:IA, s:IA ] 59 | let s:p.inactive.middle = [ s:IA ] 60 | let s:p.inactive.right = [ s:IA, s:IA ] 61 | " }}} 62 | " Insert: {{{ 63 | let s:p.insert.left = [ s:I1, s:I2 ] 64 | let s:p.insert.middle = [ s:I3 ] 65 | let s:p.insert.right = [ s:I1, s:I2 ] 66 | " }}} 67 | " Replace: {{{ 68 | let s:p.replace.left = [ s:R1, s:R2 ] 69 | let s:p.replace.middle = [ s:R3 ] 70 | let s:p.replace.right = [ s:R1, s:R2 ] 71 | " }}} 72 | " Visual: {{{ 73 | let s:p.visual.left = [ s:V1, s:V2 ] 74 | let s:p.visual.middle = [ s:V3 ] 75 | let s:p.visual.right = [ s:V1, s:V2 ] 76 | " }}} 77 | " Tabline: {{{ 78 | let s:p.tabline.left = [ s:N1, s:V2 ] 79 | let s:p.tabline.middle = [ s:V3 ] 80 | let s:p.tabline.right = [ s:V1, s:V2 ] 81 | let s:p.tabline.tab_sel = [ s:I1 ] 82 | " }}} 83 | " }}} 84 | 85 | let g:lightline#colorscheme#kat#palette = s:p 86 | 87 | -------------------------------------------------------------------------------- /fnl/kreative/highlights/filetype/vim.fnl: -------------------------------------------------------------------------------- 1 | (module kreative.highlights.filetype.vim 2 | {autoload {ucolors kreative.utils.highlight.utils 3 | colors kreative.color 4 | syntax kreative.highlights.syntax 5 | run kreative.utils.highlight.run 6 | groups kreative.highlights.main}}) 7 | 8 | ; this handles the vim filetype 9 | 10 | (defn high-colors [] 11 | [{:group :vimCommentTitle 12 | :fg colors.kreative.bg.shadow.color 13 | :bg colors.kreative.fg.shadow.color 14 | :ctermfg 8 15 | :ctermbg 15 16 | :bold true 17 | :italic true} 18 | {:group :vimBracket 19 | :fg colors.kreative.pink.match_fg.color 20 | :bg :SKIP 21 | :ctermfg 5 22 | :ctermbg :SKIP} 23 | {:group :vimMapModKey 24 | :fg colors.kreative.pink.match_fg.color 25 | :bg :SKIP 26 | :ctermfg 5 27 | :ctermbg :SKIP} 28 | {:group :vimFuncSID 29 | :fg colors.kreative.fg.umbra.color 30 | :bg :SKIP 31 | :ctermfg 15 32 | :ctermbg :SKIP} 33 | {:group :vimSetSep 34 | :fg colors.kreative.fg.umbra.color 35 | :bg :SKIP 36 | :ctermfg 15 37 | :ctermbg :SKIP} 38 | {:group :vimSep 39 | :fg colors.kreative.fg.umbra.color 40 | :bg :SKIP 41 | :ctermfg 15 42 | :ctermbg :SKIP} 43 | {:group :vimContinue 44 | :fg colors.kreative.fg.umbra.color 45 | :bg :SKIP 46 | :ctermfg 15 47 | :ctermbg :SKIP} 48 | {:group :vimOperParen :link :Variable} 49 | {:group :vimFunction :link :Function} 50 | {:group :vimIsCommand :link :Identifier} 51 | {:group :vimUserFunc :link :Function}]) 52 | 53 | (defn init [] (run.highlight$<-table (high-colors))) 54 | -------------------------------------------------------------------------------- /fnl/kreative/highlights/filetype/vimwiki.fnl: -------------------------------------------------------------------------------- 1 | (module kreative.highlights.filetype.vimwiki 2 | {autoload {ucolors kreative.utils.highlight.utils 3 | colors kreative.color 4 | syntax kreative.highlights.syntax 5 | run kreative.utils.highlight.run 6 | groups kreative.highlights.main}}) 7 | 8 | ; this handles vimwiki 9 | 10 | (defn high-colors [] [{:group :VimwikiMarkers 11 | :fg colors.kreative.bg.fifth.color 12 | :bg :SKIP 13 | :ctermfg 7 14 | :ctermbg :SKIP} 15 | {:group :VimwikiLink 16 | :fg colors.kreative.orange.base.color 17 | :bg :SKIP 18 | :ctermfg 3 19 | :ctermbg :SKIP 20 | :bold true 21 | :underline true 22 | :sp colors.kreative.orange.base.color} 23 | {:group :VimwikiList 24 | :fg colors.kreative.blue.base.color 25 | :bg :SKIP 26 | :ctermfg 4 27 | :ctermbg :SKIP 28 | :bold true} 29 | {:group :VimwikiCheckBoxDone 30 | :fg colors.kreative.green.auto.color 31 | :bg :SKIP 32 | :ctermfg 2 33 | :ctermbg :SKIP 34 | :bold true} 35 | {:group :VimwikiTag 36 | :fg colors.kreative.red.base.color 37 | :bg :SKIP 38 | :ctermfg 1 39 | :ctermbg :SKIP 40 | :bold true} 41 | {:group :VimwikiDelText 42 | :fg colors.kreative.pink.base.color 43 | :bg :SKIP 44 | :ctermfg 5 45 | :ctermbg :SKIP 46 | :strikethrough true} 47 | {:group :VimwikiCode 48 | :fg colors.kreative.fg.meld.color 49 | :bg colors.kreative.bg.shadow.color 50 | :ctermfg 15 51 | :ctermbg 8} 52 | {:group :VimwikiHeader1 53 | :fg (ucolors.darken colors.kreative.blue.base.color 0.0) 54 | :bg :SKIP 55 | :ctermfg 4 56 | :ctermbg :SKIP 57 | :bold true} 58 | {:group :VimwikiHeader2 59 | :fg (ucolors.darken colors.kreative.blue.base.color 0.3) 60 | :bg :SKIP 61 | :ctermfg 12 62 | :ctermbg :SKIP 63 | :bold true} 64 | {:group :VimwikiHeader3 65 | :fg (ucolors.darken colors.kreative.orange.base.color 0.0) 66 | :bg :SKIP 67 | :ctermfg 3 68 | :ctermbg :SKIP 69 | :bold true} 70 | {:group :VimwikiHeader4 71 | :fg (ucolors.darken colors.kreative.orange.base.color 0.3) 72 | :bg :SKIP 73 | :ctermfg 11 74 | :ctermbg :SKIP 75 | :bold true} 76 | {:group :VimwikiHeader5 77 | :fg (ucolors.darken colors.kreative.pink.base.color 0.0) 78 | :bg :SKIP 79 | :ctermfg 5 80 | :ctermbg :SKIP 81 | :bold true} 82 | {:group :VimwikiHeader6 83 | :fg (ucolors.darken colors.kreative.pink.base.color 0.3) 84 | :bg :SKIP 85 | :ctermfg 13 86 | :ctermbg :SKIP 87 | :bold true}]) 88 | 89 | (defn init [] (run.highlight$<-table (high-colors))) 90 | -------------------------------------------------------------------------------- /fnl/kreative/highlights/integrations/airline.fnl: -------------------------------------------------------------------------------- 1 | (local ucolors (require :kreative.utils.highlight.utils)) 2 | (local colors (require :kreative.color)) 3 | (local syntax (require :kreative.highlights.syntax)) 4 | (local groups (require :kreative.highlights.main)) 5 | (local main (require :kreative.main)) 6 | (local mainFG ((. (require :kreative.highlights.main) :mainFG))) 7 | 8 | (if (and (= main.configs.background :dark) (= main.configs.contrast :soft)) 9 | (do 10 | (tset mainFG 1 (ucolors.brighten colors.kreative.fg.auto.color 0.8)))) 11 | 12 | (fn normalMode_c [] 13 | (local output {1 colors.kreative.fg.auto.color 14 | 2 colors.kreative.pink.base.color 15 | 3 7 16 | 4 5 17 | 5 ""}) 18 | output) 19 | 20 | (fn normalMode_b [] 21 | (local output {1 colors.kreative.fg.auto.color 22 | 2 colors.kreative.blue.mix_shadow_bg.color 23 | 3 7 24 | 4 4 25 | 5 ""}) 26 | output) 27 | 28 | (fn normalMode_a [] 29 | (local output {1 colors.kreative.fg.auto.color 30 | 2 colors.kreative.purple.base.color 31 | 3 7 32 | 4 6 33 | 5 ""}) 34 | output) 35 | 36 | (fn replaceMode_c [] 37 | (local output {1 colors.kreative.fg.auto.color 38 | 2 colors.kreative.blue.brighten.color 39 | 3 7 40 | 4 4 41 | 5 ""}) 42 | output) 43 | 44 | (fn replaceMode_b [] 45 | (local output {1 colors.kreative.fg.auto.color 46 | 2 colors.kreative.blue.mix_shadow_bg.color 47 | 3 7 48 | 4 12 49 | 5 ""}) 50 | output) 51 | 52 | (fn replaceMode_a [] 53 | (local output {1 colors.kreative.fg.auto.color 54 | 2 colors.kreative.orange.base.color 55 | 3 7 56 | 4 3 57 | 5 :bold}) 58 | output) 59 | 60 | (fn visualMode_c [] 61 | (local output {1 colors.kreative.fg.auto.color 62 | 2 colors.kreative.purple.base.color 63 | 3 7 64 | 4 6 65 | 5 ""}) 66 | output) 67 | 68 | (fn visualMode_b [] 69 | (local output {1 colors.kreative.fg.auto.color 70 | 2 colors.kreative.blue.mix_shadow_bg.color 71 | 3 7 72 | 4 12 73 | 5 ""}) 74 | output) 75 | 76 | (fn visualMode_a [] 77 | (local output {1 colors.kreative.fg.auto.color 78 | 2 colors.kreative.red.base.color 79 | 3 7 80 | 4 1 81 | 5 :bold}) 82 | output) 83 | 84 | (fn insertMode_c [] 85 | (local output {1 colors.kreative.fg.auto.color 86 | 2 (ucolors.brighten colors.kreative.blue.base.color 0.2) 87 | 3 7 88 | 4 4 89 | 5 ""}) 90 | output) 91 | 92 | (fn insertMode_b [] 93 | (local output {1 colors.kreative.fg.auto.color 94 | 2 colors.kreative.blue.mix_shadow_bg.color 95 | 3 7 96 | 4 12 97 | 5 ""}) 98 | output) 99 | 100 | (fn insertMode_a [] 101 | (local output {1 colors.kreative.fg.auto.color 102 | 2 colors.kreative.blue.base.color 103 | 3 7 104 | 4 4 105 | 5 :bold}) 106 | output) 107 | 108 | (fn terminalMode_c [] 109 | (local output {1 colors.kreative.fg.auto.color 110 | 2 colors.kreative.red.match_bg.color 111 | 3 7 112 | 4 1 113 | 5 ""}) 114 | output) 115 | 116 | (fn terminalMode_b [] 117 | (local output {1 colors.kreative.fg.auto.color 118 | 2 colors.kreative.blue.mix_shadow_bg.color 119 | 3 7 120 | 4 12 121 | 5 ""}) 122 | output) 123 | 124 | (fn terminalMode_a [] 125 | (local output {1 colors.kreative.fg.auto.color 126 | 2 colors.kreative.pink.match_bg.color 127 | 3 7 128 | 4 13 129 | 5 :bold}) 130 | output) 131 | 132 | (fn inactiveGroup [] 133 | (local output {1 colors.kreative.bg.base.color 134 | 2 colors.kreative.fg.shadow.color 135 | 3 7 136 | 4 8 137 | 5 ""}) 138 | output) 139 | 140 | (fn warningGroup [] 141 | (local output {1 colors.kreative.fg.auto.color 142 | 2 colors.kreative.red.match_bg.color 143 | 3 7 144 | 4 9 145 | 5 ""}) 146 | output) 147 | 148 | (fn errorGroup [] 149 | (local output {1 colors.kreative.fg.auto.color 150 | 2 colors.kreative.red.base.color 151 | 3 7 152 | 4 1 153 | 5 ""}) 154 | output) 155 | 156 | (fn modifiedC [mode] 157 | (var output {}) 158 | (match mode 159 | :normal (do 160 | (set output {1 colors.kreative.fg.auto.color 2 "" 3 7 4 "" 5 ""})) 161 | :insert (do 162 | (set output {1 colors.kreative.fg.auto.color 2 "" 3 7 4 "" 5 ""})) 163 | :replace (do 164 | (set output {1 colors.kreative.fg.auto.color 2 "" 3 7 4 "" 5 ""})) 165 | :visual (do 166 | (set output {1 colors.kreative.fg.auto.color 2 "" 3 7 4 "" 5 ""})) 167 | :inactive (do 168 | (set output {1 colors.kreative.bg.base.color 2 "" 3 0 4 "" 5 ""}))) 169 | output) 170 | -------------------------------------------------------------------------------- /fnl/kreative/highlights/integrations/bufferline.fnl: -------------------------------------------------------------------------------- 1 | (module kreative.highlights.integrations.bufferline 2 | {autoload {ucolors kreative.utils.highlight.utils 3 | colors kreative.color}}) 4 | 5 | (defn init [] 6 | ((. (require :bufferline) :setup) 7 | {:highlights {:fill {:guifg colors.kreative.pink.base.color 8 | :guibg colors.kreative.pink.base.color} 9 | :tab {:guifg colors.kreative.fg.auto.color 10 | :guibg colors.kreative.purple.base.color} 11 | :tab_selected {:guifg colors.kreative.fg.auto.color 12 | :guibg colors.kreative.blue.base.color} 13 | :tab_close {:guifg colors.kreative.fg.auto.color 14 | :guibg colors.kreative.purple.base.color 15 | :gui "bold,italic"} 16 | :info {:guifg colors.kreative.fg.auto.color 17 | :guibg colors.kreative.blue.base.color} 18 | :buffer_visible {:guifg colors.kreative.fg.auto.color 19 | :guibg colors.kreative.blue.match_bg.color} 20 | :buffer_selected {:guifg colors.kreative.fg.auto.color 21 | :guibg colors.kreative.blue.base.color 22 | :gui "bold,italic"} 23 | :close_button {:guifg colors.kreative.fg.auto.color 24 | :guibg colors.kreative.purple.base.color 25 | :gui :bold} 26 | :close_button_visible {:guifg colors.kreative.fg.auto.color 27 | :guibg colors.kreative.blue.match_bg.color 28 | :gui :bold} 29 | :close_button_selected {:guifg colors.kreative.fg.auto.color 30 | :guibg colors.kreative.blue.base.color 31 | :gui :bold} 32 | :modified {:guifg colors.kreative.red.match_bg.color 33 | :guibg colors.kreative.purple.base.color} 34 | :modified_visible {:guifg colors.kreative.red.match_bg.color 35 | :guibg colors.kreative.blue.match_bg.color} 36 | :modified_selected {:guifg colors.kreative.red.match_bg.color 37 | :guibg colors.kreative.blue.base.color} 38 | :duplicate_selected {:guifg colors.kreative.fg.auto.color 39 | :guibg colors.kreative.blue.base.color} 40 | :duplicate_visible {:guifg colors.kreative.fg.auto.color 41 | :guibg colors.kreative.blue.match_bg.color} 42 | :duplicate {:guifg colors.kreative.fg.auto.color 43 | :guibg colors.kreative.purple.base.color} 44 | :separator_selected {:guifg colors.kreative.pink.base.color 45 | :guibg colors.kreative.blue.base.color} 46 | :separator_visible {:guifg colors.kreative.pink.base.color 47 | :guibg colors.kreative.blue.match_bg.color} 48 | :separator {:guifg colors.kreative.pink.base.color 49 | :guibg colors.kreative.purple.base.color} 50 | :indicator_selected {:guifg colors.kreative.fg.auto.color 51 | :guibg colors.kreative.blue.base.color} 52 | :pick_selected {:guifg colors.kreative.fg.auto.color 53 | :guibg colors.kreative.blue.base.color} 54 | :pick_visible {:guifg colors.kreative.fg.auto.color 55 | :guibg colors.kreative.blue.base.color} 56 | :pick {:guifg colors.kreative.fg.auto.color 57 | :guibg colors.kreative.blue.base.color} 58 | :background {:guifg colors.kreative.fg.auto.color 59 | :guibg colors.kreative.purple.base.color}}})) 60 | -------------------------------------------------------------------------------- /fnl/kreative/highlights/integrations/cmp.fnl: -------------------------------------------------------------------------------- 1 | (module kreative.highlights.integrations.cmp 2 | {autoload {ucolors kreative.utils.highlight.utils 3 | colors kreative.color 4 | syntax kreative.highlights.syntax 5 | run kreative.utils.highlight.run 6 | groups kreative.highlights.main}}) 7 | 8 | ;;; This handles nvim-cmp 9 | 10 | (defn high-colors [] [{:group :CmpItemKind 11 | :fg colors.kreative.blue.base.color 12 | :bg (ucolors.brighten colors.kreative.pink.base.color 0.1) 13 | :ctermfg 4 14 | :ctermbg 5}]) 15 | 16 | (defn init [] (run.highlight$<-table (high-colors))) 17 | -------------------------------------------------------------------------------- /fnl/kreative/highlights/integrations/coc.fnl: -------------------------------------------------------------------------------- 1 | (module kreative.highlights.integrations.coc 2 | {autoload {ucolors kreative.utils.highlight.utils 3 | colors kreative.color 4 | syntax kreative.highlights.syntax 5 | run kreative.utils.highlight.run 6 | groups kreative.highlights.main}}) 7 | 8 | ;;; This handles coc.nvim colors 9 | 10 | (defn high-colors [] [{:group :CocErrorSign 11 | :fg colors.kreative.red.base.color 12 | :bg :SKIP 13 | :ctermfg 1 14 | :ctermbg :SKIP 15 | :bold true} 16 | {:group :CocWarningSign 17 | :fg colors.kreative.red.match_bg.color 18 | :bg :SKIP 19 | :ctermfg 9 20 | :ctermbg :SKIP 21 | :bold true} 22 | {:group :CocInfoSign 23 | :fg colors.kreative.orange.base.color 24 | :bg :SKIP 25 | :ctermfg 3 26 | :ctermbg :SKIP 27 | :bold true} 28 | {:group :CocHintSign 29 | :fg colors.kreative.green.auto.color 30 | :bg :SKIP 31 | :ctermfg 2 32 | :ctermbg :SKIP 33 | :bold true} 34 | {:group :CocErrorFloat 35 | :fg colors.kreative.red.base.color 36 | :bg colors.kreative.bg.umbra.color 37 | :ctermfg 1 38 | :ctermbg 8} 39 | {:group :CocWarningFloat 40 | :fg colors.kreative.red.match_bg.color 41 | :bg colors.kreative.bg.umbra.color 42 | :ctermfg 9 43 | :ctermbg 8} 44 | {:group :CocInfoFloat 45 | :fg colors.kreative.orange.base.color 46 | :bg colors.kreative.bg.umbra.color 47 | :ctermfg 3 48 | :ctermbg 8} 49 | {:group :CocHintFloat 50 | :fg colors.kreative.green.auto.color 51 | :bg colors.kreative.bg.umbra.color 52 | :ctermfg 2 53 | :ctermbg 8} 54 | {:group :CocDiagnosticsError 55 | :fg colors.kreative.red.base.color 56 | :bg :SKIP 57 | :ctermfg 1 58 | :ctermbg :SKIP} 59 | {:group :CocDiagnosticsWarning 60 | :fg colors.kreative.red.match_bg.color 61 | :bg :SKIP 62 | :ctermfg 9 63 | :ctermbg :SKIP} 64 | {:group :CocDiagnosticsInfo 65 | :fg colors.kreative.orange.base.color 66 | :bg :SKIP 67 | :ctermfg 3 68 | :ctermbg :SKIP} 69 | {:group :CocDiagnosticsHint 70 | :fg colors.kreative.green.auto.color 71 | :bg :SKIP 72 | :ctermfg 2 73 | :ctermbg :SKIP} 74 | {:group :CocErrorHighlight 75 | :fg :SKIP 76 | :bg :SKIP 77 | :ctermfg :SKIP 78 | :ctermbg :NONE 79 | :undercurl true 80 | :sp colors.kreative.red.base.color} 81 | {:group :CocWarningHighlight 82 | :fg :SKIP 83 | :bg :SKIP 84 | :ctermfg :SKIP 85 | :ctermbg :NONE 86 | :undercurl true 87 | :sp colors.kreative.red.match_bg.color} 88 | {:group :CocInfoHighlight 89 | :fg :SKIP 90 | :bg :SKIP 91 | :ctermfg :SKIP 92 | :ctermbg :NONE 93 | :undercurl true 94 | :sp colors.kreative.orange.base.color} 95 | {:group :CocHintHighlight 96 | :fg :SKIP 97 | :bg :SKIP 98 | :ctermfg :SKIP 99 | :ctermbg :NONE 100 | :undercurl true 101 | :sp colors.kreative.green.auto.color} 102 | {:group :CocSelectedText 103 | :fg :SKIP 104 | :bg colors.kreative.red.darken.color 105 | :ctermfg :SKIP 106 | :ctermbg 9} 107 | {:group :CocCodeLens 108 | :fg colors.kreative.bg.meld.color 109 | :bg :SKIP 110 | :ctermfg 15 111 | :ctermbg :SKIP}]) 112 | 113 | (defn init [] (run.highlight$<-table (high-colors))) 114 | -------------------------------------------------------------------------------- /fnl/kreative/highlights/integrations/fugitive.fnl: -------------------------------------------------------------------------------- 1 | (module kreative.highlights.integrations.fugitive 2 | {autoload {ucolors kreative.utils.highlight.utils 3 | colors kreative.color 4 | syntax kreative.highlights.syntax 5 | run kreative.utils.highlight.run 6 | groups kreative.highlights.main}}) 7 | 8 | (defn high-colors [] [{:group :fugitiveHunk 9 | :fg :SKIP 10 | :bg colors.kreative.bg.shadow.color 11 | :ctermfg :SKIP 12 | :ctermbg 8 13 | :nocombine true} 14 | {:group :gitDiff 15 | :fg :SKIP 16 | :bg colors.kreative.bg.shadow.color 17 | :ctermfg :SKIP 18 | :ctermbg 8 19 | :nocombine true}]) 20 | 21 | (defn init [] (run.highlight$<-table (high-colors))) 22 | -------------------------------------------------------------------------------- /fnl/kreative/highlights/integrations/gitsigns.fnl: -------------------------------------------------------------------------------- 1 | (module kreative.highlights.integrations.gitsigns 2 | {autoload {ucolors kreative.utils.highlight.utils 3 | colors kreative.color 4 | syntax kreative.highlights.syntax 5 | run kreative.utils.highlight.run 6 | groups kreative.highlights.main}}) 7 | 8 | (defn high-colors [] [{:group :GitSignsAdd 9 | :fg colors.kreative.green.auto.color 10 | :bg :SKIP 11 | :ctermfg 10 12 | :ctermbg :SKIP 13 | :bold true} 14 | {:group :GitSignsAddLn 15 | :fg :SKIP 16 | :bg (ucolors.blend colors.kreative.green.auto.color 17 | colors.kreative.bg.base.color 0.4) 18 | :ctermfg :SKIP 19 | :ctermbg 10} 20 | {:group :GitSignsAddLnInline 21 | :fg :SKIP 22 | :bg (ucolors.blend colors.kreative.green.auto.color 23 | colors.kreative.bg.base.color 0.6) 24 | :ctermfg :SKIP 25 | :ctermbg 10} 26 | {:group :GitSignsChange 27 | :fg colors.kreative.blue.base.color 28 | :bg :SKIP 29 | :ctermfg 12 30 | :ctermbg :SKIP 31 | :bold true} 32 | {:group :GitSignsChangeLn 33 | :fg :SKIP 34 | :bg (ucolors.blend colors.kreative.blue.base.color 35 | colors.kreative.bg.base.color 0.4) 36 | :ctermfg :SKIP 37 | :ctermbg 12} 38 | {:group :GitSignsChangeLnInline 39 | :fg :SKIP 40 | :bg (ucolors.blend colors.kreative.blue.base.color 41 | colors.kreative.bg.base.color 0.6) 42 | :ctermfg :SKIP 43 | :ctermbg 12} 44 | {:group :GitSignsDelete 45 | :fg colors.kreative.red.base.color 46 | :bg :SKIP 47 | :ctermfg 1 48 | :ctermbg :SKIP 49 | :bold true} 50 | {:group :GitSignsDeleteLn 51 | :fg :SKIP 52 | :bg (ucolors.blend colors.kreative.red.base.color 53 | colors.kreative.bg.base.color 0.4) 54 | :ctermfg :SKIP 55 | :ctermbg 9} 56 | {:group :GitSignsDeleteLnInline 57 | :fg :SKIP 58 | :bg (ucolors.blend colors.kreative.red.base.color 59 | colors.kreative.bg.base.color 0.6) 60 | :ctermfg :SKIP 61 | :ctermbg 9}]) 62 | 63 | (defn init [] (run.highlight$<-table (high-colors))) 64 | -------------------------------------------------------------------------------- /fnl/kreative/highlights/integrations/indent_blankline.fnl: -------------------------------------------------------------------------------- 1 | (module kreative.highlights.integrations.indent_blankline 2 | {autoload {ucolors kreative.utils.highlight.utils 3 | colors kreative.color 4 | syntax kreative.highlights.syntax 5 | run kreative.utils.highlight.run 6 | groups kreative.highlights.main}}) 7 | 8 | (defn high-colors [] [{:group :IndentBlanklineChar 9 | :fg colors.kreative.bg.shadow.color 10 | :bg :SKIP 11 | :ctermfg 8 12 | :ctermbg :SKIP 13 | :nocombine true} 14 | {:group :IndentBlanklineSpaceChar 15 | :fg colors.kreative.bg.shadow.color 16 | :bg :SKIP 17 | :ctermfg 8 18 | :ctermbg :SKIP 19 | :nocombine true} 20 | {:group :IndentBlanklineSpaceChar 21 | :fg colors.kreative.bg.shadow.color 22 | :bg :SKIP 23 | :ctermfg 8 24 | :ctermbg :SKIP 25 | :nocombine true} 26 | {:group :IndentBlanklineContextChar 27 | :fg colors.kreative.blue.base.color 28 | :bg :SKIP 29 | :ctermfg 4 30 | :ctermbg :SKIP 31 | :nocombine true}]) 32 | 33 | (defn init [] (run.highlight$<-table (high-colors))) 34 | -------------------------------------------------------------------------------- /fnl/kreative/highlights/integrations/lightline.fnl: -------------------------------------------------------------------------------- 1 | (local ucolors (require :kreative.utils.highlight.utils)) 2 | (local colors (require :kreative.color)) 3 | (local syntax (require :kreative.highlights.syntax)) 4 | (local groups (require :kreative.highlights.main)) 5 | (local main (require :kreative.main)) 6 | (local mainFG ((. (require :kreative.highlights.main) :mainFG))) 7 | 8 | (if (and (= main.configs.background :dark) (= main.configs.contrast :soft)) 9 | (do 10 | (tset mainFG 1 (ucolors.brighten colors.kreative.fg.auto.color 0.8)))) 11 | 12 | (fn mainFG [] 13 | (var output colors.kreative.fg.auto.color) 14 | (if (and (= main.configs.background :dark) 15 | (= main.configs.contrast :soft)) 16 | (do 17 | (set output (ucolors.brighten colors.kreative.fg.auto.color 0.8)))) 18 | output) 19 | 20 | (fn normalMode_c [] 21 | (local output {1 colors.kreative.fg.auto.color 22 | 2 colors.kreative.pink.base.color 23 | 3 7 24 | 4 5 25 | 5 ""}) 26 | output) 27 | 28 | (fn normalMode_b [] 29 | (local output {1 colors.kreative.fg.auto.color 30 | 2 colors.kreative.blue.mix_shadow_bg.color 31 | 3 7 32 | 4 12 33 | 5 ""}) 34 | output) 35 | 36 | (fn normalMode_a [] 37 | (local output {1 colors.kreative.fg.auto.color 38 | 2 colors.kreative.purple.base.color 39 | 3 7 40 | 4 6 41 | 5 :bold}) 42 | output) 43 | 44 | (fn replaceMode_c [] 45 | (local output {1 colors.kreative.fg.auto.color 46 | 2 colors.kreative.blue.brighten.color 47 | 3 7 48 | 4 4 49 | 5 ""}) 50 | output) 51 | 52 | (fn replaceMode_b [] 53 | (local output {1 colors.kreative.fg.auto.color 54 | 2 colors.kreative.blue.mix_shadow_bg.color 55 | 3 7 56 | 4 12 57 | 5 ""}) 58 | output) 59 | 60 | (fn replaceMode_a [] 61 | (local output {1 colors.kreative.fg.auto.color 62 | 2 colors.kreative.orange.base.color 63 | 3 7 64 | 4 3 65 | 5 :bold}) 66 | output) 67 | 68 | (fn visualMode_c [] 69 | (local output {1 colors.kreative.fg.auto.color 70 | 2 colors.kreative.purple.base.color 71 | 3 7 72 | 4 6 73 | 5 ""}) 74 | output) 75 | 76 | (fn visualMode_b [] 77 | (local output {1 colors.kreative.fg.auto.color 78 | 2 colors.kreative.blue.mix_shadow_bg.color 79 | 3 7 80 | 4 12 81 | 5 ""}) 82 | output) 83 | 84 | (fn visualMode_a [] 85 | (local output {1 colors.kreative.fg.auto.color 86 | 2 colors.kreative.red.base.color 87 | 3 7 88 | 4 colors.kreative.red.base.color 89 | 5 :bold}) 90 | output) 91 | 92 | (fn insertMode_c [] 93 | (local output {1 colors.kreative.fg.auto.color 94 | 2 colors.kreative.blue.brighten.color 95 | 3 7 96 | 4 4 97 | 5 ""}) 98 | output) 99 | 100 | (fn insertMode_b [] 101 | (local output {1 colors.kreative.fg.auto.color 102 | 2 colors.kreative.blue.mix_shadow_bg.color 103 | 3 7 104 | 4 12 105 | 5 ""}) 106 | output) 107 | 108 | (fn insertMode_a [] 109 | (local output {1 colors.kreative.fg.auto.color 110 | 2 colors.kreative.blue.base.color 111 | 3 7 112 | 4 4 113 | 5 :bold}) 114 | output) 115 | 116 | (fn terminalMode_c [] 117 | (local output {1 colors.kreative.fg.auto.color 118 | 2 (ucolors.blend colors.kreative.red.base.color 119 | colors.kreative.bg.base.color 0.8) 120 | 3 7 121 | 4 9 122 | 5 ""}) 123 | output) 124 | 125 | (fn terminalMode_b [] 126 | (local output {1 colors.kreative.fg.auto.color 127 | 2 colors.kreative.blue.mix_shadow_bg.color 128 | 3 7 129 | 4 12 130 | 5 ""}) 131 | output) 132 | 133 | (fn terminalMode_a [] 134 | (local output {1 colors.kreative.fg.auto.color 135 | 2 (ucolors.blend colors.kreative.pink.base.color 136 | colors.kreative.bg.base.color 0.8) 137 | 3 7 138 | 4 5 139 | 5 :bold}) 140 | output) 141 | 142 | (fn inactiveGroup [] 143 | (local output {1 colors.kreative.bg.base.color 144 | 2 colors.kreative.fg.shadow.color 145 | 3 0 146 | 4 15 147 | 5 ""}) 148 | output) 149 | 150 | (fn warningGroup [] 151 | (local output {1 colors.kreative.fg.auto.color 152 | 2 colors.kreative.red.match_bg.color 153 | 3 7 154 | 4 9 155 | 5 ""}) 156 | output) 157 | 158 | (fn errorGroup [] 159 | (local output {1 colors.kreative.fg.auto.color 160 | 2 colors.kreative.red.base.color 161 | 3 7 162 | 4 1 163 | 5 ""}) 164 | output) 165 | 166 | (fn modifiedC [mode] 167 | (var output {}) 168 | (match mode 169 | :normal (do 170 | (set output {1 colors.kreative.fg.auto.color 2 "" 3 7 4 "" 5 ""})) 171 | :insert (do 172 | (set output {1 colors.kreative.fg.auto.color 2 "" 3 7 4 "" 5 ""})) 173 | :replace (do 174 | (set output {1 colors.kreative.fg.auto.color 2 "" 3 7 4 "" 5 ""})) 175 | :visual (do 176 | (set output {1 colors.kreative.fg.auto.color 2 "" 3 7 4 "" 5 ""})) 177 | :inactive (do 178 | (set output {1 colors.kreative.bg.base.color 2 "" 3 0 4 "" 5 ""}))) 179 | output) 180 | -------------------------------------------------------------------------------- /fnl/kreative/highlights/integrations/startify.fnl: -------------------------------------------------------------------------------- 1 | (module kreative.highlights.integrations.startify 2 | {autoload {ucolors kreative.utils.highlight.utils 3 | colors kreative.color 4 | syntax kreative.highlights.syntax 5 | run kreative.utils.highlight.run 6 | groups kreative.highlights.main}}) 7 | 8 | ;;; This handles Startify 9 | 10 | (defn high-colors [] [{:group :StartifyBracket 11 | :fg colors.kreative.blue.mix_meld_bg.color 12 | :bg :SKIP 13 | :ctermfg 4 14 | :ctermbg :SKIP 15 | :bold true} 16 | {:group :StartifyFile 17 | :fg colors.kreative.purple.match_fg.color 18 | :bg :SKIP 19 | :ctermfg 6 20 | :ctermbg :SKIP 21 | :bold true} 22 | {:group :StartifyNumber 23 | :fg colors.kreative.blue.base.color 24 | :bg :SKIP 25 | :ctermfg 4 26 | :ctermbg :SKIP 27 | :bold true} 28 | {:group :StartifyPath 29 | :fg colors.kreative.bg.sixth.color 30 | :bg :SKIP 31 | :ctermfg 4 32 | :ctermbg :SKIP} 33 | {:group :StartifySlash 34 | :fg colors.kreative.fg.meld.color 35 | :bg :SKIP 36 | :ctermfg 7 37 | :ctermbg :SKIP} 38 | {:group :StartifySection 39 | :fg colors.kreative.red.match_fg.color 40 | :bg :SKIP 41 | :ctermfg 9 42 | :ctermbg :SKIP 43 | :bold true} 44 | {:group :StartifySpecial 45 | :fg colors.kreative.bg.sixth.color 46 | :bg :SKIP 47 | :ctermfg 12 48 | :ctermbg :SKIP} 49 | {:group :StartifyHeader 50 | :fg colors.kreative.pink.base.color 51 | :bg :SKIP 52 | :ctermfg 5 53 | :ctermbg :SKIP} 54 | {:group :StartifyFooter 55 | :fg colors.kreative.bg.meld.color 56 | :bg :SKIP 57 | :ctermfg 4 58 | :ctermbg :SKIP}]) 59 | 60 | (defn init [] (run.highlight$<-table (high-colors))) 61 | -------------------------------------------------------------------------------- /fnl/kreative/highlights/integrations/ts_rainbow.fnl: -------------------------------------------------------------------------------- 1 | (module kreative.highlights.integrations.ts_rainbow 2 | {autoload {ucolors kreative.utils.highlight.utils 3 | colors kreative.color 4 | syntax kreative.highlights.syntax 5 | run kreative.utils.highlight.run 6 | groups kreative.highlights.main}}) 7 | 8 | ;;; This file handles ts-rainbow colors 9 | 10 | (defn high-colors [] [{:group :rainbowcol1 11 | :fg (ucolors.blend colors.kreative.red.base.color 12 | colors.kreative.fg.meld.color 0.8) 13 | :bg :SKIP 14 | :ctermfg 1 15 | :ctermbg :SKIP} 16 | {:group :rainbowcol2 17 | :fg (ucolors.blend colors.kreative.pink.base.color 18 | colors.kreative.fg.meld.color 0.8) 19 | :bg :SKIP 20 | :ctermfg 2 21 | :ctermbg :SKIP} 22 | {:group :rainbowcol3 23 | :fg (ucolors.blend colors.kreative.purple.base.color 24 | colors.kreative.fg.meld.color 0.8) 25 | :bg :SKIP 26 | :ctermfg 3 27 | :ctermbg :SKIP} 28 | {:group :rainbowcol4 29 | :fg (ucolors.blend colors.kreative.blue.base.color 30 | colors.kreative.fg.meld.color 0.8) 31 | :bg :SKIP 32 | :ctermfg 4 33 | :ctermbg :SKIP} 34 | {:group :rainbowcol5 35 | :fg (ucolors.blend colors.kreative.green.base.color 36 | colors.kreative.fg.meld.color 0.8) 37 | :bg :SKIP 38 | :ctermfg 5 39 | :ctermbg :SKIP} 40 | {:group :rainbowcol6 41 | :fg (ucolors.blend colors.kreative.orange.base.color 42 | colors.kreative.fg.meld.color 0.8) 43 | :bg :SKIP 44 | :ctermfg 6 45 | :ctermbg :SKIP} 46 | {:group :rainbowcol7 47 | :fg (ucolors.blend colors.kreative.bg.sixth.color 48 | colors.kreative.fg.meld.color 0.8) 49 | :bg :SKIP 50 | :ctermfg 7 51 | :ctermbg :SKIP}]) 52 | 53 | (defn init [] (run.highlight$<-table (high-colors))) 54 | -------------------------------------------------------------------------------- /fnl/kreative/highlights/terminal.fnl: -------------------------------------------------------------------------------- 1 | (module kreative.highlights.terminal 2 | {require {colors kreative.color 3 | ucolors kreative.utils.highlight.utils 4 | main kreative.main} 5 | require-macros [katcros-fnl.macros.nvim.api.options.macros]}) 6 | 7 | ; this affects the terminal 8 | 9 | (defn init [] 10 | (set-vars g 11 | {:terminal_color_0 colors.kreative.bg.base.color 12 | :terminal_color_1 colors.kreative.red.base.color 13 | :terminal_color_2 colors.kreative.green.base.color 14 | :terminal_color_3 colors.kreative.orange.base.color 15 | :terminal_color_4 colors.kreative.blue.base.color 16 | :terminal_color_5 colors.kreative.pink.base.color 17 | :terminal_color_6 colors.kreative.purple.base.color 18 | :terminal_color_7 colors.kreative.fg.base.color 19 | :terminal_color_8 colors.kreative.bg.umbra.color 20 | :terminal_color_15 colors.kreative.fg.umbra.color}) 21 | (if (= main.configs.background :light) 22 | (set-vars g 23 | {:terminal_color_9 (ucolors.darken colors.kreative.red.base.color 24 | 0.2) 25 | :terminal_color_10 (ucolors.darken colors.kreative.green.base.color 26 | 0.2) 27 | :terminal_color_11 (ucolors.darken colors.kreative.orange.base.color 28 | 0.2) 29 | :terminal_color_12 (ucolors.darken colors.kreative.blue.base.color 30 | 0.2) 31 | :terminal_color_13 (ucolors.darken colors.kreative.pink.base.color 32 | 0.2) 33 | :terminal_color_14 (ucolors.darken colors.kreative.purple.base.color 34 | 0.2)}) 35 | (set-vars g 36 | {:terminal_color_9 (ucolors.brighten colors.kreative.red.base.color 37 | 0.2) 38 | :terminal_color_10 (ucolors.brighten colors.kreative.green.base.color 39 | 0.2) 40 | :terminal_color_11 (ucolors.brighten colors.kreative.orange.base.color 41 | 0.2) 42 | :terminal_color_12 (ucolors.brighten colors.kreative.blue.base.color 43 | 0.2) 44 | :terminal_color_13 (ucolors.brighten colors.kreative.pink.base.color 45 | 0.2) 46 | :terminal_color_14 (ucolors.brighten colors.kreative.purple.base.color 47 | 0.2)}))) 48 | -------------------------------------------------------------------------------- /fnl/kreative/main.fnl: -------------------------------------------------------------------------------- 1 | (module kreative.main 2 | {autoload {message kreative.utils.messages.init 3 | options kreative.utils.options.init 4 | override kreative.utils.override.init 5 | json kreative.utils.json.init 6 | write kreative.utils.json.write 7 | read kreative.utils.json.read 8 | run kreative.utils.highlight.run 9 | colors kreative.color} 10 | require-macros [katcros-fnl.macros.nvim.api.options.macros 11 | katcros-fnl.macros.nvim.api.utils.macros]}) 12 | 13 | ;;; Main plugin interface 14 | 15 | ;; fnlfmt: skip 16 | (defn init [opts] "Main plugin interface" ; define some defaults 17 | (def configs (options.default opts)) 18 | (set colors.kreative {}) 19 | (when vim.g.colors_name 20 | (do-ex highlight "clear")) 21 | (when (= (vim.fn.exists :syntax_on) 1) 22 | (do-ex syntax "reset")) 23 | (set configs.contrast (assert (?. opts :contrast) "Please add a contrast to your opts table")) 24 | (set configs.background vim.o.background) 25 | (set-var :g :colors_name (assert (?. opts :colors_name) "Please add a colors_name to your opts table")) 26 | (set configs.colors_name opts.colors_name) 27 | (colors.update) 28 | (let [rendered-length (do (var i 0) 29 | (let [files (override.main-files)] 30 | (when files 31 | (each [k _ (pairs (override.main-files) :until (> i 0))] 32 | (set i (+ i 1))))) 33 | i) 34 | matcher (string.format "%s-%s.json" configs.colors_name configs.background) 35 | integrations (let [output {}] 36 | (each [_ v (pairs configs.integrations)] 37 | (tset output (.. "integrations." v) true)) 38 | (each [_ v (pairs configs.filetypes)] 39 | (tset output (.. "filetype." v) true)) 40 | output)] 41 | (if (json.exists? :main) 42 | (run.highlight$<-table (read.file! :main)) 43 | (do 44 | ((. (require :kreative.highlights.main) :init)) 45 | (when opts.render 46 | (write.file! :main (json.encode (json.file-parse :main)))))) 47 | (if (json.exists? :syntax) 48 | (run.highlight$<-table (read.file! :syntax)) 49 | (do 50 | ((. (require :kreative.highlights.syntax) :init)) 51 | (when opts.render 52 | (write.file! :syntax (json.encode (json.file-parse :syntax)))))) 53 | ;; Very large increase in startup time 54 | (if (> rendered-length 0) 55 | ;; If there's json files found: 56 | ;; go through integrations and load the file if it was found 57 | (each [key _ (pairs integrations)] 58 | (if (json.exists? key) 59 | (run.highlight$<-table (read.file! key)) 60 | (do 61 | ((. (require (.. :kreative.highlights. key)) :init)) 62 | (when opts.render 63 | (write.file! key (json.encode (json.file-parse key))))))) 64 | ;; full fallback 65 | (do 66 | (each [key _ (pairs integrations)] 67 | ((. (require (.. :kreative.highlights. key)) :init)) 68 | (when opts.render 69 | (write.file! key (json.encode (json.file-parse key))))))) 70 | ;; From here to there doesn't need to be done until after any other loading 71 | ;; TODO: fix loading so for somethings 72 | ;; from here 73 | ((. (require :kreative.highlights.terminal) :init)) 74 | (require :kreative.utils.export.init) 75 | ((. (require :kreative.utils.export.render) :init)))) 76 | ;; to there 77 | ;; Load in overrides from end user 78 | ; (let [has-overrides (override.files)] 79 | ; (when has-overrides 80 | ; (each [file _ (pairs has-overrides)] 81 | ; (when (string.find file matcher 1 true) 82 | ; (run.highlight$<-table (read.full-file! file)))))))) 83 | -------------------------------------------------------------------------------- /fnl/kreative/utils/export/kitty.fnl: -------------------------------------------------------------------------------- 1 | (module kreative.utils.export.kitty 2 | {autoload {ucolors kreative.utils.highlight.utils 3 | colors kreative.color 4 | groups kreative.highlights.main 5 | main kreative.main 6 | export kreative.utils.export.init}}) 7 | 8 | ;;; This module exports the 16 colors for kitty 9 | 10 | ;; require vim.loop 11 | (def- loop vim.loop) 12 | 13 | (def comment-type "#") 14 | 15 | ;; FN -- generates a table of colors for kitty colors 16 | ;; $output -- a table of colors where the key is the string for kitty group 17 | (defn gen-colors [] "Export a table of strings for kitty" 18 | (let [output {:foreground colors.kreative.fg.auto.color 19 | :background colors.kreative.bg.base.color 20 | :selection_foreground colors.kreative.fg.auto.color 21 | :selection_background colors.kreative.blue.base.color 22 | :cursor colors.kreative.fg.auto.color 23 | :cursor_text_color colors.kreative.bg.base.color 24 | :url_color colors.kreative.orange.base.color 25 | :active_border_color colors.kreative.blue.base.color 26 | :inactive_border_color colors.kreative.bg.meld.color 27 | :bell_border_color colors.kreative.green.auto.color 28 | ;; Tabs 29 | :active_tab_foreground colors.kreative.fg.auto.color 30 | :active_tab_background colors.kreative.blue.base.color 31 | :inactive_tab_foreground colors.kreative.fg.auto.color 32 | :inactive_tab_background (ucolors.blend colors.kreative.purple.base.color 33 | colors.kreative.bg.meld.color 34 | 0.5) 35 | :tab_bar_background colors.kreative.pink.base.color 36 | :tab_bar_margin_color colors.kreative.orange.base.color 37 | ;; Marks 38 | :mark1_foreground colors.kreative.bg.base.color 39 | :mark1_background colors.kreative.red.base.color 40 | :mark2_foreground colors.kreative.bg.base.color 41 | :mark2_background colors.kreative.blue.base.color 42 | :mark3_foreground colors.kreative.bg.base.color 43 | :mark3_background colors.kreative.green.auto.color 44 | ;; Colors 45 | :color0 colors.kreative.bg.base.color 46 | :color1 colors.kreative.red.base.color 47 | :color2 colors.kreative.green.base.color 48 | :color3 colors.kreative.orange.base.color 49 | :color4 colors.kreative.blue.base.color 50 | :color5 colors.kreative.pink.base.color 51 | :color6 colors.kreative.purple.base.color 52 | :color7 colors.kreative.fg.auto.color 53 | :color8 colors.kreative.bg.umbra.color 54 | :color15 colors.kreative.fg.umbra.color}] 55 | (if (= main.configs.background :light) 56 | (do 57 | (tset output :color9 58 | (ucolors.darken colors.kreative.red.base.color 0.2)) 59 | (tset output :color10 60 | (ucolors.darken colors.kreative.green.base.color 0.2)) 61 | (tset output :color11 62 | (ucolors.darken colors.kreative.orange.base.color 0.2)) 63 | (tset output :color12 64 | (ucolors.darken colors.kreative.blue.base.color 0.2)) 65 | (tset output :color13 66 | (ucolors.darken colors.kreative.pink.base.color 0.2)) 67 | (tset output :color14 68 | (ucolors.darken colors.kreative.purple.base.color 0.2))) 69 | (do 70 | (tset output :color9 71 | (ucolors.brighten colors.kreative.red.base.color 0.2)) 72 | (tset output :color10 73 | (ucolors.brighten colors.kreative.green.base.color 0.2)) 74 | (tset output :color11 75 | (ucolors.brighten colors.kreative.orange.base.color 0.2)) 76 | (tset output :color12 77 | (ucolors.brighten colors.kreative.blue.base.color 0.2)) 78 | (tset output :color13 79 | (ucolors.brighten colors.kreative.pink.base.color 0.2)) 80 | (tset output :color14 81 | (ucolors.brighten colors.kreative.purple.base.color 0.2)))) 82 | output)) 83 | 84 | ;; FN -- output kitty string to a file at the current working directory 85 | (defn output! [] (let [file-name (string.format "kitty-%s-%s.conf" 86 | (tostring main.configs.colors_name) 87 | (tostring main.configs.background)) 88 | fd (assert (loop.fs_open file-name :w 0))] 89 | (assert (loop.fs_chmod file-name 420)) 90 | (assert (loop.fs_write fd 91 | (export.string->one-line-color (gen-colors) 92 | :kitty) 93 | 0)) 94 | (export.notify$ :kitty) 95 | (assert (loop.fs_close fd)))) 96 | -------------------------------------------------------------------------------- /fnl/kreative/utils/export/render.fnl: -------------------------------------------------------------------------------- 1 | (module kreative.utils.export.render 2 | {autoload {color-table kreative.color 3 | main kreative.main 4 | json kreative.utils.json.init 5 | read kreative.utils.json.read 6 | write kreative.utils.json.write 7 | message kreative.utils.message.init} 8 | require-macros [katcros-fnl.macros.nvim.api.utils.macros 9 | katcros-fnl.macros.nvim.api.options.macros]}) 10 | 11 | ;;; This module handles exporting the current color scheme to a set of predefined colors 12 | 13 | ;; FN -- deal with rendering the groups needed 14 | (defn file [] "Render to file for built in color files" 15 | (let [backgrounds [:light :dark] 16 | old-background main.configs.background] 17 | (each [_ v (ipairs backgrounds)] 18 | (set main.configs.background v) 19 | (color-table.update) 20 | (each [_ file (ipairs json.files)] 21 | (write.file! file (json.encode (json.file-parse file)))) 22 | (write.colors!)) 23 | (set main.configs.background old-background))) 24 | 25 | (defn file* [] "Render to file for just current background" 26 | (each [_ file (ipairs json.files)] 27 | (write.file! file (json.encode (json.file-parse file)))) 28 | (write.colors!)) 29 | 30 | (defn- color [args mutations] "Render color for a variation 31 | @args -- a seq table of arguments 32 | 1. table of highlight tables 33 | 2. source 34 | 3. colors_name 35 | @mutations -- a seq table of mutations to use 36 | 1. background 37 | 2. contrast" 38 | (set main.configs.background (. mutations 1)) 39 | (set main.configs.contrast (. mutations 2)) (color-table.update) 40 | (write.override-file! (json.encode (. args 2)) (. args 1) (. args 3))) 41 | 42 | (defn- color* [args] "Render for all color variants 43 | @args -- a seq table of arguments 44 | 1. table of highlight tables 45 | 2. source 46 | 3. colors_name" 47 | (let [colors [[:light :soft :kat.nwim] 48 | [:light :hard :kat.nvim] 49 | [:dark :soft :kat.nwim] 50 | [:dark :hard :kat.nvim]]] 51 | (each [_ mutator (pairs colors)] 52 | (set main.configs.background (. mutator 1)) 53 | (set main.configs.contrast (. mutator 2)) 54 | (color-table.update) 55 | (write.override-file! (json.encode (. args 2)) (. args 1) 56 | (. mutator 3))) 57 | (set main.configs.background old-background) 58 | (set main.configs.contrast old-contrast))) 59 | 60 | (defn override [args] "Override groups of colors 61 | Takes a single table, of which contains 2 keys 62 | 1. 'source' a string that describes the source this override comes from 63 | - implies your account name 64 | 2. the override type which is used to declare the override 65 | - can be one of the following 66 | - 'light_hard' 67 | - 'dark_hard' 68 | - 'light_soft' 69 | - 'dark_soft' 70 | The second key contains a table of highlight tables. 71 | It is best to make an override for each possible 2nd key" 72 | (let [old-contrast main.configs.contrast 73 | old-background main.configs.background 74 | assertion []] 75 | (each [k _ (pairs args)] 76 | (table.insert assertion true)) 77 | (assert (= (length assertion) 2) "only 2 arguments allowed") 78 | (if (?. args :light_hard) 79 | (color [args.source args.light_hard :kat.nvim 80 | [:light :hard]])) 81 | (if (?. args :light_soft) 82 | (color [args.source args.light_soft :kat.nwim 83 | [:light :soft]])) 84 | (if (?. args :dark_hard) 85 | (color [args.source args.dark_hard :kat.nvim] [:dark :hard])) 86 | (if (?. args :dark_soft) 87 | (color [args.source args.dark_soft :kat.nwim] [:dark :soft])) 88 | (set main.configs.background old-background) 89 | (set main.configs.contrast old-contrast))) 90 | 91 | (defn override_all [args] "Override all possible colors with no variation 92 | Takes a table of 2 values 93 | 1. 'source' - a string that describes the source this override comes from 94 | - implies your account name 95 | 2. a table of highlight tables 96 | This is generally recommended if your override doesn't have to change for the variations 97 | of kat.nvim" 98 | (let [old-contrast main.configs.contrast 99 | old-background main.configs.background 100 | assertion []] 101 | (each [k _ (pairs args)] 102 | (table.insert assertion true)) 103 | (assert (= (length assertion) 2) "only 2 arguments allowed") 104 | (color* [args.source (. args 1)]) 105 | (set main.configs.background old-background) 106 | (set main.configs.contrast old-contrast))) 107 | 108 | (defn init [] (cre-command :KreativeRenderColor 109 | (fn [] 110 | (file)) 111 | "Render kat.nvim colorscheme to file")) 112 | -------------------------------------------------------------------------------- /fnl/kreative/utils/export/rxvt.fnl: -------------------------------------------------------------------------------- 1 | (module kreative.utils.export.rxvt 2 | {autoload {ucolors kreative.utils.highlight.utils 3 | colors kreative.color 4 | groups kreative.highlights.main 5 | main kreative.main 6 | export kreative.utils.export.init}}) 7 | 8 | ;;; Exports 16 colors for rxvt-unicode 9 | 10 | (def- loop vim.loop) 11 | 12 | (def comment-type "!") 13 | 14 | ;; FN -- generates a table of colors for rxvt 15 | ;; $output -- table of colors where the key is the string for the rxvt group 16 | (defn gen-colors [] "Exports a table of strings for Urxvt" 17 | (let [output {"*foreground:" colors.kreative.fg.auto.color 18 | "*background:" colors.kreative.bg.base.color 19 | "*cursorColor:" colors.kreative.fg.auto.color 20 | "*fadeColor:" colors.kreative.bg.meld.color 21 | "*pointerColorForeground:" colors.kreative.fg.auto.color 22 | "*pointerColorBackground:" colors.kreative.bg.base.color 23 | "Urxvt*foreground:" colors.kreative.fg.auto.color 24 | "Urxvt*background:" colors.kreative.bg.base.color 25 | ; :selection_foreground colors.kreative.fg.auto.color 26 | ; :selection_background colors.kreative.blue.base.color 27 | ; :contrast main.configs.contrast 28 | ; :shade main.configs.background 29 | ; :cursor (. colors.kreative.fg.auto.color 1) 30 | ; :cursor_text_color :background 31 | "URxvt*color0:" colors.kreative.bg.base.color 32 | "URxvt*color1:" colors.kreative.red.base.color 33 | "URxvt*color2:" colors.kreative.green.base.color 34 | "URxvt*color3:" colors.kreative.orange.base.color 35 | "URxvt*color4:" colors.kreative.blue.base.color 36 | "URxvt*color5:" colors.kreative.pink.base.color 37 | "URxvt*color6:" colors.kreative.purple.base.color 38 | "URxvt*color7:" colors.kreative.fg.auto.color 39 | "URxvt*color8:" colors.kreative.bg.umbra.color 40 | "URxvt*color15:" colors.kreative.fg.umbra.color}] 41 | (if (= main.configs.background :light) 42 | (do 43 | (tset output "URxvt*color9:" 44 | (ucolors.darken colors.kreative.red.base.color 0.2)) 45 | (tset output "URxvt*color10:" 46 | (ucolors.darken colors.kreative.green.base.color 0.2)) 47 | (tset output "URxvt*color11:" 48 | (ucolors.darken colors.kreative.orange.base.color 0.2)) 49 | (tset output "URxvt*color12:" 50 | (ucolors.darken colors.kreative.blue.base.color 0.2)) 51 | (tset output "URxvt*color13:" 52 | (ucolors.darken colors.kreative.pink.base.color 0.2)) 53 | (tset output "URxvt*color14:" 54 | (ucolors.darken colors.kreative.purple.base.color 0.2))) 55 | (do 56 | (tset output "URxvt*color9:" 57 | (ucolors.brighten colors.kreative.red.base.color 0.2)) 58 | (tset output "URxvt*color10:" 59 | (ucolors.brighten colors.kreative.green.base.color 0.2)) 60 | (tset output "URxvt*color11:" 61 | (ucolors.brighten colors.kreative.orange.base.color 0.2)) 62 | (tset output "URxvt*color12:" 63 | (ucolors.brighten colors.kreative.blue.base.color 0.2)) 64 | (tset output "URxvt*color13:" 65 | (ucolors.brighten colors.kreative.pink.base.color 0.2)) 66 | (tset output "URxvt*color14:" 67 | (ucolors.brighten colors.kreative.purple.base.color 0.2)))) 68 | output)) 69 | 70 | ;; FN -- output rxvt string to a file at the current working directory 71 | (defn output! [] (let [file-name (string.format "Urxvt-%s-%s.Xresources" 72 | (tostring main.configs.colors_name) 73 | (tostring main.configs.background)) 74 | fd (assert (loop.fs_open file-name :w 0))] 75 | (assert (loop.fs_chmod file-name 420)) 76 | (assert (loop.fs_write fd 77 | (export.string->one-line-color (gen-colors) 78 | :rxvt-unicode) 79 | 0)) 80 | (export.notify$ :rxvt-unicode) 81 | (assert (loop.fs_close fd)))) 82 | -------------------------------------------------------------------------------- /fnl/kreative/utils/highlight/get.fnl: -------------------------------------------------------------------------------- 1 | (module kreative.utils.highlight.get 2 | {autoload {s aniseed.string a aniseed.core}}) 3 | 4 | ;;; Handles general manipulation of highlight groups 5 | 6 | (defn group [table] "Get the group name of a highlight group" (?. table :group)) 7 | 8 | (defn gui-fg [table] "Get the gui foreground of a highlight group" 9 | (?. table :fg)) 10 | 11 | (defn gui-bg [table] "Get the gui background of a highlight group" 12 | (?. table :bg)) 13 | 14 | (defn term-fg [table] "Get the term foreground of a highlight group" 15 | (?. table :ctermfg)) 16 | 17 | (defn term-bg [table] "Get the term background of a highlight group" 18 | (?. table :ctermbg)) 19 | 20 | (defn special [table] "Get the special colors of a highlight group" 21 | (?. table :sp)) 22 | 23 | (defn blend [table] "Get the blend of a highlight group" (?. table :blend)) 24 | 25 | (defn link [table] "Get the linking group for a highlight group" 26 | (?. table :link)) 27 | 28 | (defn default [table] "Get default key for a highlight group" 29 | (?. table :default)) 30 | 31 | (defn all-attr->table [table#] "Get the boolean attributes of a highlight group 32 | as a table" 33 | (let [output {}] 34 | (each [k v (pairs table#)] 35 | ;; specifically look for non-nil values 36 | (if (or (= v true) (= v false)) 37 | (tset output k v))) 38 | output)) 39 | -------------------------------------------------------------------------------- /fnl/kreative/utils/highlight/init.fnl: -------------------------------------------------------------------------------- 1 | (module kreative.utils.highlight.init 2 | {autoload {get kreative.utils.highlight.get 3 | utils kreative.utils.highlight.utils}}) 4 | 5 | ;;; Functions for highlighting 6 | 7 | (defn get-existing [group] "Get existing highlights for a highlight group 8 | @group -- group name" 9 | (let [gui (vim.api.nvim_get_hl_by_name group true) 10 | fg (utils.decimal-rgb->hex gui.foreground) 11 | bg (utils.decimal-rgb->hex gui.background) 12 | cterm (vim.api.nvim_get_hl_by_name group false) 13 | ctermfg cterm.foreground 14 | ctermbg cterm.background 15 | bold (?. gui :bold) 16 | underline (?. gui :underline) 17 | underdouble (?. gui :underdouble) 18 | undercurl (?. gui :undercurl) 19 | underdotted (?. gui :underdotted) 20 | underdashed (?. gui :underdashed) 21 | inverse (?. gui :inverse) 22 | italic (?. gui :italic) 23 | standout (?. gui :standout) 24 | nocombine (?. gui :nocombine) 25 | strikethrough (?. gui :strikethrough) 26 | blend (?. gui :blend) 27 | special (utils.decimal-rgb->hex (?. gui :special))] 28 | {: group 29 | : fg 30 | : bg 31 | : ctermbg 32 | : ctermfg 33 | : bold 34 | : underline 35 | : underdouble 36 | : undercurl 37 | : underdotted 38 | : underdashed 39 | : inverse 40 | : italic 41 | : nocombine 42 | : standout 43 | : strikethrough 44 | : blend 45 | : special})) 46 | 47 | (defn overwrite [opts] "Overwrite the values found for a group without clearing them out 48 | @opts -- highlight table" 49 | (let [group (get.group opts) 50 | current-hl (get-existing group) 51 | output (vim.tbl_extend :force current-hl opts)] 52 | (tset output :group nil) 53 | (tset output :default nil) 54 | output)) 55 | 56 | ;; FN -- generate a highlight with the appropriate hex color inputs and group 57 | ;; -- Warning, this is only public for testing, use highlight$ instead 58 | ;; -- Uses nvim api for users of Neovim 0.7 and newer 59 | ;; -- Has sideffects 60 | ;; @opts -- Neovim standard table of highlight values 61 | (defn highlight$ [opts] "Nested highlight function that uses nvim api function to handle 62 | highlighting for Neovim 0.7 and newer users 63 | @opts -- highlight table" 64 | ;; for now assume that a group that has a link will simply be empty otherwise 65 | (if (get.link opts) 66 | (let [group (get.group opts) 67 | link (get.link opts) 68 | args {: link}] 69 | (vim.api.nvim_set_hl 0 group args)) 70 | (get.default opts) 71 | (let [group (get.group opts) 72 | args (overwrite opts)] 73 | (vim.api.nvim_set_hl 0 group args)) 74 | (let [group (get.group opts) 75 | gui-fore (if (and (not= (get.gui-fg opts) nil) 76 | (not= opts.fg :NONE) (not= opts.fg :SKIP)) 77 | opts.fg 78 | nil) 79 | gui-back (if (and (not= (get.gui-bg opts) nil) 80 | (not= opts.bg :NONE) (not= opts.bg :SKIP)) 81 | opts.bg 82 | nil) 83 | c-fore (if (and (not= (get.term-fg opts) nil) 84 | (not= opts.ctermfg :NONE) 85 | (not= opts.ctermfg :SKIP)) 86 | opts.ctermfg 87 | nil) 88 | c-back (if (and (not= (get.term-bg opts) nil) 89 | (not= opts.ctermbg :NONE) 90 | (not= opts.ctermbg :SKIP)) 91 | opts.ctermbg 92 | nil) 93 | args {:fg gui-fore 94 | :bg gui-back 95 | :ctermfg c-fore 96 | :ctermbg c-back 97 | :special (get.special opts) 98 | :blend (get.blend opts)}] 99 | (each [k v (pairs (get.all-attr->table opts))] 100 | (tset args k v)) 101 | (vim.api.nvim_set_hl 0 group args)))) 102 | -------------------------------------------------------------------------------- /fnl/kreative/utils/highlight/run.fnl: -------------------------------------------------------------------------------- 1 | (module kreative.utils.highlight.run 2 | {autoload {a aniseed.core 3 | ucolors kreative.utils.highlight.utils 4 | apply kreative.utils.highlight.init}}) 5 | 6 | ;;; Handles running of highlight groups 7 | 8 | ;; FN -- highlight Neovim with a table of table of values 9 | ;; @high-table -- table to highlight 10 | 11 | ;; fnlfmt: skip 12 | (defn highlight$<-table [high-table] 13 | "Highlight Neovim from a higlight table 14 | Handles evaluating functions and nested tables" 15 | (each [_ value (pairs high-table)] 16 | ;; In some cases we have a function to handle different kinds of 17 | ;; -highlighting of some groups. 18 | ;; Make sure that function does not return incase its not relevant. 19 | (if (= (type value) :function) 20 | (if (and (= (type (value)) :table) (?. (value) 1)) 21 | (each [_ nest (pairs (value))] 22 | (if (= (type nest) :function) 23 | (apply.highlight$ (nest)) 24 | (apply.highlight$ nest))) 25 | ;; Don't pass nil 26 | (when (value) 27 | (apply.highlight$ (value)))) 28 | ;; Everything else should just be a table, but still make sure that 29 | ;; -the nil returning function doesn't go through. 30 | ;; just check if we have a nested table or not 31 | (= (type (?. value 1)) :table) 32 | (each [_ nest (pairs value)] 33 | (apply.highlight$ nest)) 34 | (apply.highlight$ value)))) 35 | -------------------------------------------------------------------------------- /fnl/kreative/utils/highlight/utils.fnl: -------------------------------------------------------------------------------- 1 | (module kreative.utils.highlight.utils 2 | {autoload {hsl externals.hsluv 3 | colors kreative.color 4 | get kreative.utils.highlight.get 5 | a aniseed.core 6 | s aniseed.string} 7 | require-macros [kreative.katcros-fnl.macros.lispism.macros]}) 8 | 9 | ;;; Utilities for color management 10 | 11 | ;; FN -- blend two hex colors based on some alpha value 12 | ;; -- higher alpha means the mix-color is preferred 13 | ;; @source-color -- the color we want to manipulate 14 | ;; @mix-color -- the color we want to mix with 15 | ;; @alpha -- a 0 - 1 decimal value that determines how much mix value is allowed 16 | ;; $output -- blended hex color 17 | (defn blend [source-color mix-color alpha] "Blend two colors by some alpha" 18 | (let [source-color (hsl.hex_to_rgb source-color) 19 | mix-color (hsl.hex_to_rgb mix-color) 20 | return-color (value->table i 3 21 | (let [current-color (+ (* alpha 22 | (. source-color 23 | i)) 24 | (* (- 1 alpha) 25 | (. mix-color i)))] 26 | current-color)) 27 | output (tostring (hsl.rgb_to_hex return-color))] 28 | output)) 29 | 30 | (defn decimal-rgb->hex [rgb] "Converts single number decimal rgb number to hex 31 | @rgb -- single number decimal" 32 | (string.format "#%06x" rgb)) 33 | 34 | ;; FN -- brighten a hex color 35 | ;; @color -- input hex color 36 | ;; @percent -- amount to adjust as a decimal percent 37 | ;; $output -- changed hex color 38 | (defn brighten [color percent] "Brighten a hex color by some percent" 39 | (let [hsl-color (hsl.hex_to_hsluv color) 40 | luminance (- 100 (. hsl-color 3)) 41 | input-luminance (let [mid-luminance (+ (. hsl-color 3) 42 | (* luminance percent))] 43 | (if (>= mid-luminance 100) 99.99 mid-luminance))] 44 | (tset hsl-color 3 input-luminance) 45 | (let [output (hsl.hsluv_to_hex hsl-color)] 46 | output))) 47 | 48 | ;; FN -- brighten a hsluv color table 49 | ;; @tuple -- input color as a 3 value sequential table 50 | ;; @percent -- amount to adjust as a decimal percent 51 | ;; $output -- changed hex color 52 | (defn hsluv-brighten [tuple percent] "Brighten a hsluv color by some percent" 53 | (let [hsl-color tuple 54 | luminance (- 100 (. hsl-color 3)) 55 | input-luminance (let [mid-luminance (* (. hsl-color 3) 56 | (+ 1 percent))] 57 | (if (>= mid-luminance 100) 99.99 mid-luminance))] 58 | (tset hsl-color 3 input-luminance) 59 | (let [output (hsl.hsluv_to_hex hsl-color)] 60 | output))) 61 | 62 | ;; FN -- darken a hex color 63 | ;; @color -- input hex color 64 | ;; @percent -- amount to adjust as a decimal percent 65 | ;; $output -- changed hex color 66 | (defn darken [color percent] "Darken a hex color by some percent" 67 | (let [hsl-color (hsl.hex_to_hsluv color) 68 | luminance (- 100 (. hsl-color 3)) 69 | input-luminance (let [mid-luminance (* (. hsl-color 3) 70 | (- 1 percent))] 71 | (if (>= mid-luminance 100) 99.99 mid-luminance))] 72 | (tset hsl-color 3 input-luminance) 73 | (let [output (hsl.hsluv_to_hex hsl-color)] 74 | output))) 75 | 76 | ;; FN -- change the saturation of a hex color 77 | ;; @color -- input hex color 78 | ;; @percent -- amount to adjust as a decimal percent 79 | ;; $output -- changed hex color 80 | (defn saturation [color percent] 81 | "Change saturation of hex color by some percent" 82 | (let [hsl-color (hsl.hex_to_hsluv color) 83 | saturation (. hsl-color 2) 84 | input-saturation (let [mid-saturation (+ (. hsl-color 2) 85 | (* saturation percent))] 86 | (if (>= mid-saturation 100) 99.99 87 | (<= mid-saturation 0) 0.01 88 | mid-saturation))] 89 | (tset hsl-color 2 input-saturation) 90 | (let [output (hsl.hsluv_to_hex hsl-color)] 91 | output))) 92 | -------------------------------------------------------------------------------- /fnl/kreative/utils/json/init.fnl: -------------------------------------------------------------------------------- 1 | (module kreative.utils.json.init 2 | {autoload {main kreative.main} 3 | require-macros [katcros-fnl.macros.nvim.api.utils.macros]}) 4 | 5 | ;;; JSON manipulation 6 | 7 | (defonce std-data (let [fpath (do-viml stdpath :data)] 8 | (.. fpath :/kat))) 9 | 10 | ;; TODO: move this somewhere better 11 | (defonce files [:main 12 | :syntax 13 | :integrations.cmp 14 | :integrations.coc 15 | :integrations.fugitive 16 | :integrations.gitsigns 17 | :integrations.indent_blankline 18 | :integrations.lsp 19 | :integrations.startify 20 | :integrations.treesitter 21 | :integrations.ts_rainbow 22 | :filetype.markdown 23 | :filetype.vim 24 | :filetype.vimwiki]) 25 | 26 | (defn path [] (.. std-data :/kreative/json/ main.configs.colors_name "/")) 27 | 28 | ;; TODO: move this somewhere better 29 | (defn expand-table [tbl] "Expands a table so that no functions remain 30 | @tbl -- lua table 31 | Returns a lua table" 32 | (let [output []] 33 | (each [k value (pairs tbl)] 34 | ;; check for function 35 | (if (= (type value) :function) ;; if table and isn't empty 36 | (if (and (= (type (value)) :table) (?. (value) 1)) 37 | (each [_ nest (pairs (value))] 38 | (if (= (type nest) :function) 39 | ;; Execute if function 40 | (table.insert output (nest)) 41 | (table.insert output nest))) 42 | ;; else is function 43 | ;; Don't pass nil 44 | (when (value) 45 | (table.insert output (value)))) 46 | ;; if just table 47 | (= (type (?. value 1)) :table) (each [_ nest (pairs value)] 48 | (table.insert output nest)) 49 | (table.insert output value))) 50 | output)) 51 | 52 | (defn encode [tbl] "Encode lua table as a json\n@tbl -- a valid Lua table" 53 | (-> tbl 54 | (expand-table) 55 | (vim.json.encode))) 56 | 57 | (defn encode-simple [tbl] "Encode pure lua table as json 58 | @tbl -- lua table with no functions" 59 | (vim.json.encode tbl)) 60 | 61 | ;; fnlfmt: skip 62 | (defn decode [json] 63 | "Decode json into a lua table 64 | @json -- a valid json object" 65 | (vim.json.decode json)) 66 | 67 | (defn ->file! [file json] "Store json to file 68 | @file -- a json file path 69 | @json -- a valid json object" 70 | (os.execute (.. "rm -f " file)) 71 | (with-open [json-file (io.open file :w)] 72 | (json-file:write json))) 73 | 74 | (defn exists? [file] "See if json file exists" 75 | (do-viml filereadable 76 | (string.format "%s%s-%s.json" (path) 77 | file 78 | main.configs.background))) 79 | 80 | (defn <-file [file] "Read stored json 81 | @file -- a json file path 82 | Returns empty table upon nil file" 83 | (let [json-file (io.open file :r)] 84 | (if json-file 85 | (do 86 | (let [out (json-file:read :*a)] 87 | (io.close json-file) 88 | out)) 89 | "{}"))) 90 | 91 | (defn file-parse [suffix] 92 | "Returns 'high-colors' function from a file 93 | Searches from 'kreative.highlights' 94 | @suffix -- based on the module structure of this plugin 95 | with 'kreative.highlights' removed from the module name" 96 | (let [file (string.format "kreative.highlights.%s" suffix)] 97 | ((. (require file) :high-colors)))) 98 | -------------------------------------------------------------------------------- /fnl/kreative/utils/json/read.fnl: -------------------------------------------------------------------------------- 1 | (module kreative.utils.json.read 2 | {autoload {json kreative.utils.json.init main kreative.main}}) 3 | 4 | ;;; Handles reading json files 5 | 6 | ;; fnlfmt: skip 7 | (defn file! [file] 8 | "Reads a json file 9 | @file -- pathless, extensionless file name" 10 | (json.decode (json.<-file (string.format "%s/%s-%s.json" (json.path) 11 | file 12 | main.configs.background)))) 13 | 14 | (defn full-file! [full-file] "Reads from a full file path 15 | @full-file -- full file path to a json file" 16 | (json.decode (json.<-file (string.format "%s%s" (json.path) full-file)))) 17 | 18 | (defn colors [dir] "Read colors table from file for much faster startup" 19 | (let [file (json.<-file (string.format 20 | "%s/colors-%s.json" dir 21 | main.configs.background))] 22 | (if (> (length file) 0) 23 | (json.decode file) 24 | nil))) 25 | -------------------------------------------------------------------------------- /fnl/kreative/utils/json/write.fnl: -------------------------------------------------------------------------------- 1 | (module kreative.utils.json.write 2 | {autoload {json kreative.utils.json.init 3 | main kreative.main 4 | color-table kreative.color} 5 | require-macros [katcros-fnl.macros.nvim.api.utils.macros]}) 6 | 7 | ;;; Handles writing json to file 8 | 9 | (defn file! [file source-json] "Writes a json file to std 10 | @file -- a file name with no path 11 | @source-json -- a valid json object" 12 | (do-viml system (string.format "mkdir -p %s" (json.path))) 13 | (json.->file! (string.format "%s/%s-%s.json" (json.path) 14 | file 15 | main.configs.background) 16 | source-json)) 17 | 18 | (defn override-file! [source-json override colors_name] 19 | "Writes a json file to std for overriding 20 | @source-json -- a valid json object 21 | @override -- the name of the override 22 | @colors_name -- name of colorscheme" 23 | (do-viml system (string.format "mkdir -p %s" (json.path))) 24 | (do-viml system (string.format "mkdir -p %s" (.. (json.path) override))) 25 | (json.->file! (string.format "%s%s/%s-%s.json" (json.path) override 26 | colors_name main.configs.background) 27 | source-json)) 28 | 29 | (defn colors [dir] "Writes colors table to file for much faster startup" 30 | ; (do-ex colorscheme :kat.nvim) 31 | (let [colors [[:light :soft :kat.nwim] 32 | [:light :hard :kat.nvim] 33 | [:dark :soft :kat.nwim] 34 | [:dark :hard :kat.nvim]]] 35 | (set main.configs.background "") 36 | (set main.configs.contrast "") 37 | (set main.configs.colors_name "") 38 | (each [_ v (pairs colors)] 39 | (set main.configs.background (. v 1)) 40 | (set main.configs.contrast (. v 2)) 41 | (set main.configs.colors_name (. v 3)) 42 | (json.->file! (string.format "%s/colors-%s-%s.json" dir (. v 3) 43 | (. v 1)) 44 | (json.encode-simple (color-table.output)))) 45 | (set main.configs.background old-background) 46 | (set main.configs.contrast old-contrast) 47 | (set main.configs.colors_name old-colors-name))) 48 | 49 | (defn colors! [] "Read colors table from file for much faster startup" 50 | (do-viml system (string.format "mkdir -p %s" (json.path))) 51 | (json.->file! (string.format "%s/colors-%s.json" (json.path) 52 | main.configs.background) 53 | (json.encode-simple (color-table.output)))) 54 | -------------------------------------------------------------------------------- /fnl/kreative/utils/message/init.fnl: -------------------------------------------------------------------------------- 1 | (module kreative.utils.message.init) 2 | 3 | ;;; Generically message handling 4 | 5 | ;;; Messages are currently split up into multiple functions and- 6 | ;;; error codes are declared at the time of usage. This compounds- 7 | ;;; a lot of overall problems; code duplication, potential overloading- 8 | ;;; of error codes, etc... Hopefully this module will clear up these issues 9 | 10 | ;;; Private values 11 | 12 | ;; Table -- a table of notifications to connect messages to more logically 13 | ;; -- general layout: 14 | ;; --> {:module-of-notification {:type {:number val :message val}}} 15 | ;; %module-of-error -- simply just the truncated module name i.e. utils.message.init 16 | ;; %type -- a shorthand description of the notification at hand 17 | ;; %number -- a number for the index, so it can be looked up like Vim errors 18 | ;; %message -- the message itself, can be an unformatted string 19 | 20 | ;; fnlfmt: skip 21 | (defonce- notifications 22 | { 23 | :main { 24 | :render-disable {:number 3 25 | :type :error 26 | :message "Pre-compiled color files are not supported atm, please set 'render' to true in your colorscheme file created for Kreative"}} 27 | :utils.export.render { 28 | :compilation-dev {:number 1 29 | :type :warn 30 | :message "Compilation is a development feature, please consider setting \"vim.g.kat_nvim_compile_enable\" to false"}} 31 | :utils.export.init { 32 | :not-colorscheme {:number 1 33 | :type :error 34 | :message "Not a theme made with Kreative, theme won't compile"} 35 | :invalid-arg {:number 2 36 | :type :error 37 | :message "'%s' is not a valid argument for :KreativeGenTermTheme, check supported terminals or enclose in quotes if nvim-0.7 is not available"} 38 | :term-theme-generated {:number 1 39 | :type :info 40 | :message "%s color file generated at cwd using %s colorscheme with %s background"}}}) 41 | 42 | ;; FN -- wraps vim.notify for messaging needs 43 | ;; @log-level -- string of the log level desired 44 | ;; @message -- the message to output 45 | (defn- notify$ [log-level message] "Wrapper for vim.notify" 46 | (match log-level 47 | :error (vim.notify message vim.log.levels.ERROR) 48 | :warn (vim.notify message vim.log.levels.WARN) 49 | :info (vim.notify message vim.log.levels.INFO) 50 | :debug (vim.notify message vim.log.levels.DEBUG) 51 | :trace (vim.notify message vim.log.levels.TRACE))) 52 | 53 | ;;; Public values 54 | 55 | ;; FN -- group of functions to output messages needed 56 | ;; @message -- can be any string message, ideally uses '<-table' 57 | (defn error$ [message] "Output error message" (notify$ :error message)) 58 | 59 | (defn warn$ [message] "Output warn message" (notify$ :warn message)) 60 | 61 | (defn info$ [message] "Output info message" (notify$ :info message)) 62 | 63 | (defn debug$ [message] "Output debug message" (notify$ :debug message)) 64 | 65 | (defn trace$ [message] "Output trace message" (notify$ :trace message)) 66 | 67 | ;; FN -- constructs message to be output 68 | ;; @from-module -- what module the message is coming from 69 | ;; @message-type -- what type of message it is 70 | (defn <-table [from-module message-type] 71 | "Constructs message based on the internal table" 72 | (let [message-table (. (. notifications from-module) message-type) 73 | notify-type (match message-table.type 74 | :error :E 75 | :warn :W 76 | :info :I 77 | :debug :D 78 | :trace :T) 79 | output (string.format "Kreative %s%s: %s" notify-type 80 | message-table.number message-table.message)] 81 | output)) 82 | -------------------------------------------------------------------------------- /fnl/kreative/utils/options/init.fnl: -------------------------------------------------------------------------------- 1 | (module kreative.utils.options.init 2 | {autoload {main kreative.main} 3 | require-macros [katcros-fnl.macros.nvim.api.options.macros]}) 4 | 5 | ;;; Module for option management 6 | 7 | ;; FN -- check global variables and set to default values if needed 8 | (defn default [opts] "Set options table from color file to default and output" 9 | (let [output {}] 10 | (if (?. opts :integrations) 11 | (set output.integrations opts.integrations) 12 | (set output.integrations 13 | [:treesitter 14 | :lsp 15 | :ts_rainbow 16 | :indent_blankline 17 | :startify 18 | :coc 19 | :cmp 20 | :gitsigns 21 | :fugitive])) 22 | (if (?. opts :filetypes) 23 | (set output.filetypes opts.filetypes) 24 | (set output.filetypes [:vim :vimwiki :markdown])) 25 | (if (?. opts :comment_style) 26 | (set output.comment_style opts.comment_style) 27 | (set output.comment_style [:italic])) 28 | (if (?. opts :render) 29 | (set output.render opts.render) 30 | (set output.render false)) 31 | (set output.version :0.8) 32 | output)) 33 | -------------------------------------------------------------------------------- /fnl/kreative/utils/override/init.fnl: -------------------------------------------------------------------------------- 1 | (module kreative.utils.override.init 2 | {autoload {json kreative.utils.json.init}}) 3 | 4 | ;;; Handles loading in overrides dynamically 5 | 6 | (defn main-files [] "Returns a table of the main json files found, if any" 7 | (let [fd (vim.loop.fs_opendir (json.path) nil (* (length json.files) 2)) 8 | output {}] 9 | (if fd 10 | (let [dir (vim.loop.fs_readdir fd)] 11 | (when dir 12 | (each [_ descriptor (pairs dir)] 13 | (when (= descriptor.type :file) 14 | (tset output descriptor.name true))) 15 | (vim.loop.fs_closedir fd) 16 | output)) 17 | (do 18 | {})))) 19 | 20 | (defn get-dir [] "Get directories for override files to look through" 21 | (let [desc-num (+ 10 (* (length json.files) 4)) 22 | fd (vim.loop.fs_opendir (json.path) nil desc-num) 23 | output {}] 24 | (if fd 25 | (do 26 | (each [_ descriptor (pairs (vim.loop.fs_readdir fd))] 27 | (when (= descriptor.type :directory) 28 | (tset output descriptor.name true))) 29 | (vim.loop.fs_closedir fd) 30 | output) 31 | (do 32 | nil)))) 33 | 34 | (defn files [] "Returns a table of override files found, if any" 35 | (let [desc-num 20 36 | dirs (get-dir) 37 | output {}] 38 | (if dirs 39 | (do 40 | (each [dir _ (pairs dirs)] 41 | (let [fd (vim.loop.fs_opendir (.. (json.path) dir) nil desc-num)] 42 | (when fd 43 | (do 44 | (each [_ descriptor (pairs (vim.loop.fs_readdir fd))] 45 | (when (= descriptor.type :file) 46 | (do 47 | (tset output (.. dir "/" descriptor.name) true)))))) 48 | (vim.loop.fs_closedir fd))) 49 | output) 50 | (do 51 | nil)))) 52 | -------------------------------------------------------------------------------- /fnl/lualine/themes/kreative.fnl: -------------------------------------------------------------------------------- 1 | (local ucolors (require :kreative.utils.highlight.utils)) 2 | (local colors (require :kreative.color)) 3 | (local kreative {}) 4 | 5 | (if (= vim.o.termguicolors true) 6 | (do 7 | (tset kreative :normal {:a {:bg colors.kreative.purple.base.color 8 | :fg colors.kreative.fg.auto.color 9 | :gui :bold} 10 | :b {:bg colors.kreative.blue.mix_shadow_bg_more.color 11 | :fg colors.kreative.fg.auto.color} 12 | :c {:bg colors.kreative.pink.base.color 13 | :fg colors.kreative.fg.auto.color}}) 14 | (tset kreative :insert {:a {:bg colors.kreative.blue.base.color 15 | :fg colors.kreative.fg.auto.color 16 | :gui :bold} 17 | :b {:bg colors.kreative.blue.mix_shadow_bg_more.color 18 | :fg colors.kreative.fg.auto.color} 19 | :c {:bg colors.kreative.blue.brighten.color 20 | :fg colors.kreative.fg.auto.color}}) 21 | (tset kreative :visual {:a {:bg colors.kreative.red.base.color 22 | :fg colors.kreative.fg.auto.color 23 | :gui :bold} 24 | :b {:bg colors.kreative.blue.mix_shadow_bg_more.color 25 | :fg colors.kreative.fg.auto.color} 26 | :c {:bg colors.kreative.purple.base.color 27 | :fg colors.kreative.fg.auto.color}}) 28 | (tset kreative :replace {:a {:bg colors.kreative.orange.base.color 29 | :fg colors.kreative.fg.auto.color 30 | :gui :bold} 31 | :b {:bg colors.kreative.blue.mix_shadow_bg_more.color 32 | :fg colors.kreative.fg.auto.color} 33 | :c {:bg colors.kreative.blue.brighten.color 34 | :fg colors.kreative.fg.auto.color}}) 35 | 36 | (tset kreative :command {:a {:bg colors.kreative.green.match_bg.color 37 | :fg colors.kreative.fg.auto.color 38 | :gui :bold} 39 | :b {:bg colors.kreative.blue.mix_shadow_bg_more.color 40 | :fg colors.kreative.fg.auto.color} 41 | :c {:bg colors.kreative.green.match_bg_less.color 42 | :fg colors.kreative.fg.auto.color}}) 43 | (tset kreative :terminal {:a {:bg colors.kreative.pink.match_bg_less.color 44 | :fg colors.kreative.fg.auto.color 45 | :gui :bold} 46 | :b {:bg colors.kreative.blue.mix_shadow_bg_more.color 47 | :fg colors.kreative.fg.auto.color} 48 | :c {:bg colors.kreative.red.match_bg.color 49 | :fg colors.kreative.fg.auto.color}}) 50 | (tset kreative :inactive {:a {:bg colors.kreative.fg.sixth.color 51 | :fg colors.kreative.bg.base.color} 52 | :b {:bg colors.kreative.fg.sixth.color 53 | :fg colors.kreative.bg.base.color} 54 | :c {:bg colors.kreative.fg.shadow.color 55 | :fg colors.kreative.bg.base.color}})) 56 | (do 57 | (tset kreative :normal {:a {:bg 6 58 | :fg 7 59 | :gui :bold} 60 | :b {:bg 12 61 | :fg 7} 62 | :c {:bg 5 63 | :fg 7}}) 64 | (tset kreative :insert {:a {:bg 4 65 | :fg 7 66 | :gui :bold} 67 | :b {:bg 12 68 | :fg 7} 69 | :c {:bg 4 70 | :fg 7}}) 71 | (tset kreative :visual {:a {:bg 1 72 | :fg 7 73 | :gui :bold} 74 | :b {:bg 12 75 | :fg 7} 76 | :c {:bg 6 77 | :fg 7}}) 78 | (tset kreative :replace {:a {:bg 3 79 | :fg 7 80 | :gui :bold} 81 | :b {:bg 4 82 | :fg 7} 83 | :c {:bg 4 84 | :fg 7}}) 85 | 86 | (tset kreative :command {:a {:bg 2 87 | :fg 7 88 | :gui :bold} 89 | :b {:bg 12 90 | :fg 7} 91 | :c {:bg 10 92 | :fg 7}}) 93 | (tset kreative :terminal {:a {:bg 13 94 | :fg 7 95 | :gui :bold} 96 | :b {:bg 12 97 | :fg 7} 98 | :c {:bg 9 99 | :fg 7}}) 100 | (tset kreative :inactive {:a {:bg 15 101 | :fg 0} 102 | :b {:bg 15 103 | :fg 0} 104 | :c {:bg 15 105 | :fg 0}}))) 106 | kreative 107 | -------------------------------------------------------------------------------- /lua/kreative/aniseed/autoload.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/aniseed/autoload.fnl" 2 | local _2amodule_name_2a = "kreative.aniseed.autoload" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = {} 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | local function autoload(name) 14 | local res = {["aniseed/autoload-enabled?"] = true, ["aniseed/autoload-module"] = false} 15 | local function ensure() 16 | if res["aniseed/autoload-module"] then 17 | return res["aniseed/autoload-module"] 18 | else 19 | local m = require(name) 20 | do end (res)["aniseed/autoload-module"] = m 21 | return m 22 | end 23 | end 24 | local function _2_(t, ...) 25 | return ensure()(...) 26 | end 27 | local function _3_(t, k) 28 | return ensure()[k] 29 | end 30 | local function _4_(t, k, v) 31 | ensure()[k] = v 32 | return nil 33 | end 34 | return setmetatable(res, {__call = _2_, __index = _3_, __newindex = _4_}) 35 | end 36 | _2amodule_2a["autoload"] = autoload 37 | return _2amodule_2a 38 | -------------------------------------------------------------------------------- /lua/kreative/aniseed/compile.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/aniseed/compile.fnl" 2 | local _2amodule_name_2a = "kreative.aniseed.compile" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = {} 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | local autoload = (require("kreative.aniseed.autoload")).autoload 14 | local a, fennel, fs, nvim = autoload("kreative.aniseed.core"), autoload("kreative.aniseed.fennel"), autoload("kreative.aniseed.fs"), autoload("kreative.aniseed.nvim") 15 | do end (_2amodule_locals_2a)["a"] = a 16 | _2amodule_locals_2a["fennel"] = fennel 17 | _2amodule_locals_2a["fs"] = fs 18 | _2amodule_locals_2a["nvim"] = nvim 19 | local function wrap_macros(code, opts) 20 | local macros_module = "kreative.aniseed.macros" 21 | local filename 22 | do 23 | local _1_ = a.get(opts, "filename") 24 | if (nil ~= _1_) then 25 | filename = string.gsub(_1_, (nvim.fn.getcwd() .. fs["path-sep"]), "") 26 | else 27 | filename = _1_ 28 | end 29 | end 30 | local function _3_() 31 | if filename then 32 | return ("\"" .. string.gsub(filename, "\\", "\\\\") .. "\"") 33 | else 34 | return "nil" 35 | end 36 | end 37 | return ("(local *file* " .. _3_() .. ")" .. "(require-macros \"" .. macros_module .. "\")\n" .. "(wrap-module-body " .. (code or "") .. ")") 38 | end 39 | _2amodule_2a["wrap-macros"] = wrap_macros 40 | local marker_prefix = "ANISEED_" 41 | _2amodule_2a["marker-prefix"] = marker_prefix 42 | local delete_marker = (marker_prefix .. "DELETE_ME") 43 | do end (_2amodule_2a)["delete-marker"] = delete_marker 44 | local delete_marker_pat = ("\n[^\n]-\"" .. delete_marker .. "\".-") 45 | do end (_2amodule_locals_2a)["delete-marker-pat"] = delete_marker_pat 46 | local function str(code, opts) 47 | ANISEED_STATIC_MODULES = (true == a.get(opts, "static?")) 48 | local fnl = fennel.impl() 49 | local function _4_() 50 | return string.gsub(string.gsub(fnl.compileString(wrap_macros(code, opts), a["merge!"]({allowedGlobals = false, compilerEnv = _G}, opts)), (delete_marker_pat .. "\n"), "\n"), (delete_marker_pat .. "$"), "") 51 | end 52 | return xpcall(_4_, fnl.traceback) 53 | end 54 | _2amodule_2a["str"] = str 55 | local function file(src, dest, opts) 56 | local code = a.slurp(src) 57 | local _5_, _6_ = str(code, a["merge!"]({filename = src, ["static?"] = true}, opts)) 58 | if ((_5_ == false) and (nil ~= _6_)) then 59 | local err = _6_ 60 | return nvim.err_writeln(err) 61 | elseif ((_5_ == true) and (nil ~= _6_)) then 62 | local result = _6_ 63 | fs.mkdirp(fs.basename(dest)) 64 | return a.spit(dest, result) 65 | else 66 | return nil 67 | end 68 | end 69 | _2amodule_2a["file"] = file 70 | local function glob(src_expr, src_dir, dest_dir, opts) 71 | for _, path in ipairs(fs.relglob(src_dir, src_expr)) do 72 | if fs["macro-file-path?"](path) then 73 | local dest = (dest_dir .. path) 74 | fs.mkdirp(fs.basename(dest)) 75 | a.spit(dest, a.slurp((src_dir .. path))) 76 | else 77 | file((src_dir .. path), string.gsub((dest_dir .. path), ".fnl$", ".lua"), opts) 78 | end 79 | end 80 | return nil 81 | end 82 | _2amodule_2a["glob"] = glob 83 | return _2amodule_2a 84 | -------------------------------------------------------------------------------- /lua/kreative/aniseed/env.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/aniseed/env.fnl" 2 | local _2amodule_name_2a = "kreative.aniseed.env" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = {} 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | local autoload = (require("kreative.aniseed.autoload")).autoload 14 | local compile, fennel, fs, nvim = autoload("kreative.aniseed.compile"), autoload("kreative.aniseed.fennel"), autoload("kreative.aniseed.fs"), autoload("kreative.aniseed.nvim") 15 | do end (_2amodule_locals_2a)["compile"] = compile 16 | _2amodule_locals_2a["fennel"] = fennel 17 | _2amodule_locals_2a["fs"] = fs 18 | _2amodule_locals_2a["nvim"] = nvim 19 | local config_dir = nvim.fn.stdpath("config") 20 | do end (_2amodule_locals_2a)["config-dir"] = config_dir 21 | local function quiet_require(m) 22 | local ok_3f, err = nil, nil 23 | local function _1_() 24 | return require(m) 25 | end 26 | ok_3f, err = pcall(_1_) 27 | if (not ok_3f and not err:find(("module '" .. m .. "' not found"))) then 28 | return nvim.ex.echoerr(err) 29 | else 30 | return nil 31 | end 32 | end 33 | _2amodule_locals_2a["quiet-require"] = quiet_require 34 | local function init(opts) 35 | local opts0 36 | if ("table" == type(opts)) then 37 | opts0 = opts 38 | else 39 | opts0 = {} 40 | end 41 | local glob_expr = "**/*.fnl" 42 | local fnl_dir = nvim.fn.expand((opts0.input or (config_dir .. fs["path-sep"] .. "fnl"))) 43 | local lua_dir = nvim.fn.expand((opts0.output or (config_dir .. fs["path-sep"] .. "lua"))) 44 | if opts0.output then 45 | package.path = (package.path .. ";" .. lua_dir .. fs["path-sep"] .. "?.lua") 46 | else 47 | end 48 | local function _5_(path) 49 | if fs["macro-file-path?"](path) then 50 | return path 51 | else 52 | return string.gsub(path, ".fnl$", ".lua") 53 | end 54 | end 55 | if (((false ~= opts0.compile) or os.getenv("ANISEED_ENV_COMPILE")) and fs["glob-dir-newer?"](fnl_dir, lua_dir, glob_expr, _5_)) then 56 | fennel["add-path"]((fnl_dir .. fs["path-sep"] .. "?.fnl")) 57 | compile.glob(glob_expr, fnl_dir, lua_dir, opts0) 58 | else 59 | end 60 | return quiet_require((opts0.module or "init")) 61 | end 62 | _2amodule_2a["init"] = init 63 | return _2amodule_2a 64 | -------------------------------------------------------------------------------- /lua/kreative/aniseed/eval.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/aniseed/eval.fnl" 2 | local _2amodule_name_2a = "kreative.aniseed.eval" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = {} 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | local autoload = (require("kreative.aniseed.autoload")).autoload 14 | local a, compile, fennel, fs, nvim = autoload("kreative.aniseed.core"), autoload("kreative.aniseed.compile"), autoload("kreative.aniseed.fennel"), autoload("kreative.aniseed.fs"), autoload("kreative.aniseed.nvim") 15 | do end (_2amodule_locals_2a)["a"] = a 16 | _2amodule_locals_2a["compile"] = compile 17 | _2amodule_locals_2a["fennel"] = fennel 18 | _2amodule_locals_2a["fs"] = fs 19 | _2amodule_locals_2a["nvim"] = nvim 20 | local function str(code, opts) 21 | local fnl = fennel.impl() 22 | local function _1_() 23 | return fnl.eval(compile["wrap-macros"](code, opts), a.merge({compilerEnv = _G}, opts)) 24 | end 25 | return xpcall(_1_, fnl.traceback) 26 | end 27 | _2amodule_2a["str"] = str 28 | local function clean_values(vals) 29 | local function _2_(val) 30 | if a["table?"](val) then 31 | return (compile["delete-marker"] ~= a.first(val)) 32 | else 33 | return true 34 | end 35 | end 36 | return a.filter(_2_, vals) 37 | end 38 | _2amodule_locals_2a["clean-values"] = clean_values 39 | local function clean_error(err) 40 | return string.gsub(string.gsub(err, "^%b[string .-%b]:%d+: ", ""), "^Compile error in .-:%d+\n%s+", "") 41 | end 42 | _2amodule_2a["clean-error"] = clean_error 43 | local function repl(opts) 44 | local eval_values = nil 45 | local fnl = fennel.impl() 46 | local opts0 = (opts or {}) 47 | local co 48 | local function _4_() 49 | local function _5_(_241) 50 | eval_values = clean_values(_241) 51 | return nil 52 | end 53 | local function _6_(_241, _242) 54 | return (opts0["error-handler"] or nvim.err_writeln)(clean_error(_242)) 55 | end 56 | return fnl.repl(a.merge({compilerEnv = _G, pp = a.identity, readChunk = coroutine.yield, onValues = _5_, onError = _6_}, opts0)) 57 | end 58 | co = coroutine.create(_4_) 59 | coroutine.resume(co) 60 | coroutine.resume(co, compile["wrap-macros"](nil, opts0)) 61 | eval_values = nil 62 | local function _7_(code) 63 | ANISEED_STATIC_MODULES = false 64 | coroutine.resume(co, code) 65 | local prev_eval_values = eval_values 66 | eval_values = nil 67 | return prev_eval_values 68 | end 69 | return _7_ 70 | end 71 | _2amodule_2a["repl"] = repl 72 | return _2amodule_2a 73 | -------------------------------------------------------------------------------- /lua/kreative/aniseed/fennel.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/aniseed/fennel.fnl" 2 | local _2amodule_name_2a = "kreative.aniseed.fennel" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = {} 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | local autoload = (require("kreative.aniseed.autoload")).autoload 14 | local a, fs, nvim, str = autoload("kreative.aniseed.core"), autoload("kreative.aniseed.fs"), autoload("kreative.aniseed.nvim"), autoload("kreative.aniseed.string") 15 | do end (_2amodule_locals_2a)["a"] = a 16 | _2amodule_locals_2a["fs"] = fs 17 | _2amodule_locals_2a["nvim"] = nvim 18 | _2amodule_locals_2a["str"] = str 19 | local function sync_rtp(compiler) 20 | local fnl_suffix = (fs["path-sep"] .. "fnl" .. fs["path-sep"] .. "?.fnl") 21 | local lua_suffix = (fs["path-sep"] .. "lua" .. fs["path-sep"] .. "?.fnl") 22 | local rtps = nvim.list_runtime_paths() 23 | local fnl_paths 24 | local function _1_(_241) 25 | return (_241 .. fnl_suffix) 26 | end 27 | fnl_paths = a.map(_1_, rtps) 28 | local lua_paths 29 | local function _2_(_241) 30 | return (_241 .. lua_suffix) 31 | end 32 | lua_paths = a.map(_2_, rtps) 33 | do end (compiler)["macro-path"] = str.join(";", a.concat(fnl_paths, lua_paths)) 34 | return nil 35 | end 36 | _2amodule_2a["sync-rtp"] = sync_rtp 37 | local state = {["compiler-loaded?"] = false} 38 | _2amodule_locals_2a["state"] = state 39 | local function impl() 40 | local compiler = require("kreative.aniseed.deps.fennel") 41 | if not state["compiler-loaded?"] then 42 | state["compiler-loaded?"] = true 43 | sync_rtp(compiler) 44 | else 45 | end 46 | return compiler 47 | end 48 | _2amodule_2a["impl"] = impl 49 | local function add_path(path) 50 | local fnl = impl() 51 | do end (fnl)["macro-path"] = (fnl["macro-path"] .. ";" .. path) 52 | return nil 53 | end 54 | _2amodule_2a["add-path"] = add_path 55 | return _2amodule_2a 56 | -------------------------------------------------------------------------------- /lua/kreative/aniseed/fs.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/aniseed/fs.fnl" 2 | local _2amodule_name_2a = "kreative.aniseed.fs" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = {} 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | local autoload = (require("kreative.aniseed.autoload")).autoload 14 | local a, nvim = autoload("kreative.aniseed.core"), autoload("kreative.aniseed.nvim") 15 | do end (_2amodule_locals_2a)["a"] = a 16 | _2amodule_locals_2a["nvim"] = nvim 17 | local function basename(path) 18 | return nvim.fn.fnamemodify(path, ":h") 19 | end 20 | _2amodule_2a["basename"] = basename 21 | local function mkdirp(dir) 22 | return nvim.fn.mkdir(dir, "p") 23 | end 24 | _2amodule_2a["mkdirp"] = mkdirp 25 | local function relglob(dir, expr) 26 | local dir_len = a.inc(string.len(dir)) 27 | local function _1_(_241) 28 | return string.sub(_241, dir_len) 29 | end 30 | return a.map(_1_, nvim.fn.globpath(dir, expr, true, true)) 31 | end 32 | _2amodule_2a["relglob"] = relglob 33 | local function glob_dir_newer_3f(a_dir, b_dir, expr, b_dir_path_fn) 34 | local newer_3f = false 35 | for _, path in ipairs(relglob(a_dir, expr)) do 36 | if (nvim.fn.getftime((a_dir .. path)) > nvim.fn.getftime((b_dir .. b_dir_path_fn(path)))) then 37 | newer_3f = true 38 | else 39 | end 40 | end 41 | return newer_3f 42 | end 43 | _2amodule_2a["glob-dir-newer?"] = glob_dir_newer_3f 44 | local function macro_file_path_3f(path) 45 | return a["string?"](string.match(path, "macros?.fnl$")) 46 | end 47 | _2amodule_2a["macro-file-path?"] = macro_file_path_3f 48 | local path_sep 49 | do 50 | local os = string.lower(jit.os) 51 | if (("linux" == os) or ("osx" == os) or ("bsd" == os)) then 52 | path_sep = "/" 53 | else 54 | path_sep = "\\" 55 | end 56 | end 57 | _2amodule_2a["path-sep"] = path_sep 58 | return _2amodule_2a 59 | -------------------------------------------------------------------------------- /lua/kreative/aniseed/nvim.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/aniseed/nvim.fnl" 2 | local _2amodule_name_2a = "kreative.aniseed.nvim" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = require("kreative.aniseed.deps.nvim") 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | -------------------------------------------------------------------------------- /lua/kreative/aniseed/nvim/util.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/aniseed/nvim/util.fnl" 2 | local _2amodule_name_2a = "kreative.aniseed.nvim.util" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = {} 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | local autoload = (require("kreative.aniseed.autoload")).autoload 14 | local nvim = autoload("kreative.aniseed.nvim") 15 | do end (_2amodule_locals_2a)["nvim"] = nvim 16 | local function normal(keys) 17 | return nvim.ex.silent(("exe \"normal! " .. keys .. "\"")) 18 | end 19 | _2amodule_2a["normal"] = normal 20 | local function fn_bridge(viml_name, mod, lua_name, opts) 21 | local _let_1_ = (opts or {}) 22 | local range = _let_1_["range"] 23 | local _return = _let_1_["return"] 24 | local function _2_() 25 | if range then 26 | return " range" 27 | else 28 | return "" 29 | end 30 | end 31 | local function _3_() 32 | if (_return ~= false) then 33 | return "return" 34 | else 35 | return "call" 36 | end 37 | end 38 | local function _4_() 39 | if range then 40 | return "\" . a:firstline . \", \" . a:lastline . \", " 41 | else 42 | return "" 43 | end 44 | end 45 | return nvim.ex.function_((viml_name .. "(...)" .. _2_() .. "\n " .. _3_() .. " luaeval(\"require('" .. mod .. "')['" .. lua_name .. "'](" .. _4_() .. "unpack(_A))\", a:000)\n endfunction")) 46 | end 47 | _2amodule_2a["fn-bridge"] = fn_bridge 48 | local function with_out_str(f) 49 | nvim.ex.redir("=> g:aniseed_nvim_util_out_str") 50 | do 51 | local ok_3f, err = pcall(f) 52 | nvim.ex.redir("END") 53 | nvim.ex.echon("") 54 | nvim.ex.redraw() 55 | if not ok_3f then 56 | error(err) 57 | else 58 | end 59 | end 60 | return string.gsub(nvim.g.aniseed_nvim_util_out_str, "^(\n?)(.*)$", "%2%1") 61 | end 62 | _2amodule_2a["with-out-str"] = with_out_str 63 | return _2amodule_2a 64 | -------------------------------------------------------------------------------- /lua/kreative/aniseed/setup.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/aniseed/setup.fnl" 2 | local _2amodule_name_2a = "kreative.aniseed.setup" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = {} 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | local autoload = (require("kreative.aniseed.autoload")).autoload 14 | local a, env, eval, nvim = autoload("kreative.aniseed.core"), autoload("kreative.aniseed.env"), autoload("kreative.aniseed.eval"), autoload("kreative.aniseed.nvim") 15 | do end (_2amodule_locals_2a)["a"] = a 16 | _2amodule_locals_2a["env"] = env 17 | _2amodule_locals_2a["eval"] = eval 18 | _2amodule_locals_2a["nvim"] = nvim 19 | local function init() 20 | if (1 == nvim.fn.has("nvim-0.7")) then 21 | local function _1_(cmd) 22 | local ok_3f, res = eval.str(cmd.args, {}) 23 | if ok_3f then 24 | return nvim.echo(res) 25 | else 26 | return nvim.err_writeln(res) 27 | end 28 | end 29 | nvim.create_user_command("AniseedEval", _1_, {nargs = 1}) 30 | local function _3_(cmd) 31 | local code 32 | local function _4_() 33 | if ("" == cmd.args) then 34 | return nvim.buf_get_name(nvim.get_current_buf()) 35 | else 36 | return cmd.args 37 | end 38 | end 39 | code = a.slurp(_4_()) 40 | if code then 41 | local ok_3f, res = eval.str(code, {}) 42 | if ok_3f then 43 | return nvim.echo(res) 44 | else 45 | return nvim.err_writeln(res) 46 | end 47 | else 48 | return nvim.err_writeln(("File '" .. (cmd.args or "nil") .. "' not found")) 49 | end 50 | end 51 | nvim.create_user_command("AniseedEvalFile", _3_, {nargs = "?", complete = "file"}) 52 | else 53 | end 54 | if nvim.g["aniseed#env"] then 55 | return env.init(nvim.g["aniseed#env"]) 56 | else 57 | return nil 58 | end 59 | end 60 | _2amodule_2a["init"] = init 61 | return _2amodule_2a 62 | -------------------------------------------------------------------------------- /lua/kreative/aniseed/string.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/aniseed/string.fnl" 2 | local _2amodule_name_2a = "kreative.aniseed.string" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = {} 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | local autoload = (require("kreative.aniseed.autoload")).autoload 14 | local a = autoload("kreative.aniseed.core") 15 | do end (_2amodule_locals_2a)["a"] = a 16 | local function join(...) 17 | local args = {...} 18 | local function _2_(...) 19 | if (2 == a.count(args)) then 20 | return args 21 | else 22 | return {"", a.first(args)} 23 | end 24 | end 25 | local _let_1_ = _2_(...) 26 | local sep = _let_1_[1] 27 | local xs = _let_1_[2] 28 | local len = a.count(xs) 29 | local result = {} 30 | if (len > 0) then 31 | for i = 1, len do 32 | local x = xs[i] 33 | local _3_ 34 | if ("string" == type(x)) then 35 | _3_ = x 36 | elseif (nil == x) then 37 | _3_ = x 38 | else 39 | _3_ = a["pr-str"](x) 40 | end 41 | if (_3_ ~= nil) then 42 | table.insert(result, _3_) 43 | else 44 | end 45 | end 46 | else 47 | end 48 | return table.concat(result, sep) 49 | end 50 | _2amodule_2a["join"] = join 51 | local function split(s, pat) 52 | local done_3f = false 53 | local acc = {} 54 | local index = 1 55 | while not done_3f do 56 | local start, _end = string.find(s, pat, index) 57 | if ("nil" == type(start)) then 58 | table.insert(acc, string.sub(s, index)) 59 | done_3f = true 60 | else 61 | table.insert(acc, string.sub(s, index, (start - 1))) 62 | index = (_end + 1) 63 | end 64 | end 65 | return acc 66 | end 67 | _2amodule_2a["split"] = split 68 | local function blank_3f(s) 69 | return (a["empty?"](s) or not string.find(s, "[^%s]")) 70 | end 71 | _2amodule_2a["blank?"] = blank_3f 72 | local function triml(s) 73 | return string.gsub(s, "^%s*(.-)", "%1") 74 | end 75 | _2amodule_2a["triml"] = triml 76 | local function trimr(s) 77 | return string.gsub(s, "(.-)%s*$", "%1") 78 | end 79 | _2amodule_2a["trimr"] = trimr 80 | local function trim(s) 81 | return string.gsub(s, "^%s*(.-)%s*$", "%1") 82 | end 83 | _2amodule_2a["trim"] = trim 84 | return _2amodule_2a 85 | -------------------------------------------------------------------------------- /lua/kreative/aniseed/test.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/aniseed/test.fnl" 2 | local _2amodule_name_2a = "kreative.aniseed.test" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = {} 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | local autoload = (require("kreative.aniseed.autoload")).autoload 14 | local a, fs, nvim, str = autoload("kreative.aniseed.core"), autoload("kreative.aniseed.fs"), autoload("kreative.aniseed.nvim"), autoload("kreative.aniseed.string") 15 | do end (_2amodule_locals_2a)["a"] = a 16 | _2amodule_locals_2a["fs"] = fs 17 | _2amodule_locals_2a["nvim"] = nvim 18 | _2amodule_locals_2a["str"] = str 19 | local function ok_3f(_1_) 20 | local _arg_2_ = _1_ 21 | local tests = _arg_2_["tests"] 22 | local tests_passed = _arg_2_["tests-passed"] 23 | return (tests == tests_passed) 24 | end 25 | _2amodule_2a["ok?"] = ok_3f 26 | local function display_results(results, prefix) 27 | do 28 | local _let_3_ = results 29 | local tests = _let_3_["tests"] 30 | local tests_passed = _let_3_["tests-passed"] 31 | local assertions = _let_3_["assertions"] 32 | local assertions_passed = _let_3_["assertions-passed"] 33 | local function _4_() 34 | if ok_3f(results) then 35 | return "OK" 36 | else 37 | return "FAILED" 38 | end 39 | end 40 | a.println((prefix .. " " .. _4_() .. " " .. tests_passed .. "/" .. tests .. " tests and " .. assertions_passed .. "/" .. assertions .. " assertions passed")) 41 | end 42 | return results 43 | end 44 | _2amodule_2a["display-results"] = display_results 45 | local function run(mod_name) 46 | local mod = _G.package.loaded[mod_name] 47 | local tests = (a["table?"](mod) and mod["aniseed/tests"]) 48 | if a["table?"](tests) then 49 | local results = {tests = #tests, ["tests-passed"] = 0, assertions = 0, ["assertions-passed"] = 0} 50 | for label, f in pairs(tests) do 51 | local test_failed = false 52 | a.update(results, "tests", a.inc) 53 | do 54 | local prefix = ("[" .. mod_name .. "/" .. label .. "]") 55 | local fail 56 | local function _5_(desc, ...) 57 | test_failed = true 58 | local function _6_(...) 59 | if desc then 60 | return (" (" .. desc .. ")") 61 | else 62 | return "" 63 | end 64 | end 65 | return a.println((str.join({prefix, " ", ...}) .. _6_(...))) 66 | end 67 | fail = _5_ 68 | local begin 69 | local function _7_() 70 | return a.update(results, "assertions", a.inc) 71 | end 72 | begin = _7_ 73 | local pass 74 | local function _8_() 75 | return a.update(results, "assertions-passed", a.inc) 76 | end 77 | pass = _8_ 78 | local t 79 | local function _9_(e, r, desc) 80 | begin() 81 | if (e == r) then 82 | return pass() 83 | else 84 | return fail(desc, "Expected '", a["pr-str"](e), "' but received '", a["pr-str"](r), "'") 85 | end 86 | end 87 | local function _11_(e, r, desc) 88 | begin() 89 | local se = a["pr-str"](e) 90 | local sr = a["pr-str"](r) 91 | if (se == sr) then 92 | return pass() 93 | else 94 | return fail(desc, "Expected (with pr) '", se, "' but received '", sr, "'") 95 | end 96 | end 97 | local function _13_(r, desc) 98 | begin() 99 | if r then 100 | return pass() 101 | else 102 | return fail(desc, "Expected truthy result but received '", a["pr-str"](r), "'") 103 | end 104 | end 105 | t = {["="] = _9_, ["pr="] = _11_, ["ok?"] = _13_} 106 | local _15_, _16_ = nil, nil 107 | local function _17_() 108 | return f(t) 109 | end 110 | _15_, _16_ = pcall(_17_) 111 | if ((_15_ == false) and (nil ~= _16_)) then 112 | local err = _16_ 113 | fail("Exception: ", err) 114 | else 115 | end 116 | end 117 | if not test_failed then 118 | a.update(results, "tests-passed", a.inc) 119 | else 120 | end 121 | end 122 | return display_results(results, ("[" .. mod_name .. "]")) 123 | else 124 | return nil 125 | end 126 | end 127 | _2amodule_2a["run"] = run 128 | local function run_all() 129 | local function _21_(totals, results) 130 | for k, v in pairs(results) do 131 | totals[k] = (v + totals[k]) 132 | end 133 | return totals 134 | end 135 | return display_results(a.reduce(_21_, {tests = 0, ["tests-passed"] = 0, assertions = 0, ["assertions-passed"] = 0}, a.filter(a["table?"], a.map(run, a.keys(_G.package.loaded)))), "[total]") 136 | end 137 | _2amodule_2a["run-all"] = run_all 138 | local function suite() 139 | do 140 | local sep = fs["path-sep"] 141 | local function _22_(path) 142 | return require(string.gsub(string.match(path, ("^test" .. sep .. "fnl" .. sep .. "(.-).fnl$")), sep, ".")) 143 | end 144 | a["run!"](_22_, nvim.fn.globpath(("test" .. sep .. "fnl"), "**/*-test.fnl", false, true)) 145 | end 146 | if ok_3f(run_all()) then 147 | return nvim.ex.q() 148 | else 149 | return nvim.ex.cq() 150 | end 151 | end 152 | _2amodule_2a["suite"] = suite 153 | return _2amodule_2a 154 | -------------------------------------------------------------------------------- /lua/kreative/aniseed/view.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/aniseed/view.fnl" 2 | local _2amodule_name_2a = "kreative.aniseed.view" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = {} 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | local fnl = require("kreative.aniseed.fennel") 14 | do end (_2amodule_locals_2a)["fnl"] = fnl 15 | local function serialise(...) 16 | return fnl.impl().view(...) 17 | end 18 | _2amodule_2a["serialise"] = serialise 19 | return _2amodule_2a 20 | -------------------------------------------------------------------------------- /lua/kreative/highlights/filetype/markdown.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/kreative/highlights/filetype/markdown.fnl" 2 | local _2amodule_name_2a = "kreative.highlights.filetype.markdown" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = {} 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | local autoload = (require("kreative.aniseed.autoload")).autoload 14 | local colors, groups, run, syntax, ucolors = autoload("kreative.color"), autoload("kreative.highlights.main"), autoload("kreative.utils.highlight.run"), autoload("kreative.highlights.syntax"), autoload("kreative.utils.highlight.utils") 15 | do end (_2amodule_locals_2a)["colors"] = colors 16 | _2amodule_locals_2a["groups"] = groups 17 | _2amodule_locals_2a["run"] = run 18 | _2amodule_locals_2a["syntax"] = syntax 19 | _2amodule_locals_2a["ucolors"] = ucolors 20 | local function high_colors() 21 | return {{group = "markdownItalic", fg = "SKIP", bg = "SKIP", ctermfg = "SKIP", ctermbg = "SKIP", italic = true}, {group = "markdownBold", fg = "SKIP", bg = "SKIP", ctermfg = "SKIP", ctermbg = "SKIP", bold = true}, {group = "markdownBoldItalic", fg = "SKIP", bg = "SKIP", ctermfg = "SKIP", ctermbg = "SKIP", bold = true, italic = true}, {group = "markdownH1", fg = ucolors.darken(colors.kreative.blue.base.color, 0), bg = "SKIP", ctermfg = 4, ctermbg = "SKIP", bold = true}, {group = "markdownH2", fg = ucolors.darken(colors.kreative.blue.base.color, 0.3), bg = "SKIP", ctermfg = 12, ctermbg = "SKIP", bold = true}, {group = "markdownH3", fg = ucolors.darken(colors.kreative.orange.base.color, 0), bg = "SKIP", ctermfg = 3, ctermbg = "SKIP", bold = true}, {group = "markdownH4", fg = ucolors.darken(colors.kreative.orange.base.color, 0.3), bg = "SKIP", ctermfg = 11, ctermbg = "SKIP", bold = true}, {group = "markdownH5", fg = ucolors.darken(colors.kreative.pink.base.color, 0), bg = "SKIP", ctermfg = 5, ctermbg = "SKIP", bold = true}, {group = "markdownH6", fg = ucolors.darken(colors.kreative.pink.base.color, 0.3), bg = "SKIP", ctermfg = 13, ctermbg = "SKIP", bold = true}, {group = "markdownCode", fg = colors.kreative.fg.meld.color, bg = colors.kreative.bg.shadow.color, ctermfg = 15, ctermbg = 8}, {group = "markdownCodeDelimiter", fg = colors.kreative.bg.shadow.color, bg = "SKIP", ctermfg = 8, ctermbg = "SKIP"}, {group = "markdownBlockqutoe", fg = colors.kreative.fg.umbra.color, bg = "SKIP", ctermfg = 15, ctermbg = "SKIP", bold = true}, {group = "markdownListMarker", fg = colors.kreative.pink.base.color, bg = "SKIP", ctermfg = 5, ctermbg = "SKIP", bold = true}, {group = "markdownOrderedListMarker", fg = colors.kreative.pink.base.color, bg = "SKIP", ctermfg = 5, ctermbg = "SKIP", bold = true}, {group = "markdownRule", fg = colors.kreative.red.base.color, bg = "SKIP", ctermfg = 1, ctermbg = "SKIP"}, {group = "markdownHeadingRule", fg = colors.kreative.red.base.color, bg = "SKIP", ctermfg = 1, ctermbg = "SKIP"}, {group = "markdownUrlDelimiter", fg = colors.kreative.bg.meld.color, bg = "SKIP", ctermfg = 15, ctermbg = "SKIP", bold = true}, {group = "markdownLinkDelimiter", fg = colors.kreative.bg.meld.color, bg = "SKIP", ctermfg = 15, ctermbg = "SKIP", bold = true}, {group = "markdownLinkTextDelimiter", fg = colors.kreative.bg.meld.color, bg = "SKIP", ctermfg = 15, ctermbg = "SKIP", bold = true}, {group = "markdownHeadingDelimiter", fg = colors.kreative.orange.base.color, bg = "SKIP", ctermfg = 3, ctermbg = "SKIP", bold = true}, {group = "markdownUrl", fg = colors.kreative.purple.base.color, bg = "SKIP", ctermfg = 6, ctermbg = "SKIP"}, {group = "markdownUrlTitleDelimiter", fg = colors.kreative.green.auto.color, bg = "SKIP", ctermfg = 2, ctermbg = "SKIP", bold = true}, {group = "markdownLinkText", fg = colors.kreative.fg.shadow.color, bg = "SKIP", ctermfg = 15, ctermbg = "SKIP", underline = true, sp = colors.kreative.fg.shadow.color}, {group = "markdownIdDeclaration", fg = colors.kreative.fg.shadow.color, bg = "SKIP", ctermfg = 15, ctermbg = "SKIP", underline = true, sp = colors.kreative.fg.shadow.color}} 22 | end 23 | _2amodule_2a["high-colors"] = high_colors 24 | local function init() 25 | return run["highlight$<-table"](high_colors()) 26 | end 27 | _2amodule_2a["init"] = init 28 | return _2amodule_2a -------------------------------------------------------------------------------- /lua/kreative/highlights/filetype/vim.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/kreative/highlights/filetype/vim.fnl" 2 | local _2amodule_name_2a = "kreative.highlights.filetype.vim" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = {} 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | local autoload = (require("kreative.aniseed.autoload")).autoload 14 | local colors, groups, run, syntax, ucolors = autoload("kreative.color"), autoload("kreative.highlights.main"), autoload("kreative.utils.highlight.run"), autoload("kreative.highlights.syntax"), autoload("kreative.utils.highlight.utils") 15 | do end (_2amodule_locals_2a)["colors"] = colors 16 | _2amodule_locals_2a["groups"] = groups 17 | _2amodule_locals_2a["run"] = run 18 | _2amodule_locals_2a["syntax"] = syntax 19 | _2amodule_locals_2a["ucolors"] = ucolors 20 | local function high_colors() 21 | return {{group = "vimCommentTitle", fg = colors.kreative.bg.shadow.color, bg = colors.kreative.fg.shadow.color, ctermfg = 8, ctermbg = 15, bold = true, italic = true}, {group = "vimBracket", fg = colors.kreative.pink.match_fg.color, bg = "SKIP", ctermfg = 5, ctermbg = "SKIP"}, {group = "vimMapModKey", fg = colors.kreative.pink.match_fg.color, bg = "SKIP", ctermfg = 5, ctermbg = "SKIP"}, {group = "vimFuncSID", fg = colors.kreative.fg.umbra.color, bg = "SKIP", ctermfg = 15, ctermbg = "SKIP"}, {group = "vimSetSep", fg = colors.kreative.fg.umbra.color, bg = "SKIP", ctermfg = 15, ctermbg = "SKIP"}, {group = "vimSep", fg = colors.kreative.fg.umbra.color, bg = "SKIP", ctermfg = 15, ctermbg = "SKIP"}, {group = "vimContinue", fg = colors.kreative.fg.umbra.color, bg = "SKIP", ctermfg = 15, ctermbg = "SKIP"}, {group = "vimOperParen", link = "Variable"}, {group = "vimFunction", link = "Function"}, {group = "vimIsCommand", link = "Identifier"}, {group = "vimUserFunc", link = "Function"}} 22 | end 23 | _2amodule_2a["high-colors"] = high_colors 24 | local function init() 25 | return run["highlight$<-table"](high_colors()) 26 | end 27 | _2amodule_2a["init"] = init 28 | return _2amodule_2a -------------------------------------------------------------------------------- /lua/kreative/highlights/filetype/vimwiki.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/kreative/highlights/filetype/vimwiki.fnl" 2 | local _2amodule_name_2a = "kreative.highlights.filetype.vimwiki" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = {} 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | local autoload = (require("kreative.aniseed.autoload")).autoload 14 | local colors, groups, run, syntax, ucolors = autoload("kreative.color"), autoload("kreative.highlights.main"), autoload("kreative.utils.highlight.run"), autoload("kreative.highlights.syntax"), autoload("kreative.utils.highlight.utils") 15 | do end (_2amodule_locals_2a)["colors"] = colors 16 | _2amodule_locals_2a["groups"] = groups 17 | _2amodule_locals_2a["run"] = run 18 | _2amodule_locals_2a["syntax"] = syntax 19 | _2amodule_locals_2a["ucolors"] = ucolors 20 | local function high_colors() 21 | return {{group = "VimwikiMarkers", fg = colors.kreative.bg.fifth.color, bg = "SKIP", ctermfg = 7, ctermbg = "SKIP"}, {group = "VimwikiLink", fg = colors.kreative.orange.base.color, bg = "SKIP", ctermfg = 3, ctermbg = "SKIP", bold = true, underline = true, sp = colors.kreative.orange.base.color}, {group = "VimwikiList", fg = colors.kreative.blue.base.color, bg = "SKIP", ctermfg = 4, ctermbg = "SKIP", bold = true}, {group = "VimwikiCheckBoxDone", fg = colors.kreative.green.auto.color, bg = "SKIP", ctermfg = 2, ctermbg = "SKIP", bold = true}, {group = "VimwikiTag", fg = colors.kreative.red.base.color, bg = "SKIP", ctermfg = 1, ctermbg = "SKIP", bold = true}, {group = "VimwikiDelText", fg = colors.kreative.pink.base.color, bg = "SKIP", ctermfg = 5, ctermbg = "SKIP", strikethrough = true}, {group = "VimwikiCode", fg = colors.kreative.fg.meld.color, bg = colors.kreative.bg.shadow.color, ctermfg = 15, ctermbg = 8}, {group = "VimwikiHeader1", fg = ucolors.darken(colors.kreative.blue.base.color, 0), bg = "SKIP", ctermfg = 4, ctermbg = "SKIP", bold = true}, {group = "VimwikiHeader2", fg = ucolors.darken(colors.kreative.blue.base.color, 0.3), bg = "SKIP", ctermfg = 12, ctermbg = "SKIP", bold = true}, {group = "VimwikiHeader3", fg = ucolors.darken(colors.kreative.orange.base.color, 0), bg = "SKIP", ctermfg = 3, ctermbg = "SKIP", bold = true}, {group = "VimwikiHeader4", fg = ucolors.darken(colors.kreative.orange.base.color, 0.3), bg = "SKIP", ctermfg = 11, ctermbg = "SKIP", bold = true}, {group = "VimwikiHeader5", fg = ucolors.darken(colors.kreative.pink.base.color, 0), bg = "SKIP", ctermfg = 5, ctermbg = "SKIP", bold = true}, {group = "VimwikiHeader6", fg = ucolors.darken(colors.kreative.pink.base.color, 0.3), bg = "SKIP", ctermfg = 13, ctermbg = "SKIP", bold = true}} 22 | end 23 | _2amodule_2a["high-colors"] = high_colors 24 | local function init() 25 | return run["highlight$<-table"](high_colors()) 26 | end 27 | _2amodule_2a["init"] = init 28 | return _2amodule_2a -------------------------------------------------------------------------------- /lua/kreative/highlights/integrations/airline.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/kreative/highlights/integrations/airline.fnl" 2 | local ucolors = require("kreative.utils.highlight.utils") 3 | local colors = require("kreative.color") 4 | local syntax = require("kreative.highlights.syntax") 5 | local groups = require("kreative.highlights.main") 6 | local main = require("kreative.main") 7 | local mainFG = (require("kreative.highlights.main")).mainFG() 8 | if ((main.configs.background == "dark") and (main.configs.contrast == "soft")) then 9 | mainFG[1] = ucolors.brighten(colors.kreative.fg.auto.color, 0.8) 10 | else 11 | end 12 | local function normalMode_c() 13 | local output = {colors.kreative.fg.auto.color, colors.kreative.pink.base.color, 7, 5, ""} 14 | return output 15 | end 16 | local function normalMode_b() 17 | local output = {colors.kreative.fg.auto.color, colors.kreative.blue.mix_shadow_bg.color, 7, 4, ""} 18 | return output 19 | end 20 | local function normalMode_a() 21 | local output = {colors.kreative.fg.auto.color, colors.kreative.purple.base.color, 7, 6, ""} 22 | return output 23 | end 24 | local function replaceMode_c() 25 | local output = {colors.kreative.fg.auto.color, colors.kreative.blue.brighten.color, 7, 4, ""} 26 | return output 27 | end 28 | local function replaceMode_b() 29 | local output = {colors.kreative.fg.auto.color, colors.kreative.blue.mix_shadow_bg.color, 7, 12, ""} 30 | return output 31 | end 32 | local function replaceMode_a() 33 | local output = {colors.kreative.fg.auto.color, colors.kreative.orange.base.color, 7, 3, "bold"} 34 | return output 35 | end 36 | local function visualMode_c() 37 | local output = {colors.kreative.fg.auto.color, colors.kreative.purple.base.color, 7, 6, ""} 38 | return output 39 | end 40 | local function visualMode_b() 41 | local output = {colors.kreative.fg.auto.color, colors.kreative.blue.mix_shadow_bg.color, 7, 12, ""} 42 | return output 43 | end 44 | local function visualMode_a() 45 | local output = {colors.kreative.fg.auto.color, colors.kreative.red.base.color, 7, 1, "bold"} 46 | return output 47 | end 48 | local function insertMode_c() 49 | local output = {colors.kreative.fg.auto.color, ucolors.brighten(colors.kreative.blue.base.color, 0.2), 7, 4, ""} 50 | return output 51 | end 52 | local function insertMode_b() 53 | local output = {colors.kreative.fg.auto.color, colors.kreative.blue.mix_shadow_bg.color, 7, 12, ""} 54 | return output 55 | end 56 | local function insertMode_a() 57 | local output = {colors.kreative.fg.auto.color, colors.kreative.blue.base.color, 7, 4, "bold"} 58 | return output 59 | end 60 | local function terminalMode_c() 61 | local output = {colors.kreative.fg.auto.color, colors.kreative.red.match_bg.color, 7, 1, ""} 62 | return output 63 | end 64 | local function terminalMode_b() 65 | local output = {colors.kreative.fg.auto.color, colors.kreative.blue.mix_shadow_bg.color, 7, 12, ""} 66 | return output 67 | end 68 | local function terminalMode_a() 69 | local output = {colors.kreative.fg.auto.color, colors.kreative.pink.match_bg.color, 7, 13, "bold"} 70 | return output 71 | end 72 | local function inactiveGroup() 73 | local output = {colors.kreative.bg.base.color, colors.kreative.fg.shadow.color, 7, 8, ""} 74 | return output 75 | end 76 | local function warningGroup() 77 | local output = {colors.kreative.fg.auto.color, colors.kreative.red.match_bg.color, 7, 9, ""} 78 | return output 79 | end 80 | local function errorGroup() 81 | local output = {colors.kreative.fg.auto.color, colors.kreative.red.base.color, 7, 1, ""} 82 | return output 83 | end 84 | local function modifiedC(mode) 85 | local output = {} 86 | do 87 | local _2_ = mode 88 | if (_2_ == "normal") then 89 | output = {colors.kreative.fg.auto.color, "", 7, "", ""} 90 | elseif (_2_ == "insert") then 91 | output = {colors.kreative.fg.auto.color, "", 7, "", ""} 92 | elseif (_2_ == "replace") then 93 | output = {colors.kreative.fg.auto.color, "", 7, "", ""} 94 | elseif (_2_ == "visual") then 95 | output = {colors.kreative.fg.auto.color, "", 7, "", ""} 96 | elseif (_2_ == "inactive") then 97 | output = {colors.kreative.bg.base.color, "", 0, "", ""} 98 | else 99 | end 100 | end 101 | return output 102 | end 103 | return modifiedC -------------------------------------------------------------------------------- /lua/kreative/highlights/integrations/bufferline.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/kreative/highlights/integrations/bufferline.fnl" 2 | local _2amodule_name_2a = "kreative.highlights.integrations.bufferline" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = {} 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | local autoload = (require("kreative.aniseed.autoload")).autoload 14 | local colors, ucolors = autoload("kreative.color"), autoload("kreative.utils.highlight.utils") 15 | do end (_2amodule_locals_2a)["colors"] = colors 16 | _2amodule_locals_2a["ucolors"] = ucolors 17 | local function init() 18 | return (require("bufferline")).setup({highlights = {fill = {guifg = colors.kreative.pink.base.color, guibg = colors.kreative.pink.base.color}, tab = {guifg = colors.kreative.fg.auto.color, guibg = colors.kreative.purple.base.color}, tab_selected = {guifg = colors.kreative.fg.auto.color, guibg = colors.kreative.blue.base.color}, tab_close = {guifg = colors.kreative.fg.auto.color, guibg = colors.kreative.purple.base.color, gui = "bold,italic"}, info = {guifg = colors.kreative.fg.auto.color, guibg = colors.kreative.blue.base.color}, buffer_visible = {guifg = colors.kreative.fg.auto.color, guibg = colors.kreative.blue.match_bg.color}, buffer_selected = {guifg = colors.kreative.fg.auto.color, guibg = colors.kreative.blue.base.color, gui = "bold,italic"}, close_button = {guifg = colors.kreative.fg.auto.color, guibg = colors.kreative.purple.base.color, gui = "bold"}, close_button_visible = {guifg = colors.kreative.fg.auto.color, guibg = colors.kreative.blue.match_bg.color, gui = "bold"}, close_button_selected = {guifg = colors.kreative.fg.auto.color, guibg = colors.kreative.blue.base.color, gui = "bold"}, modified = {guifg = colors.kreative.red.match_bg.color, guibg = colors.kreative.purple.base.color}, modified_visible = {guifg = colors.kreative.red.match_bg.color, guibg = colors.kreative.blue.match_bg.color}, modified_selected = {guifg = colors.kreative.red.match_bg.color, guibg = colors.kreative.blue.base.color}, duplicate_selected = {guifg = colors.kreative.fg.auto.color, guibg = colors.kreative.blue.base.color}, duplicate_visible = {guifg = colors.kreative.fg.auto.color, guibg = colors.kreative.blue.match_bg.color}, duplicate = {guifg = colors.kreative.fg.auto.color, guibg = colors.kreative.purple.base.color}, separator_selected = {guifg = colors.kreative.pink.base.color, guibg = colors.kreative.blue.base.color}, separator_visible = {guifg = colors.kreative.pink.base.color, guibg = colors.kreative.blue.match_bg.color}, separator = {guifg = colors.kreative.pink.base.color, guibg = colors.kreative.purple.base.color}, indicator_selected = {guifg = colors.kreative.fg.auto.color, guibg = colors.kreative.blue.base.color}, pick_selected = {guifg = colors.kreative.fg.auto.color, guibg = colors.kreative.blue.base.color}, pick_visible = {guifg = colors.kreative.fg.auto.color, guibg = colors.kreative.blue.base.color}, pick = {guifg = colors.kreative.fg.auto.color, guibg = colors.kreative.blue.base.color}, background = {guifg = colors.kreative.fg.auto.color, guibg = colors.kreative.purple.base.color}}}) 19 | end 20 | _2amodule_2a["init"] = init 21 | return _2amodule_2a -------------------------------------------------------------------------------- /lua/kreative/highlights/integrations/cmp.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/kreative/highlights/integrations/cmp.fnl" 2 | local _2amodule_name_2a = "kreative.highlights.integrations.cmp" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = {} 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | local autoload = (require("kreative.aniseed.autoload")).autoload 14 | local colors, groups, run, syntax, ucolors = autoload("kreative.color"), autoload("kreative.highlights.main"), autoload("kreative.utils.highlight.run"), autoload("kreative.highlights.syntax"), autoload("kreative.utils.highlight.utils") 15 | do end (_2amodule_locals_2a)["colors"] = colors 16 | _2amodule_locals_2a["groups"] = groups 17 | _2amodule_locals_2a["run"] = run 18 | _2amodule_locals_2a["syntax"] = syntax 19 | _2amodule_locals_2a["ucolors"] = ucolors 20 | local function high_colors() 21 | return {{group = "CmpItemKind", fg = colors.kreative.blue.base.color, bg = ucolors.brighten(colors.kreative.pink.base.color, 0.1), ctermfg = 4, ctermbg = 5}} 22 | end 23 | _2amodule_2a["high-colors"] = high_colors 24 | local function init() 25 | return run["highlight$<-table"](high_colors()) 26 | end 27 | _2amodule_2a["init"] = init 28 | return _2amodule_2a -------------------------------------------------------------------------------- /lua/kreative/highlights/integrations/coc.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/kreative/highlights/integrations/coc.fnl" 2 | local _2amodule_name_2a = "kreative.highlights.integrations.coc" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = {} 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | local autoload = (require("kreative.aniseed.autoload")).autoload 14 | local colors, groups, run, syntax, ucolors = autoload("kreative.color"), autoload("kreative.highlights.main"), autoload("kreative.utils.highlight.run"), autoload("kreative.highlights.syntax"), autoload("kreative.utils.highlight.utils") 15 | do end (_2amodule_locals_2a)["colors"] = colors 16 | _2amodule_locals_2a["groups"] = groups 17 | _2amodule_locals_2a["run"] = run 18 | _2amodule_locals_2a["syntax"] = syntax 19 | _2amodule_locals_2a["ucolors"] = ucolors 20 | local function high_colors() 21 | return {{group = "CocErrorSign", fg = colors.kreative.red.base.color, bg = "SKIP", ctermfg = 1, ctermbg = "SKIP", bold = true}, {group = "CocWarningSign", fg = colors.kreative.red.match_bg.color, bg = "SKIP", ctermfg = 9, ctermbg = "SKIP", bold = true}, {group = "CocInfoSign", fg = colors.kreative.orange.base.color, bg = "SKIP", ctermfg = 3, ctermbg = "SKIP", bold = true}, {group = "CocHintSign", fg = colors.kreative.green.auto.color, bg = "SKIP", ctermfg = 2, ctermbg = "SKIP", bold = true}, {group = "CocErrorFloat", fg = colors.kreative.red.base.color, bg = colors.kreative.bg.umbra.color, ctermfg = 1, ctermbg = 8}, {group = "CocWarningFloat", fg = colors.kreative.red.match_bg.color, bg = colors.kreative.bg.umbra.color, ctermfg = 9, ctermbg = 8}, {group = "CocInfoFloat", fg = colors.kreative.orange.base.color, bg = colors.kreative.bg.umbra.color, ctermfg = 3, ctermbg = 8}, {group = "CocHintFloat", fg = colors.kreative.green.auto.color, bg = colors.kreative.bg.umbra.color, ctermfg = 2, ctermbg = 8}, {group = "CocDiagnosticsError", fg = colors.kreative.red.base.color, bg = "SKIP", ctermfg = 1, ctermbg = "SKIP"}, {group = "CocDiagnosticsWarning", fg = colors.kreative.red.match_bg.color, bg = "SKIP", ctermfg = 9, ctermbg = "SKIP"}, {group = "CocDiagnosticsInfo", fg = colors.kreative.orange.base.color, bg = "SKIP", ctermfg = 3, ctermbg = "SKIP"}, {group = "CocDiagnosticsHint", fg = colors.kreative.green.auto.color, bg = "SKIP", ctermfg = 2, ctermbg = "SKIP"}, {group = "CocErrorHighlight", fg = "SKIP", bg = "SKIP", ctermfg = "SKIP", ctermbg = "NONE", undercurl = true, sp = colors.kreative.red.base.color}, {group = "CocWarningHighlight", fg = "SKIP", bg = "SKIP", ctermfg = "SKIP", ctermbg = "NONE", undercurl = true, sp = colors.kreative.red.match_bg.color}, {group = "CocInfoHighlight", fg = "SKIP", bg = "SKIP", ctermfg = "SKIP", ctermbg = "NONE", undercurl = true, sp = colors.kreative.orange.base.color}, {group = "CocHintHighlight", fg = "SKIP", bg = "SKIP", ctermfg = "SKIP", ctermbg = "NONE", undercurl = true, sp = colors.kreative.green.auto.color}, {group = "CocSelectedText", fg = "SKIP", bg = colors.kreative.red.darken.color, ctermfg = "SKIP", ctermbg = 9}, {group = "CocCodeLens", fg = colors.kreative.bg.meld.color, bg = "SKIP", ctermfg = 15, ctermbg = "SKIP"}} 22 | end 23 | _2amodule_2a["high-colors"] = high_colors 24 | local function init() 25 | return run["highlight$<-table"](high_colors()) 26 | end 27 | _2amodule_2a["init"] = init 28 | return _2amodule_2a -------------------------------------------------------------------------------- /lua/kreative/highlights/integrations/fugitive.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/kreative/highlights/integrations/fugitive.fnl" 2 | local _2amodule_name_2a = "kreative.highlights.integrations.fugitive" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = {} 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | local autoload = (require("kreative.aniseed.autoload")).autoload 14 | local colors, groups, run, syntax, ucolors = autoload("kreative.color"), autoload("kreative.highlights.main"), autoload("kreative.utils.highlight.run"), autoload("kreative.highlights.syntax"), autoload("kreative.utils.highlight.utils") 15 | do end (_2amodule_locals_2a)["colors"] = colors 16 | _2amodule_locals_2a["groups"] = groups 17 | _2amodule_locals_2a["run"] = run 18 | _2amodule_locals_2a["syntax"] = syntax 19 | _2amodule_locals_2a["ucolors"] = ucolors 20 | local function high_colors() 21 | return {{group = "fugitiveHunk", fg = "SKIP", bg = colors.kreative.bg.shadow.color, ctermfg = "SKIP", ctermbg = 8, nocombine = true}, {group = "gitDiff", fg = "SKIP", bg = colors.kreative.bg.shadow.color, ctermfg = "SKIP", ctermbg = 8, nocombine = true}} 22 | end 23 | _2amodule_2a["high-colors"] = high_colors 24 | local function init() 25 | return run["highlight$<-table"](high_colors()) 26 | end 27 | _2amodule_2a["init"] = init 28 | return _2amodule_2a -------------------------------------------------------------------------------- /lua/kreative/highlights/integrations/gitsigns.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/kreative/highlights/integrations/gitsigns.fnl" 2 | local _2amodule_name_2a = "kreative.highlights.integrations.gitsigns" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = {} 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | local autoload = (require("kreative.aniseed.autoload")).autoload 14 | local colors, groups, run, syntax, ucolors = autoload("kreative.color"), autoload("kreative.highlights.main"), autoload("kreative.utils.highlight.run"), autoload("kreative.highlights.syntax"), autoload("kreative.utils.highlight.utils") 15 | do end (_2amodule_locals_2a)["colors"] = colors 16 | _2amodule_locals_2a["groups"] = groups 17 | _2amodule_locals_2a["run"] = run 18 | _2amodule_locals_2a["syntax"] = syntax 19 | _2amodule_locals_2a["ucolors"] = ucolors 20 | local function high_colors() 21 | return {{group = "GitSignsAdd", fg = colors.kreative.green.auto.color, bg = "SKIP", ctermfg = 10, ctermbg = "SKIP", bold = true}, {group = "GitSignsAddLn", fg = "SKIP", bg = ucolors.blend(colors.kreative.green.auto.color, colors.kreative.bg.base.color, 0.4), ctermfg = "SKIP", ctermbg = 10}, {group = "GitSignsAddLnInline", fg = "SKIP", bg = ucolors.blend(colors.kreative.green.auto.color, colors.kreative.bg.base.color, 0.6), ctermfg = "SKIP", ctermbg = 10}, {group = "GitSignsChange", fg = colors.kreative.blue.base.color, bg = "SKIP", ctermfg = 12, ctermbg = "SKIP", bold = true}, {group = "GitSignsChangeLn", fg = "SKIP", bg = ucolors.blend(colors.kreative.blue.base.color, colors.kreative.bg.base.color, 0.4), ctermfg = "SKIP", ctermbg = 12}, {group = "GitSignsChangeLnInline", fg = "SKIP", bg = ucolors.blend(colors.kreative.blue.base.color, colors.kreative.bg.base.color, 0.6), ctermfg = "SKIP", ctermbg = 12}, {group = "GitSignsDelete", fg = colors.kreative.red.base.color, bg = "SKIP", ctermfg = 1, ctermbg = "SKIP", bold = true}, {group = "GitSignsDeleteLn", fg = "SKIP", bg = ucolors.blend(colors.kreative.red.base.color, colors.kreative.bg.base.color, 0.4), ctermfg = "SKIP", ctermbg = 9}, {group = "GitSignsDeleteLnInline", fg = "SKIP", bg = ucolors.blend(colors.kreative.red.base.color, colors.kreative.bg.base.color, 0.6), ctermfg = "SKIP", ctermbg = 9}} 22 | end 23 | _2amodule_2a["high-colors"] = high_colors 24 | local function init() 25 | return run["highlight$<-table"](high_colors()) 26 | end 27 | _2amodule_2a["init"] = init 28 | return _2amodule_2a -------------------------------------------------------------------------------- /lua/kreative/highlights/integrations/indent_blankline.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/kreative/highlights/integrations/indent_blankline.fnl" 2 | local _2amodule_name_2a = "kreative.highlights.integrations.indent_blankline" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = {} 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | local autoload = (require("kreative.aniseed.autoload")).autoload 14 | local colors, groups, run, syntax, ucolors = autoload("kreative.color"), autoload("kreative.highlights.main"), autoload("kreative.utils.highlight.run"), autoload("kreative.highlights.syntax"), autoload("kreative.utils.highlight.utils") 15 | do end (_2amodule_locals_2a)["colors"] = colors 16 | _2amodule_locals_2a["groups"] = groups 17 | _2amodule_locals_2a["run"] = run 18 | _2amodule_locals_2a["syntax"] = syntax 19 | _2amodule_locals_2a["ucolors"] = ucolors 20 | local function high_colors() 21 | return {{group = "IndentBlanklineChar", fg = colors.kreative.bg.shadow.color, bg = "SKIP", ctermfg = 8, ctermbg = "SKIP", nocombine = true}, {group = "IndentBlanklineSpaceChar", fg = colors.kreative.bg.shadow.color, bg = "SKIP", ctermfg = 8, ctermbg = "SKIP", nocombine = true}, {group = "IndentBlanklineSpaceChar", fg = colors.kreative.bg.shadow.color, bg = "SKIP", ctermfg = 8, ctermbg = "SKIP", nocombine = true}, {group = "IndentBlanklineContextChar", fg = colors.kreative.blue.base.color, bg = "SKIP", ctermfg = 4, ctermbg = "SKIP", nocombine = true}} 22 | end 23 | _2amodule_2a["high-colors"] = high_colors 24 | local function init() 25 | return run["highlight$<-table"](high_colors()) 26 | end 27 | _2amodule_2a["init"] = init 28 | return _2amodule_2a -------------------------------------------------------------------------------- /lua/kreative/highlights/integrations/lightline.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/kreative/highlights/integrations/lightline.fnl" 2 | local ucolors = require("kreative.utils.highlight.utils") 3 | local colors = require("kreative.color") 4 | local syntax = require("kreative.highlights.syntax") 5 | local groups = require("kreative.highlights.main") 6 | local main = require("kreative.main") 7 | local mainFG = (require("kreative.highlights.main")).mainFG() 8 | if ((main.configs.background == "dark") and (main.configs.contrast == "soft")) then 9 | mainFG[1] = ucolors.brighten(colors.kreative.fg.auto.color, 0.8) 10 | else 11 | end 12 | local function mainFG0() 13 | local output = colors.kreative.fg.auto.color 14 | if ((main.configs.background == "dark") and (main.configs.contrast == "soft")) then 15 | output = ucolors.brighten(colors.kreative.fg.auto.color, 0.8) 16 | else 17 | end 18 | return output 19 | end 20 | local function normalMode_c() 21 | local output = {colors.kreative.fg.auto.color, colors.kreative.pink.base.color, 7, 5, ""} 22 | return output 23 | end 24 | local function normalMode_b() 25 | local output = {colors.kreative.fg.auto.color, colors.kreative.blue.mix_shadow_bg.color, 7, 12, ""} 26 | return output 27 | end 28 | local function normalMode_a() 29 | local output = {colors.kreative.fg.auto.color, colors.kreative.purple.base.color, 7, 6, "bold"} 30 | return output 31 | end 32 | local function replaceMode_c() 33 | local output = {colors.kreative.fg.auto.color, colors.kreative.blue.brighten.color, 7, 4, ""} 34 | return output 35 | end 36 | local function replaceMode_b() 37 | local output = {colors.kreative.fg.auto.color, colors.kreative.blue.mix_shadow_bg.color, 7, 12, ""} 38 | return output 39 | end 40 | local function replaceMode_a() 41 | local output = {colors.kreative.fg.auto.color, colors.kreative.orange.base.color, 7, 3, "bold"} 42 | return output 43 | end 44 | local function visualMode_c() 45 | local output = {colors.kreative.fg.auto.color, colors.kreative.purple.base.color, 7, 6, ""} 46 | return output 47 | end 48 | local function visualMode_b() 49 | local output = {colors.kreative.fg.auto.color, colors.kreative.blue.mix_shadow_bg.color, 7, 12, ""} 50 | return output 51 | end 52 | local function visualMode_a() 53 | local output = {colors.kreative.fg.auto.color, colors.kreative.red.base.color, 7, colors.kreative.red.base.color, "bold"} 54 | return output 55 | end 56 | local function insertMode_c() 57 | local output = {colors.kreative.fg.auto.color, colors.kreative.blue.brighten.color, 7, 4, ""} 58 | return output 59 | end 60 | local function insertMode_b() 61 | local output = {colors.kreative.fg.auto.color, colors.kreative.blue.mix_shadow_bg.color, 7, 12, ""} 62 | return output 63 | end 64 | local function insertMode_a() 65 | local output = {colors.kreative.fg.auto.color, colors.kreative.blue.base.color, 7, 4, "bold"} 66 | return output 67 | end 68 | local function terminalMode_c() 69 | local output = {colors.kreative.fg.auto.color, ucolors.blend(colors.kreative.red.base.color, colors.kreative.bg.base.color, 0.8), 7, 9, ""} 70 | return output 71 | end 72 | local function terminalMode_b() 73 | local output = {colors.kreative.fg.auto.color, colors.kreative.blue.mix_shadow_bg.color, 7, 12, ""} 74 | return output 75 | end 76 | local function terminalMode_a() 77 | local output = {colors.kreative.fg.auto.color, ucolors.blend(colors.kreative.pink.base.color, colors.kreative.bg.base.color, 0.8), 7, 5, "bold"} 78 | return output 79 | end 80 | local function inactiveGroup() 81 | local output = {colors.kreative.bg.base.color, colors.kreative.fg.shadow.color, 0, 15, ""} 82 | return output 83 | end 84 | local function warningGroup() 85 | local output = {colors.kreative.fg.auto.color, colors.kreative.red.match_bg.color, 7, 9, ""} 86 | return output 87 | end 88 | local function errorGroup() 89 | local output = {colors.kreative.fg.auto.color, colors.kreative.red.base.color, 7, 1, ""} 90 | return output 91 | end 92 | local function modifiedC(mode) 93 | local output = {} 94 | do 95 | local _3_ = mode 96 | if (_3_ == "normal") then 97 | output = {colors.kreative.fg.auto.color, "", 7, "", ""} 98 | elseif (_3_ == "insert") then 99 | output = {colors.kreative.fg.auto.color, "", 7, "", ""} 100 | elseif (_3_ == "replace") then 101 | output = {colors.kreative.fg.auto.color, "", 7, "", ""} 102 | elseif (_3_ == "visual") then 103 | output = {colors.kreative.fg.auto.color, "", 7, "", ""} 104 | elseif (_3_ == "inactive") then 105 | output = {colors.kreative.bg.base.color, "", 0, "", ""} 106 | else 107 | end 108 | end 109 | return output 110 | end 111 | return modifiedC -------------------------------------------------------------------------------- /lua/kreative/highlights/integrations/lsp.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/kreative/highlights/integrations/lsp.fnl" 2 | local _2amodule_name_2a = "kreative.highlights.integrations.lsp" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = {} 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | local autoload = (require("kreative.aniseed.autoload")).autoload 14 | local colors, groups, run, syntax, ucolors = autoload("kreative.color"), autoload("kreative.highlights.main"), autoload("kreative.utils.highlight.run"), autoload("kreative.highlights.syntax"), autoload("kreative.utils.highlight.utils") 15 | do end (_2amodule_locals_2a)["colors"] = colors 16 | _2amodule_locals_2a["groups"] = groups 17 | _2amodule_locals_2a["run"] = run 18 | _2amodule_locals_2a["syntax"] = syntax 19 | _2amodule_locals_2a["ucolors"] = ucolors 20 | local function high_colors() 21 | return {{group = "LspReferenceText", fg = "SKIP", bg = colors.kreative.pink.base.color, ctermfg = "SKIP", ctermbg = 5}, {group = "LspReferenceRead", fg = "SKIP", bg = colors.kreative.pink.base.color, ctermfg = "SKIP", ctermbg = 5}, {group = "LspReferenceWrite", fg = "SKIP", bg = colors.kreative.pink.base.color, ctermfg = "SKIP", ctermbg = 5}, {group = "LspCodeLens", fg = colors.kreative.bg.meld.color, bg = "SKIP", ctermfg = 8, ctermbg = "SKIP"}, {group = "LspSignatureActiveParameter", fg = colors.kreative.blue.base.color, bg = "SKIP", ctermfg = 4, ctermbg = "SKIP"}, {group = "DiagnosticError", fg = colors.kreative.red.base.color, bg = "SKIP", ctermfg = 1, ctermbg = "SKIP"}, {group = "DiagnosticWarn", fg = colors.kreative.red.match_bg.color, bg = "SKIP", ctermfg = 9, ctermbg = "SKIP"}, {group = "DiagnosticInfo", fg = colors.kreative.orange.base.color, bg = "SKIP", ctermfg = 3, ctermbg = "SKIP"}, {group = "DiagnosticHint", fg = colors.kreative.orange.base.color, bg = "SKIP", ctermfg = 3, ctermbg = "SKIP"}, {group = "DiagnosticVirtualTextError", fg = colors.kreative.red.base.color, bg = colors.kreative.bg.umbra.color, ctermfg = 1, ctermbg = 8}, {group = "DiagnosticVirtualTextWarn", fg = colors.kreative.red.match_bg.color, bg = colors.kreative.bg.umbra.color, ctermfg = 9, ctermbg = 8}, {group = "DiagnosticVirtualTextInfo", fg = colors.kreative.orange.base.color, bg = colors.kreative.bg.umbra.color, ctermfg = 3, ctermbg = 8}, {group = "DiagnosticVirtualTextHint", fg = colors.kreative.green.auto.color, bg = colors.kreative.bg.umbra.color, ctermfg = 2, ctermbg = 8}, {group = "DiagnosticFloatingError", fg = colors.kreative.red.base.color, bg = colors.kreative.bg.shadow.color, ctermfg = 1, ctermbg = 8}, {group = "DiagnosticFloatingWarn", fg = colors.kreative.red.match_bg.color, bg = colors.kreative.bg.shadow.color, ctermfg = 9, ctermbg = 8}, {group = "DiagnosticFloatingInfo", fg = colors.kreative.orange.base.color, bg = colors.kreative.bg.shadow.color, ctermfg = 3, ctermbg = 8}, {group = "DiagnosticFloatingHint", fg = colors.kreative.green.auto.color, bg = colors.kreative.bg.shadow.color, ctermfg = 2, ctermbg = 8}, {group = "DiagnosticSignError", fg = colors.kreative.red.base.color, bg = "SKIP", ctermfg = 1, ctermbg = "SKIP", bold = true}, {group = "DiagnosticSignWarn", fg = colors.kreative.red.match_bg.color, bg = "SKIP", ctermfg = 9, ctermbg = "SKIP", bold = true}, {group = "DiagnosticSignInfo", fg = colors.kreative.orange.base.color, bg = "SKIP", ctermfg = 3, ctermbg = "SKIP", bold = true}, {group = "DiagnosticSignHint", fg = colors.kreative.green.auto.color, bg = "SKIP", ctermfg = 2, ctermbg = "SKIP", bold = true}, {group = "DiagnosticUnderlineError", fg = "SKIP", bg = "SKIP", ctermfg = "SKIP", ctermbg = "NONE", underline = true, sp = colors.kreative.red.base.color}, {group = "DiagnosticUnderlineWarn", fg = "SKIP", bg = "SKIP", ctermfg = "SKIP", ctermbg = "NONE", underline = true, sp = colors.kreative.red.match_bg.color}, {group = "DiagnosticUnderlineInfo", fg = "SKIP", bg = "SKIP", ctermfg = "SKIP", ctermbg = "NONE", underline = true, sp = colors.kreative.orange.base.color}, {group = "DiagnosticUnderlineHint", fg = "SKIP", bg = "SKIP", ctermfg = "SKIP", ctermbg = "NONE", underline = true, sp = colors.kreative.green.auto.color}} 22 | end 23 | _2amodule_2a["high-colors"] = high_colors 24 | local function init() 25 | return run["highlight$<-table"](high_colors()) 26 | end 27 | _2amodule_2a["init"] = init 28 | return _2amodule_2a -------------------------------------------------------------------------------- /lua/kreative/highlights/integrations/startify.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/kreative/highlights/integrations/startify.fnl" 2 | local _2amodule_name_2a = "kreative.highlights.integrations.startify" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = {} 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | local autoload = (require("kreative.aniseed.autoload")).autoload 14 | local colors, groups, run, syntax, ucolors = autoload("kreative.color"), autoload("kreative.highlights.main"), autoload("kreative.utils.highlight.run"), autoload("kreative.highlights.syntax"), autoload("kreative.utils.highlight.utils") 15 | do end (_2amodule_locals_2a)["colors"] = colors 16 | _2amodule_locals_2a["groups"] = groups 17 | _2amodule_locals_2a["run"] = run 18 | _2amodule_locals_2a["syntax"] = syntax 19 | _2amodule_locals_2a["ucolors"] = ucolors 20 | local function high_colors() 21 | return {{group = "StartifyBracket", fg = colors.kreative.blue.mix_meld_bg.color, bg = "SKIP", ctermfg = 4, ctermbg = "SKIP", bold = true}, {group = "StartifyFile", fg = colors.kreative.purple.match_fg.color, bg = "SKIP", ctermfg = 6, ctermbg = "SKIP", bold = true}, {group = "StartifyNumber", fg = colors.kreative.blue.base.color, bg = "SKIP", ctermfg = 4, ctermbg = "SKIP", bold = true}, {group = "StartifyPath", fg = colors.kreative.bg.sixth.color, bg = "SKIP", ctermfg = 4, ctermbg = "SKIP"}, {group = "StartifySlash", fg = colors.kreative.fg.meld.color, bg = "SKIP", ctermfg = 7, ctermbg = "SKIP"}, {group = "StartifySection", fg = colors.kreative.red.match_fg.color, bg = "SKIP", ctermfg = 9, ctermbg = "SKIP", bold = true}, {group = "StartifySpecial", fg = colors.kreative.bg.sixth.color, bg = "SKIP", ctermfg = 12, ctermbg = "SKIP"}, {group = "StartifyHeader", fg = colors.kreative.pink.base.color, bg = "SKIP", ctermfg = 5, ctermbg = "SKIP"}, {group = "StartifyFooter", fg = colors.kreative.bg.meld.color, bg = "SKIP", ctermfg = 4, ctermbg = "SKIP"}} 22 | end 23 | _2amodule_2a["high-colors"] = high_colors 24 | local function init() 25 | return run["highlight$<-table"](high_colors()) 26 | end 27 | _2amodule_2a["init"] = init 28 | return _2amodule_2a -------------------------------------------------------------------------------- /lua/kreative/highlights/integrations/ts_rainbow.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/kreative/highlights/integrations/ts_rainbow.fnl" 2 | local _2amodule_name_2a = "kreative.highlights.integrations.ts_rainbow" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = {} 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | local autoload = (require("kreative.aniseed.autoload")).autoload 14 | local colors, groups, run, syntax, ucolors = autoload("kreative.color"), autoload("kreative.highlights.main"), autoload("kreative.utils.highlight.run"), autoload("kreative.highlights.syntax"), autoload("kreative.utils.highlight.utils") 15 | do end (_2amodule_locals_2a)["colors"] = colors 16 | _2amodule_locals_2a["groups"] = groups 17 | _2amodule_locals_2a["run"] = run 18 | _2amodule_locals_2a["syntax"] = syntax 19 | _2amodule_locals_2a["ucolors"] = ucolors 20 | local function high_colors() 21 | return {{group = "rainbowcol1", fg = ucolors.blend(colors.kreative.red.base.color, colors.kreative.fg.meld.color, 0.8), bg = "SKIP", ctermfg = 1, ctermbg = "SKIP"}, {group = "rainbowcol2", fg = ucolors.blend(colors.kreative.pink.base.color, colors.kreative.fg.meld.color, 0.8), bg = "SKIP", ctermfg = 2, ctermbg = "SKIP"}, {group = "rainbowcol3", fg = ucolors.blend(colors.kreative.purple.base.color, colors.kreative.fg.meld.color, 0.8), bg = "SKIP", ctermfg = 3, ctermbg = "SKIP"}, {group = "rainbowcol4", fg = ucolors.blend(colors.kreative.blue.base.color, colors.kreative.fg.meld.color, 0.8), bg = "SKIP", ctermfg = 4, ctermbg = "SKIP"}, {group = "rainbowcol5", fg = ucolors.blend(colors.kreative.green.base.color, colors.kreative.fg.meld.color, 0.8), bg = "SKIP", ctermfg = 5, ctermbg = "SKIP"}, {group = "rainbowcol6", fg = ucolors.blend(colors.kreative.orange.base.color, colors.kreative.fg.meld.color, 0.8), bg = "SKIP", ctermfg = 6, ctermbg = "SKIP"}, {group = "rainbowcol7", fg = ucolors.blend(colors.kreative.bg.sixth.color, colors.kreative.fg.meld.color, 0.8), bg = "SKIP", ctermfg = 7, ctermbg = "SKIP"}} 22 | end 23 | _2amodule_2a["high-colors"] = high_colors 24 | local function init() 25 | return run["highlight$<-table"](high_colors()) 26 | end 27 | _2amodule_2a["init"] = init 28 | return _2amodule_2a -------------------------------------------------------------------------------- /lua/kreative/highlights/terminal.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/kreative/highlights/terminal.fnl" 2 | local _2amodule_name_2a = "kreative.highlights.terminal" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = {} 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | local colors, main, ucolors, _ = require("kreative.color"), require("kreative.main"), require("kreative.utils.highlight.utils"), nil 14 | _2amodule_locals_2a["colors"] = colors 15 | _2amodule_locals_2a["main"] = main 16 | _2amodule_locals_2a["ucolors"] = ucolors 17 | _2amodule_locals_2a["_"] = _ 18 | local function init() 19 | vim.g["terminal_color_5"] = colors.kreative.pink.base.color 20 | vim.g["terminal_color_6"] = colors.kreative.purple.base.color 21 | vim.g["terminal_color_7"] = colors.kreative.fg.base.color 22 | vim.g["terminal_color_0"] = colors.kreative.bg.base.color 23 | vim.g["terminal_color_8"] = colors.kreative.bg.umbra.color 24 | vim.g["terminal_color_1"] = colors.kreative.red.base.color 25 | vim.g["terminal_color_2"] = colors.kreative.green.base.color 26 | vim.g["terminal_color_3"] = colors.kreative.orange.base.color 27 | vim.g["terminal_color_15"] = colors.kreative.fg.umbra.color 28 | vim.g["terminal_color_4"] = colors.kreative.blue.base.color 29 | do local _ = {nil, nil, nil, nil, nil, nil, nil, nil, nil, nil} end 30 | if (main.configs.background == "light") then 31 | vim.g["terminal_color_9"] = ucolors.darken(colors.kreative.red.base.color, 0.2) 32 | do end (vim.g)["terminal_color_13"] = ucolors.darken(colors.kreative.pink.base.color, 0.2) 33 | do end (vim.g)["terminal_color_10"] = ucolors.darken(colors.kreative.green.base.color, 0.2) 34 | do end (vim.g)["terminal_color_14"] = ucolors.darken(colors.kreative.purple.base.color, 0.2) 35 | do end (vim.g)["terminal_color_11"] = ucolors.darken(colors.kreative.orange.base.color, 0.2) 36 | do end (vim.g)["terminal_color_12"] = ucolors.darken(colors.kreative.blue.base.color, 0.2) 37 | return {nil, nil, nil, nil, nil, nil} 38 | else 39 | vim.g["terminal_color_9"] = ucolors.brighten(colors.kreative.red.base.color, 0.2) 40 | do end (vim.g)["terminal_color_13"] = ucolors.brighten(colors.kreative.pink.base.color, 0.2) 41 | do end (vim.g)["terminal_color_10"] = ucolors.brighten(colors.kreative.green.base.color, 0.2) 42 | do end (vim.g)["terminal_color_14"] = ucolors.brighten(colors.kreative.purple.base.color, 0.2) 43 | do end (vim.g)["terminal_color_11"] = ucolors.brighten(colors.kreative.orange.base.color, 0.2) 44 | do end (vim.g)["terminal_color_12"] = ucolors.brighten(colors.kreative.blue.base.color, 0.2) 45 | return {nil, nil, nil, nil, nil, nil} 46 | end 47 | end 48 | _2amodule_2a["init"] = init 49 | return _2amodule_2a -------------------------------------------------------------------------------- /lua/kreative/katcros-fnl/macros/lispism/macros.fnl: -------------------------------------------------------------------------------- 1 | ;;; katcros-fnl: Fennel macros, predominantly for Neovim development 2 | ;;; Copyright (C) 2022 Kat 3 | 4 | ;;; This program is free software: you can redistribute it and/or modify 5 | ;;; it under the terms of the GNU General Public License as published by 6 | ;;; the Free Software Foundation, either version 3 of the License, or 7 | ;;; (at your option) any later version. 8 | 9 | ;;; This program is distributed in the hope that it will be useful, 10 | ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | ;;; GNU General Public License for more details. 13 | 14 | ;;; You should have received a copy of the GNU General Public License 15 | ;;; along with this program. If not, see . 16 | 17 | ;;; Macros to convert Lua constructs to something more Lisp-y 18 | 19 | ;; Macro -- table lookup 20 | ;; @origin -- table to search 21 | ;; @lookup -- lookup value 22 | ;; @... -- list to do on the lookupped value 23 | (fn opt- [origin lookup ...] 24 | "Macro -- Lookup a value in a table, and do" 25 | (let [output [...]] 26 | `(do 27 | ((. (require ,origin) ,lookup) 28 | ,...)))) 29 | 30 | ;; takes a value and puts it into a sequential table for a certain number of times 31 | (fn value->table [iterator# number-over# value-to-in#] 32 | `(do 33 | (local in-table# []) 34 | (for [,iterator# 1 ,number-over#] 35 | (local value-from-in# ,value-to-in#) 36 | (tset in-table# ,iterator# value-from-in#)) 37 | in-table#)) 38 | 39 | { 40 | :opt- opt- 41 | :value->table value->table} 42 | 43 | -------------------------------------------------------------------------------- /lua/kreative/katcros-fnl/macros/nvim/api/colors/macros.fnl: -------------------------------------------------------------------------------- 1 | ;;; katcros-fnl: Fennel macros, predominantly for Neovim development 2 | ;;; Copyright (C) 2022 Kat 3 | 4 | ;;; This program is free software: you can redistribute it and/or modify 5 | ;;; it under the terms of the GNU General Public License as published by 6 | ;;; the Free Software Foundation, either version 3 of the License, or 7 | ;;; (at your option) any later version. 8 | 9 | ;;; This program is distributed in the hope that it will be useful, 10 | ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | ;;; GNU General Public License for more details. 13 | 14 | ;;; You should have received a copy of the GNU General Public License 15 | ;;; along with this program. If not, see . 16 | 17 | ;;; Macros for color management 18 | 19 | ;; Macro -- set colorscheme 20 | ;; @scheme -- a string of the colorscheme desired 21 | (fn col- [scheme] 22 | "Macro -- set colorscheme" 23 | (let [scheme# (.. "colorscheme " scheme)] 24 | `(vim.cmd ,scheme#))) 25 | 26 | { 27 | :col- col-} 28 | 29 | -------------------------------------------------------------------------------- /lua/kreative/katcros-fnl/macros/nvim/packer/macros.fnl: -------------------------------------------------------------------------------- 1 | ;;; katcros-fnl: Fennel macros, predominantly for Neovim development 2 | ;;; Copyright (C) 2022 Kat 3 | 4 | ;;; This program is free software: you can redistribute it and/or modify 5 | ;;; it under the terms of the GNU General Public License as published by 6 | ;;; the Free Software Foundation, either version 3 of the License, or 7 | ;;; (at your option) any later version. 8 | 9 | ;;; This program is distributed in the hope that it will be useful, 10 | ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | ;;; GNU General Public License for more details. 13 | 14 | ;;; You should have received a copy of the GNU General Public License 15 | ;;; along with this program. If not, see . 16 | 17 | ;;; Macros for plugin packer.nvim 18 | 19 | ;; Macro -- initialize packer.nvim 20 | ;; @... -- takes standard packer.nvim list 21 | (fn plugInit [...] 22 | "Macro -- Initialize packer.nvim" 23 | `(do 24 | ((. (require :packer) :startup) (fn [] 25 | (do 26 | ,...))))) 27 | 28 | ;; Macro -- use 'Plug' instead of 'use' for packer.nvim 29 | ;; @plugin -- standard packer.nvim list 30 | (fn Plug [plugin] 31 | "Macro -- call plugin with 'Plug'" 32 | `(use ,plugin)) 33 | 34 | { 35 | :Plug Plug 36 | :plugInit plugInit} 37 | 38 | -------------------------------------------------------------------------------- /lua/kreative/main.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/kreative/main.fnl" 2 | local _2amodule_name_2a = "kreative.main" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = {} 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | local autoload = (require("kreative.aniseed.autoload")).autoload 14 | local colors, json, message, options, override, read, run, write, _, _0 = autoload("kreative.color"), autoload("kreative.utils.json.init"), autoload("kreative.utils.messages.init"), autoload("kreative.utils.options.init"), autoload("kreative.utils.override.init"), autoload("kreative.utils.json.read"), autoload("kreative.utils.highlight.run"), autoload("kreative.utils.json.write"), nil, nil 15 | _2amodule_locals_2a["colors"] = colors 16 | _2amodule_locals_2a["json"] = json 17 | _2amodule_locals_2a["message"] = message 18 | _2amodule_locals_2a["options"] = options 19 | _2amodule_locals_2a["override"] = override 20 | _2amodule_locals_2a["read"] = read 21 | _2amodule_locals_2a["run"] = run 22 | _2amodule_locals_2a["write"] = write 23 | _2amodule_locals_2a["_"] = _0 24 | _2amodule_locals_2a["_"] = _0 25 | local function init(opts) 26 | local configs = options.default(opts) 27 | do end (_2amodule_2a)["configs"] = configs 28 | colors.kreative = {} 29 | if vim.g.colors_name then 30 | vim.api.nvim_exec("highlight clear", true) 31 | else 32 | end 33 | if (vim.fn.exists("syntax_on") == 1) then 34 | vim.api.nvim_exec("syntax reset", true) 35 | else 36 | end 37 | local _4_ 38 | do 39 | local t_3_ = opts 40 | if (nil ~= t_3_) then 41 | t_3_ = (t_3_).contrast 42 | else 43 | end 44 | _4_ = t_3_ 45 | end 46 | configs.contrast = assert(_4_, "Please add a contrast to your opts table") 47 | configs.background = vim.o.background 48 | local _7_ 49 | do 50 | local t_6_ = opts 51 | if (nil ~= t_6_) then 52 | t_6_ = (t_6_).colors_name 53 | else 54 | end 55 | _7_ = t_6_ 56 | end 57 | vim.g["colors_name"] = assert(_7_, "Please add a colors_name to your opts table") 58 | configs.colors_name = opts.colors_name 59 | colors.update() 60 | local rendered_length 61 | do 62 | local i = 0 63 | do 64 | local files = override["main-files"]() 65 | if files then 66 | for k, _1 in pairs(override["main-files"](), "until", (i > 0)) do 67 | i = (i + 1) 68 | end 69 | else 70 | end 71 | end 72 | rendered_length = i 73 | end 74 | local matcher = string.format("%s-%s.json", configs.colors_name, configs.background) 75 | local integrations 76 | do 77 | local output = {} 78 | for _1, v in pairs(configs.integrations) do 79 | output[("integrations." .. v)] = true 80 | end 81 | for _1, v in pairs(configs.filetypes) do 82 | output[("filetype." .. v)] = true 83 | end 84 | integrations = output 85 | end 86 | if json["exists?"]("main") then 87 | run["highlight$<-table"](read["file!"]("main")) 88 | else 89 | do end (require("kreative.highlights.main")).init() 90 | if opts.render then 91 | write["file!"]("main", json.encode(json["file-parse"]("main"))) 92 | else 93 | end 94 | end 95 | if json["exists?"]("syntax") then 96 | run["highlight$<-table"](read["file!"]("syntax")) 97 | else 98 | do end (require("kreative.highlights.syntax")).init() 99 | if opts.render then 100 | write["file!"]("syntax", json.encode(json["file-parse"]("syntax"))) 101 | else 102 | end 103 | end 104 | if (rendered_length > 0) then 105 | for key, _1 in pairs(integrations) do 106 | if json["exists?"](key) then 107 | run["highlight$<-table"](read["file!"](key)) 108 | else 109 | do end (require(("kreative.highlights." .. key))).init() 110 | if opts.render then 111 | write["file!"](key, json.encode(json["file-parse"](key))) 112 | else 113 | end 114 | end 115 | end 116 | else 117 | for key, _1 in pairs(integrations) do 118 | do end (require(("kreative.highlights." .. key))).init() 119 | if opts.render then 120 | write["file!"](key, json.encode(json["file-parse"](key))) 121 | else 122 | end 123 | end 124 | end 125 | do end (require("kreative.highlights.terminal")).init() 126 | require("kreative.utils.export.init") 127 | return (require("kreative.utils.export.render")).init() 128 | end 129 | _2amodule_2a["init"] = init 130 | return _2amodule_2a -------------------------------------------------------------------------------- /lua/kreative/utils/export/kitty.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/kreative/utils/export/kitty.fnl" 2 | local _2amodule_name_2a = "kreative.utils.export.kitty" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = {} 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | local autoload = (require("kreative.aniseed.autoload")).autoload 14 | local colors, export, groups, main, ucolors = autoload("kreative.color"), autoload("kreative.utils.export.init"), autoload("kreative.highlights.main"), autoload("kreative.main"), autoload("kreative.utils.highlight.utils") 15 | do end (_2amodule_locals_2a)["colors"] = colors 16 | _2amodule_locals_2a["export"] = export 17 | _2amodule_locals_2a["groups"] = groups 18 | _2amodule_locals_2a["main"] = main 19 | _2amodule_locals_2a["ucolors"] = ucolors 20 | local loop = vim.loop 21 | _2amodule_locals_2a["loop"] = loop 22 | local comment_type = "#" 23 | _2amodule_2a["comment-type"] = comment_type 24 | local function gen_colors() 25 | local output = {foreground = colors.kreative.fg.auto.color, background = colors.kreative.bg.base.color, selection_foreground = colors.kreative.fg.auto.color, selection_background = colors.kreative.blue.base.color, cursor = colors.kreative.fg.auto.color, cursor_text_color = colors.kreative.bg.base.color, url_color = colors.kreative.orange.base.color, active_border_color = colors.kreative.blue.base.color, inactive_border_color = colors.kreative.bg.meld.color, bell_border_color = colors.kreative.green.auto.color, active_tab_foreground = colors.kreative.fg.auto.color, active_tab_background = colors.kreative.blue.base.color, inactive_tab_foreground = colors.kreative.fg.auto.color, inactive_tab_background = ucolors.blend(colors.kreative.purple.base.color, colors.kreative.bg.meld.color, 0.5), tab_bar_background = colors.kreative.pink.base.color, tab_bar_margin_color = colors.kreative.orange.base.color, mark1_foreground = colors.kreative.bg.base.color, mark1_background = colors.kreative.red.base.color, mark2_foreground = colors.kreative.bg.base.color, mark2_background = colors.kreative.blue.base.color, mark3_foreground = colors.kreative.bg.base.color, mark3_background = colors.kreative.green.auto.color, color0 = colors.kreative.bg.base.color, color1 = colors.kreative.red.base.color, color2 = colors.kreative.green.base.color, color3 = colors.kreative.orange.base.color, color4 = colors.kreative.blue.base.color, color5 = colors.kreative.pink.base.color, color6 = colors.kreative.purple.base.color, color7 = colors.kreative.fg.auto.color, color8 = colors.kreative.bg.umbra.color, color15 = colors.kreative.fg.umbra.color} 26 | if (main.configs.background == "light") then 27 | output["color9"] = ucolors.darken(colors.kreative.red.base.color, 0.2) 28 | do end (output)["color10"] = ucolors.darken(colors.kreative.green.base.color, 0.2) 29 | do end (output)["color11"] = ucolors.darken(colors.kreative.orange.base.color, 0.2) 30 | do end (output)["color12"] = ucolors.darken(colors.kreative.blue.base.color, 0.2) 31 | do end (output)["color13"] = ucolors.darken(colors.kreative.pink.base.color, 0.2) 32 | do end (output)["color14"] = ucolors.darken(colors.kreative.purple.base.color, 0.2) 33 | else 34 | output["color9"] = ucolors.brighten(colors.kreative.red.base.color, 0.2) 35 | do end (output)["color10"] = ucolors.brighten(colors.kreative.green.base.color, 0.2) 36 | do end (output)["color11"] = ucolors.brighten(colors.kreative.orange.base.color, 0.2) 37 | do end (output)["color12"] = ucolors.brighten(colors.kreative.blue.base.color, 0.2) 38 | do end (output)["color13"] = ucolors.brighten(colors.kreative.pink.base.color, 0.2) 39 | do end (output)["color14"] = ucolors.brighten(colors.kreative.purple.base.color, 0.2) 40 | end 41 | return output 42 | end 43 | _2amodule_2a["gen-colors"] = gen_colors 44 | local function output_21() 45 | local file_name = string.format("kitty-%s-%s.conf", tostring(main.configs.colors_name), tostring(main.configs.background)) 46 | local fd = assert(loop.fs_open(file_name, "w", 0)) 47 | assert(loop.fs_chmod(file_name, 420)) 48 | assert(loop.fs_write(fd, export["string->one-line-color"](gen_colors(), "kitty"), 0)) 49 | export["notify$"]("kitty") 50 | return assert(loop.fs_close(fd)) 51 | end 52 | _2amodule_2a["output!"] = output_21 53 | return _2amodule_2a -------------------------------------------------------------------------------- /lua/kreative/utils/export/render.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/kreative/utils/export/render.fnl" 2 | local _2amodule_name_2a = "kreative.utils.export.render" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = {} 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | local autoload = (require("kreative.aniseed.autoload")).autoload 14 | local color_table, json, main, message, read, write, _, _0 = autoload("kreative.color"), autoload("kreative.utils.json.init"), autoload("kreative.main"), autoload("kreative.utils.message.init"), autoload("kreative.utils.json.read"), autoload("kreative.utils.json.write"), nil, nil 15 | _2amodule_locals_2a["color-table"] = color_table 16 | _2amodule_locals_2a["json"] = json 17 | _2amodule_locals_2a["main"] = main 18 | _2amodule_locals_2a["message"] = message 19 | _2amodule_locals_2a["read"] = read 20 | _2amodule_locals_2a["write"] = write 21 | _2amodule_locals_2a["_"] = _0 22 | _2amodule_locals_2a["_"] = _0 23 | local function file() 24 | local backgrounds = {"light", "dark"} 25 | local old_background = main.configs.background 26 | for _1, v in ipairs(backgrounds) do 27 | main.configs.background = v 28 | color_table.update() 29 | for _2, file0 in ipairs(json.files) do 30 | write["file!"](file0, json.encode(json["file-parse"](file0))) 31 | end 32 | write["colors!"]() 33 | end 34 | main.configs.background = old_background 35 | return nil 36 | end 37 | _2amodule_2a["file"] = file 38 | local function file_2a() 39 | for _1, file0 in ipairs(json.files) do 40 | write["file!"](file0, json.encode(json["file-parse"](file0))) 41 | end 42 | return write["colors!"]() 43 | end 44 | _2amodule_2a["file*"] = file_2a 45 | local function color(args, mutations) 46 | main.configs.background = mutations[1] 47 | main.configs.contrast = mutations[2] 48 | color_table.update() 49 | return write["override-file!"](json.encode(args[2]), args[1], args[3]) 50 | end 51 | _2amodule_locals_2a["color"] = color 52 | local function color_2a(args) 53 | local colors = {{"light", "soft", "kat.nwim"}, {"light", "hard", "kat.nvim"}, {"dark", "soft", "kat.nwim"}, {"dark", "hard", "kat.nvim"}} 54 | for _1, mutator in pairs(colors) do 55 | main.configs.background = mutator[1] 56 | main.configs.contrast = mutator[2] 57 | color_table.update() 58 | write["override-file!"](json.encode(args[2]), args[1], mutator[3]) 59 | end 60 | main.configs.background = __fnl_global__old_2dbackground 61 | main.configs.contrast = __fnl_global__old_2dcontrast 62 | return nil 63 | end 64 | _2amodule_locals_2a["color*"] = color_2a 65 | local function override(args) 66 | local old_contrast = main.configs.contrast 67 | local old_background = main.configs.background 68 | local assertion = {} 69 | for k, _1 in pairs(args) do 70 | table.insert(assertion, true) 71 | end 72 | assert((#assertion == 2), "only 2 arguments allowed") 73 | local _2_ 74 | do 75 | local t_1_ = args 76 | if (nil ~= t_1_) then 77 | t_1_ = (t_1_).light_hard 78 | else 79 | end 80 | _2_ = t_1_ 81 | end 82 | if _2_ then 83 | color({args.source, args.light_hard, "kat.nvim", {"light", "hard"}}) 84 | else 85 | end 86 | local _6_ 87 | do 88 | local t_5_ = args 89 | if (nil ~= t_5_) then 90 | t_5_ = (t_5_).light_soft 91 | else 92 | end 93 | _6_ = t_5_ 94 | end 95 | if _6_ then 96 | color({args.source, args.light_soft, "kat.nwim", {"light", "soft"}}) 97 | else 98 | end 99 | local _10_ 100 | do 101 | local t_9_ = args 102 | if (nil ~= t_9_) then 103 | t_9_ = (t_9_).dark_hard 104 | else 105 | end 106 | _10_ = t_9_ 107 | end 108 | if _10_ then 109 | color({args.source, args.dark_hard, "kat.nvim"}, {"dark", "hard"}) 110 | else 111 | end 112 | local _14_ 113 | do 114 | local t_13_ = args 115 | if (nil ~= t_13_) then 116 | t_13_ = (t_13_).dark_soft 117 | else 118 | end 119 | _14_ = t_13_ 120 | end 121 | if _14_ then 122 | color({args.source, args.dark_soft, "kat.nwim"}, {"dark", "soft"}) 123 | else 124 | end 125 | main.configs.background = old_background 126 | main.configs.contrast = old_contrast 127 | return nil 128 | end 129 | _2amodule_2a["override"] = override 130 | local function override_all(args) 131 | local old_contrast = main.configs.contrast 132 | local old_background = main.configs.background 133 | local assertion = {} 134 | for k, _1 in pairs(args) do 135 | table.insert(assertion, true) 136 | end 137 | assert((#assertion == 2), "only 2 arguments allowed") 138 | color_2a({args.source, args[1]}) 139 | main.configs.background = old_background 140 | main.configs.contrast = old_contrast 141 | return nil 142 | end 143 | _2amodule_2a["override_all"] = override_all 144 | local function init() 145 | local function _17_() 146 | return file() 147 | end 148 | return vim.api.nvim_create_user_command("KreativeRenderColor", _17_, {desc = "Render kat.nvim colorscheme to file"}) 149 | end 150 | _2amodule_2a["init"] = init 151 | return _2amodule_2a -------------------------------------------------------------------------------- /lua/kreative/utils/export/rxvt.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/kreative/utils/export/rxvt.fnl" 2 | local _2amodule_name_2a = "kreative.utils.export.rxvt" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = {} 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | local autoload = (require("kreative.aniseed.autoload")).autoload 14 | local colors, export, groups, main, ucolors = autoload("kreative.color"), autoload("kreative.utils.export.init"), autoload("kreative.highlights.main"), autoload("kreative.main"), autoload("kreative.utils.highlight.utils") 15 | do end (_2amodule_locals_2a)["colors"] = colors 16 | _2amodule_locals_2a["export"] = export 17 | _2amodule_locals_2a["groups"] = groups 18 | _2amodule_locals_2a["main"] = main 19 | _2amodule_locals_2a["ucolors"] = ucolors 20 | local loop = vim.loop 21 | _2amodule_locals_2a["loop"] = loop 22 | local comment_type = "!" 23 | _2amodule_2a["comment-type"] = comment_type 24 | local function gen_colors() 25 | local output = {["*foreground:"] = colors.kreative.fg.auto.color, ["*background:"] = colors.kreative.bg.base.color, ["*cursorColor:"] = colors.kreative.fg.auto.color, ["*fadeColor:"] = colors.kreative.bg.meld.color, ["*pointerColorForeground:"] = colors.kreative.fg.auto.color, ["*pointerColorBackground:"] = colors.kreative.bg.base.color, ["Urxvt*foreground:"] = colors.kreative.fg.auto.color, ["Urxvt*background:"] = colors.kreative.bg.base.color, ["URxvt*color0:"] = colors.kreative.bg.base.color, ["URxvt*color1:"] = colors.kreative.red.base.color, ["URxvt*color2:"] = colors.kreative.green.base.color, ["URxvt*color3:"] = colors.kreative.orange.base.color, ["URxvt*color4:"] = colors.kreative.blue.base.color, ["URxvt*color5:"] = colors.kreative.pink.base.color, ["URxvt*color6:"] = colors.kreative.purple.base.color, ["URxvt*color7:"] = colors.kreative.fg.auto.color, ["URxvt*color8:"] = colors.kreative.bg.umbra.color, ["URxvt*color15:"] = colors.kreative.fg.umbra.color} 26 | if (main.configs.background == "light") then 27 | output["URxvt*color9:"] = ucolors.darken(colors.kreative.red.base.color, 0.2) 28 | do end (output)["URxvt*color10:"] = ucolors.darken(colors.kreative.green.base.color, 0.2) 29 | do end (output)["URxvt*color11:"] = ucolors.darken(colors.kreative.orange.base.color, 0.2) 30 | do end (output)["URxvt*color12:"] = ucolors.darken(colors.kreative.blue.base.color, 0.2) 31 | do end (output)["URxvt*color13:"] = ucolors.darken(colors.kreative.pink.base.color, 0.2) 32 | do end (output)["URxvt*color14:"] = ucolors.darken(colors.kreative.purple.base.color, 0.2) 33 | else 34 | output["URxvt*color9:"] = ucolors.brighten(colors.kreative.red.base.color, 0.2) 35 | do end (output)["URxvt*color10:"] = ucolors.brighten(colors.kreative.green.base.color, 0.2) 36 | do end (output)["URxvt*color11:"] = ucolors.brighten(colors.kreative.orange.base.color, 0.2) 37 | do end (output)["URxvt*color12:"] = ucolors.brighten(colors.kreative.blue.base.color, 0.2) 38 | do end (output)["URxvt*color13:"] = ucolors.brighten(colors.kreative.pink.base.color, 0.2) 39 | do end (output)["URxvt*color14:"] = ucolors.brighten(colors.kreative.purple.base.color, 0.2) 40 | end 41 | return output 42 | end 43 | _2amodule_2a["gen-colors"] = gen_colors 44 | local function output_21() 45 | local file_name = string.format("Urxvt-%s-%s.Xresources", tostring(main.configs.colors_name), tostring(main.configs.background)) 46 | local fd = assert(loop.fs_open(file_name, "w", 0)) 47 | assert(loop.fs_chmod(file_name, 420)) 48 | assert(loop.fs_write(fd, export["string->one-line-color"](gen_colors(), "rxvt-unicode"), 0)) 49 | export["notify$"]("rxvt-unicode") 50 | return assert(loop.fs_close(fd)) 51 | end 52 | _2amodule_2a["output!"] = output_21 53 | return _2amodule_2a -------------------------------------------------------------------------------- /lua/kreative/utils/highlight/get.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/kreative/utils/highlight/get.fnl" 2 | local _2amodule_name_2a = "kreative.utils.highlight.get" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = {} 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | local autoload = (require("kreative.aniseed.autoload")).autoload 14 | local a, s = autoload("kreative.aniseed.core"), autoload("kreative.aniseed.string") 15 | do end (_2amodule_locals_2a)["a"] = a 16 | _2amodule_locals_2a["s"] = s 17 | local function group(table) 18 | local t_1_ = table 19 | if (nil ~= t_1_) then 20 | t_1_ = (t_1_).group 21 | else 22 | end 23 | return t_1_ 24 | end 25 | _2amodule_2a["group"] = group 26 | local function gui_fg(table) 27 | local t_3_ = table 28 | if (nil ~= t_3_) then 29 | t_3_ = (t_3_).fg 30 | else 31 | end 32 | return t_3_ 33 | end 34 | _2amodule_2a["gui-fg"] = gui_fg 35 | local function gui_bg(table) 36 | local t_5_ = table 37 | if (nil ~= t_5_) then 38 | t_5_ = (t_5_).bg 39 | else 40 | end 41 | return t_5_ 42 | end 43 | _2amodule_2a["gui-bg"] = gui_bg 44 | local function term_fg(table) 45 | local t_7_ = table 46 | if (nil ~= t_7_) then 47 | t_7_ = (t_7_).ctermfg 48 | else 49 | end 50 | return t_7_ 51 | end 52 | _2amodule_2a["term-fg"] = term_fg 53 | local function term_bg(table) 54 | local t_9_ = table 55 | if (nil ~= t_9_) then 56 | t_9_ = (t_9_).ctermbg 57 | else 58 | end 59 | return t_9_ 60 | end 61 | _2amodule_2a["term-bg"] = term_bg 62 | local function special(table) 63 | local t_11_ = table 64 | if (nil ~= t_11_) then 65 | t_11_ = (t_11_).sp 66 | else 67 | end 68 | return t_11_ 69 | end 70 | _2amodule_2a["special"] = special 71 | local function blend(table) 72 | local t_13_ = table 73 | if (nil ~= t_13_) then 74 | t_13_ = (t_13_).blend 75 | else 76 | end 77 | return t_13_ 78 | end 79 | _2amodule_2a["blend"] = blend 80 | local function link(table) 81 | local t_15_ = table 82 | if (nil ~= t_15_) then 83 | t_15_ = (t_15_).link 84 | else 85 | end 86 | return t_15_ 87 | end 88 | _2amodule_2a["link"] = link 89 | local function default(table) 90 | local t_17_ = table 91 | if (nil ~= t_17_) then 92 | t_17_ = (t_17_).default 93 | else 94 | end 95 | return t_17_ 96 | end 97 | _2amodule_2a["default"] = default 98 | local function all_attr__3etable(table_23) 99 | local output = {} 100 | for k, v in pairs(table_23) do 101 | if ((v == true) or (v == false)) then 102 | output[k] = v 103 | else 104 | end 105 | end 106 | return output 107 | end 108 | _2amodule_2a["all-attr->table"] = all_attr__3etable 109 | return _2amodule_2a -------------------------------------------------------------------------------- /lua/kreative/utils/highlight/run.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/kreative/utils/highlight/run.fnl" 2 | local _2amodule_name_2a = "kreative.utils.highlight.run" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = {} 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | local autoload = (require("kreative.aniseed.autoload")).autoload 14 | local a, apply, ucolors = autoload("kreative.aniseed.core"), autoload("kreative.utils.highlight.init"), autoload("kreative.utils.highlight.utils") 15 | do end (_2amodule_locals_2a)["a"] = a 16 | _2amodule_locals_2a["apply"] = apply 17 | _2amodule_locals_2a["ucolors"] = ucolors 18 | local function highlight_24_3c_table(high_table) 19 | for _, value in pairs(high_table) do 20 | if (type(value) == "function") then 21 | local function _1_() 22 | local t_2_ = value() 23 | if (nil ~= t_2_) then 24 | t_2_ = (t_2_)[1] 25 | else 26 | end 27 | return t_2_ 28 | end 29 | if ((type(value()) == "table") and _1_()) then 30 | for _0, nest in pairs(value()) do 31 | if (type(nest) == "function") then 32 | apply["highlight$"](nest()) 33 | else 34 | apply["highlight$"](nest) 35 | end 36 | end 37 | else 38 | if value() then 39 | apply["highlight$"](value()) 40 | else 41 | end 42 | end 43 | else 44 | local function _8_() 45 | local t_7_ = value 46 | if (nil ~= t_7_) then 47 | t_7_ = (t_7_)[1] 48 | else 49 | end 50 | return t_7_ 51 | end 52 | if (type(_8_()) == "table") then 53 | for _0, nest in pairs(value) do 54 | apply["highlight$"](nest) 55 | end 56 | else 57 | apply["highlight$"](value) 58 | end 59 | end 60 | end 61 | return nil 62 | end 63 | _2amodule_2a["highlight$<-table"] = highlight_24_3c_table 64 | return _2amodule_2a -------------------------------------------------------------------------------- /lua/kreative/utils/highlight/utils.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/kreative/utils/highlight/utils.fnl" 2 | local _2amodule_name_2a = "kreative.utils.highlight.utils" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = {} 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | local autoload = (require("kreative.aniseed.autoload")).autoload 14 | local a, colors, get, hsl, s, _ = autoload("kreative.aniseed.core"), autoload("kreative.color"), autoload("kreative.utils.highlight.get"), autoload("externals.hsluv"), autoload("kreative.aniseed.string"), nil 15 | _2amodule_locals_2a["a"] = a 16 | _2amodule_locals_2a["colors"] = colors 17 | _2amodule_locals_2a["get"] = get 18 | _2amodule_locals_2a["hsl"] = hsl 19 | _2amodule_locals_2a["s"] = s 20 | _2amodule_locals_2a["_"] = _ 21 | local function blend(source_color, mix_color, alpha) 22 | local source_color0 = hsl.hex_to_rgb(source_color) 23 | local mix_color0 = hsl.hex_to_rgb(mix_color) 24 | local return_color 25 | do 26 | local in_table_1_auto = {} 27 | for i = 1, 3 do 28 | local value_from_in_2_auto 29 | do 30 | local current_color = ((alpha * (source_color0)[i]) + ((1 - alpha) * (mix_color0)[i])) 31 | value_from_in_2_auto = current_color 32 | end 33 | in_table_1_auto[i] = value_from_in_2_auto 34 | end 35 | return_color = in_table_1_auto 36 | end 37 | local output = tostring(hsl.rgb_to_hex(return_color)) 38 | return output 39 | end 40 | _2amodule_2a["blend"] = blend 41 | local function decimal_rgb__3ehex(rgb) 42 | return string.format("#%06x", rgb) 43 | end 44 | _2amodule_2a["decimal-rgb->hex"] = decimal_rgb__3ehex 45 | local function brighten(color, percent) 46 | local hsl_color = hsl.hex_to_hsluv(color) 47 | local luminance = (100 - hsl_color[3]) 48 | local input_luminance 49 | do 50 | local mid_luminance = (hsl_color[3] + (luminance * percent)) 51 | if (mid_luminance >= 100) then 52 | input_luminance = 99.99 53 | else 54 | input_luminance = mid_luminance 55 | end 56 | end 57 | hsl_color[3] = input_luminance 58 | local output = hsl.hsluv_to_hex(hsl_color) 59 | return output 60 | end 61 | _2amodule_2a["brighten"] = brighten 62 | local function hsluv_brighten(tuple, percent) 63 | local hsl_color = tuple 64 | local luminance = (100 - hsl_color[3]) 65 | local input_luminance 66 | do 67 | local mid_luminance = (hsl_color[3] * (1 + percent)) 68 | if (mid_luminance >= 100) then 69 | input_luminance = 99.99 70 | else 71 | input_luminance = mid_luminance 72 | end 73 | end 74 | hsl_color[3] = input_luminance 75 | local output = hsl.hsluv_to_hex(hsl_color) 76 | return output 77 | end 78 | _2amodule_2a["hsluv-brighten"] = hsluv_brighten 79 | local function darken(color, percent) 80 | local hsl_color = hsl.hex_to_hsluv(color) 81 | local luminance = (100 - hsl_color[3]) 82 | local input_luminance 83 | do 84 | local mid_luminance = (hsl_color[3] * (1 - percent)) 85 | if (mid_luminance >= 100) then 86 | input_luminance = 99.99 87 | else 88 | input_luminance = mid_luminance 89 | end 90 | end 91 | hsl_color[3] = input_luminance 92 | local output = hsl.hsluv_to_hex(hsl_color) 93 | return output 94 | end 95 | _2amodule_2a["darken"] = darken 96 | local function saturation(color, percent) 97 | local hsl_color = hsl.hex_to_hsluv(color) 98 | local saturation0 = hsl_color[2] 99 | local input_saturation 100 | do 101 | local mid_saturation = (hsl_color[2] + (saturation0 * percent)) 102 | if (mid_saturation >= 100) then 103 | input_saturation = 99.99 104 | elseif (mid_saturation <= 0) then 105 | input_saturation = 0.01 106 | else 107 | input_saturation = mid_saturation 108 | end 109 | end 110 | hsl_color[2] = input_saturation 111 | local output = hsl.hsluv_to_hex(hsl_color) 112 | return output 113 | end 114 | _2amodule_2a["saturation"] = saturation 115 | return _2amodule_2a -------------------------------------------------------------------------------- /lua/kreative/utils/json/init.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/kreative/utils/json/init.fnl" 2 | local _2amodule_name_2a = "kreative.utils.json.init" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = {} 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | local autoload = (require("kreative.aniseed.autoload")).autoload 14 | local main, _ = autoload("kreative.main"), nil 15 | _2amodule_locals_2a["main"] = main 16 | _2amodule_locals_2a["_"] = _ 17 | local std_data 18 | local function _1_(...) 19 | local fpath = vim.fn.stdpath("data") 20 | return (fpath .. "/kat") 21 | end 22 | std_data = ((_2amodule_2a)["std-data"] or _1_(...)) 23 | do end (_2amodule_2a)["std-data"] = std_data 24 | local files = ((_2amodule_2a).files or {"main", "syntax", "integrations.cmp", "integrations.coc", "integrations.fugitive", "integrations.gitsigns", "integrations.indent_blankline", "integrations.lsp", "integrations.startify", "integrations.treesitter", "integrations.ts_rainbow", "filetype.markdown", "filetype.vim", "filetype.vimwiki"}) 25 | do end (_2amodule_2a)["files"] = files 26 | local function path() 27 | return (std_data .. "/kreative/json/" .. main.configs.colors_name .. "/") 28 | end 29 | _2amodule_2a["path"] = path 30 | local function expand_table(tbl) 31 | local output = {} 32 | for k, value in pairs(tbl) do 33 | if (type(value) == "function") then 34 | local function _2_() 35 | local t_3_ = value() 36 | if (nil ~= t_3_) then 37 | t_3_ = (t_3_)[1] 38 | else 39 | end 40 | return t_3_ 41 | end 42 | if ((type(value()) == "table") and _2_()) then 43 | for _0, nest in pairs(value()) do 44 | if (type(nest) == "function") then 45 | table.insert(output, nest()) 46 | else 47 | table.insert(output, nest) 48 | end 49 | end 50 | else 51 | if value() then 52 | table.insert(output, value()) 53 | else 54 | end 55 | end 56 | else 57 | local function _9_() 58 | local t_8_ = value 59 | if (nil ~= t_8_) then 60 | t_8_ = (t_8_)[1] 61 | else 62 | end 63 | return t_8_ 64 | end 65 | if (type(_9_()) == "table") then 66 | for _0, nest in pairs(value) do 67 | table.insert(output, nest) 68 | end 69 | else 70 | table.insert(output, value) 71 | end 72 | end 73 | end 74 | return output 75 | end 76 | _2amodule_2a["expand-table"] = expand_table 77 | local function encode(tbl) 78 | return vim.json.encode(expand_table(tbl)) 79 | end 80 | _2amodule_2a["encode"] = encode 81 | local function encode_simple(tbl) 82 | return vim.json.encode(tbl) 83 | end 84 | _2amodule_2a["encode-simple"] = encode_simple 85 | local function decode(json) 86 | return vim.json.decode(json) 87 | end 88 | _2amodule_2a["decode"] = decode 89 | local function __3efile_21(file, json) 90 | os.execute(("rm -f " .. file)) 91 | local json_file = io.open(file, "w") 92 | local function close_handlers_8_auto(ok_9_auto, ...) 93 | json_file:close() 94 | if ok_9_auto then 95 | return ... 96 | else 97 | return error(..., 0) 98 | end 99 | end 100 | local function _13_() 101 | return json_file:write(json) 102 | end 103 | return close_handlers_8_auto(_G.xpcall(_13_, (package.loaded.fennel or debug).traceback)) 104 | end 105 | _2amodule_2a["->file!"] = __3efile_21 106 | local function exists_3f(file) 107 | local result_2_auto = vim.fn.filereadable(string.format("%s%s-%s.json", path(), file, main.configs.background)) 108 | if (result_2_auto == 0) then 109 | return false 110 | else 111 | return true 112 | end 113 | end 114 | _2amodule_2a["exists?"] = exists_3f 115 | local function _3c_file(file) 116 | local json_file = io.open(file, "r") 117 | if json_file then 118 | local out = json_file:read("*a") 119 | io.close(json_file) 120 | return out 121 | else 122 | return "{}" 123 | end 124 | end 125 | _2amodule_2a["<-file"] = _3c_file 126 | local function file_parse(suffix) 127 | local file = string.format("kreative.highlights.%s", suffix) 128 | return require(file)["high-colors"]() 129 | end 130 | _2amodule_2a["file-parse"] = file_parse 131 | return _2amodule_2a -------------------------------------------------------------------------------- /lua/kreative/utils/json/read.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/kreative/utils/json/read.fnl" 2 | local _2amodule_name_2a = "kreative.utils.json.read" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = {} 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | local autoload = (require("kreative.aniseed.autoload")).autoload 14 | local json, main = autoload("kreative.utils.json.init"), autoload("kreative.main") 15 | do end (_2amodule_locals_2a)["json"] = json 16 | _2amodule_locals_2a["main"] = main 17 | local function file_21(file) 18 | return json.decode(json["<-file"](string.format("%s/%s-%s.json", json.path(), file, main.configs.background))) 19 | end 20 | _2amodule_2a["file!"] = file_21 21 | local function full_file_21(full_file) 22 | return json.decode(json["<-file"](string.format("%s%s", json.path(), full_file))) 23 | end 24 | _2amodule_2a["full-file!"] = full_file_21 25 | local function colors(dir) 26 | local file = json["<-file"](string.format("%s/colors-%s.json", dir, main.configs.background)) 27 | if (#file > 0) then 28 | return json.decode(file) 29 | else 30 | return nil 31 | end 32 | end 33 | _2amodule_2a["colors"] = colors 34 | return _2amodule_2a -------------------------------------------------------------------------------- /lua/kreative/utils/json/write.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/kreative/utils/json/write.fnl" 2 | local _2amodule_name_2a = "kreative.utils.json.write" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = {} 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | local autoload = (require("kreative.aniseed.autoload")).autoload 14 | local color_table, json, main, _ = autoload("kreative.color"), autoload("kreative.utils.json.init"), autoload("kreative.main"), nil 15 | _2amodule_locals_2a["color-table"] = color_table 16 | _2amodule_locals_2a["json"] = json 17 | _2amodule_locals_2a["main"] = main 18 | _2amodule_locals_2a["_"] = _ 19 | local function file_21(file, source_json) 20 | vim.fn.system(string.format("mkdir -p %s", json.path())) 21 | return json["->file!"](string.format("%s/%s-%s.json", json.path(), file, main.configs.background), source_json) 22 | end 23 | _2amodule_2a["file!"] = file_21 24 | local function override_file_21(source_json, override, colors_name) 25 | vim.fn.system(string.format("mkdir -p %s", json.path())) 26 | vim.fn.system(string.format("mkdir -p %s", (json.path() .. override))) 27 | return json["->file!"](string.format("%s%s/%s-%s.json", json.path(), override, colors_name, main.configs.background), source_json) 28 | end 29 | _2amodule_2a["override-file!"] = override_file_21 30 | local function colors(dir) 31 | local colors0 = {{"light", "soft", "kat.nwim"}, {"light", "hard", "kat.nvim"}, {"dark", "soft", "kat.nwim"}, {"dark", "hard", "kat.nvim"}} 32 | main.configs.background = "" 33 | main.configs.contrast = "" 34 | main.configs.colors_name = "" 35 | for _0, v in pairs(colors0) do 36 | main.configs.background = v[1] 37 | main.configs.contrast = v[2] 38 | main.configs.colors_name = v[3] 39 | json["->file!"](string.format("%s/colors-%s-%s.json", dir, v[3], v[1]), json["encode-simple"](color_table.output())) 40 | end 41 | main.configs.background = __fnl_global__old_2dbackground 42 | main.configs.contrast = __fnl_global__old_2dcontrast 43 | main.configs.colors_name = __fnl_global__old_2dcolors_2dname 44 | return nil 45 | end 46 | _2amodule_2a["colors"] = colors 47 | local function colors_21() 48 | vim.fn.system(string.format("mkdir -p %s", json.path())) 49 | return json["->file!"](string.format("%s/colors-%s.json", json.path(), main.configs.background), json["encode-simple"](color_table.output())) 50 | end 51 | _2amodule_2a["colors!"] = colors_21 52 | return _2amodule_2a -------------------------------------------------------------------------------- /lua/kreative/utils/message/init.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/kreative/utils/message/init.fnl" 2 | local _2amodule_name_2a = "kreative.utils.message.init" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = {} 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | local notifications = ((_2amodule_2a).notifications or {main = {["render-disable"] = {number = 3, type = "error", message = "Pre-compiled color files are not supported atm, please set 'render' to true in your colorscheme file created for Kreative"}}, ["utils.export.render"] = {["compilation-dev"] = {number = 1, type = "warn", message = "Compilation is a development feature, please consider setting \"vim.g.kat_nvim_compile_enable\" to false"}}, ["utils.export.init"] = {["not-colorscheme"] = {number = 1, type = "error", message = "Not a theme made with Kreative, theme won't compile"}, ["invalid-arg"] = {number = 2, type = "error", message = "'%s' is not a valid argument for :KreativeGenTermTheme, check supported terminals or enclose in quotes if nvim-0.7 is not available"}, ["term-theme-generated"] = {number = 1, type = "info", message = "%s color file generated at cwd using %s colorscheme with %s background"}}}) 14 | do end (_2amodule_locals_2a)["notifications"] = notifications 15 | local function notify_24(log_level, message) 16 | local _1_ = log_level 17 | if (_1_ == "error") then 18 | return vim.notify(message, vim.log.levels.ERROR) 19 | elseif (_1_ == "warn") then 20 | return vim.notify(message, vim.log.levels.WARN) 21 | elseif (_1_ == "info") then 22 | return vim.notify(message, vim.log.levels.INFO) 23 | elseif (_1_ == "debug") then 24 | return vim.notify(message, vim.log.levels.DEBUG) 25 | elseif (_1_ == "trace") then 26 | return vim.notify(message, vim.log.levels.TRACE) 27 | else 28 | return nil 29 | end 30 | end 31 | _2amodule_locals_2a["notify$"] = notify_24 32 | local function error_24(message) 33 | return notify_24("error", message) 34 | end 35 | _2amodule_2a["error$"] = error_24 36 | local function warn_24(message) 37 | return notify_24("warn", message) 38 | end 39 | _2amodule_2a["warn$"] = warn_24 40 | local function info_24(message) 41 | return notify_24("info", message) 42 | end 43 | _2amodule_2a["info$"] = info_24 44 | local function debug_24(message) 45 | return notify_24("debug", message) 46 | end 47 | _2amodule_2a["debug$"] = debug_24 48 | local function trace_24(message) 49 | return notify_24("trace", message) 50 | end 51 | _2amodule_2a["trace$"] = trace_24 52 | local function _3c_table(from_module, message_type) 53 | local message_table = notifications[from_module][message_type] 54 | local notify_type 55 | do 56 | local _3_ = message_table.type 57 | if (_3_ == "error") then 58 | notify_type = "E" 59 | elseif (_3_ == "warn") then 60 | notify_type = "W" 61 | elseif (_3_ == "info") then 62 | notify_type = "I" 63 | elseif (_3_ == "debug") then 64 | notify_type = "D" 65 | elseif (_3_ == "trace") then 66 | notify_type = "T" 67 | else 68 | notify_type = nil 69 | end 70 | end 71 | local output = string.format("Kreative %s%s: %s", notify_type, message_table.number, message_table.message) 72 | return output 73 | end 74 | _2amodule_2a["<-table"] = _3c_table 75 | return _2amodule_2a -------------------------------------------------------------------------------- /lua/kreative/utils/options/init.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/kreative/utils/options/init.fnl" 2 | local _2amodule_name_2a = "kreative.utils.options.init" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = {} 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | local autoload = (require("kreative.aniseed.autoload")).autoload 14 | local main, _ = autoload("kreative.main"), nil 15 | _2amodule_locals_2a["main"] = main 16 | _2amodule_locals_2a["_"] = _ 17 | local function default(opts) 18 | local output = {} 19 | local _2_ 20 | do 21 | local t_1_ = opts 22 | if (nil ~= t_1_) then 23 | t_1_ = (t_1_).integrations 24 | else 25 | end 26 | _2_ = t_1_ 27 | end 28 | if _2_ then 29 | output.integrations = opts.integrations 30 | else 31 | output.integrations = {"treesitter", "lsp", "ts_rainbow", "indent_blankline", "startify", "coc", "cmp", "gitsigns", "fugitive"} 32 | end 33 | local _6_ 34 | do 35 | local t_5_ = opts 36 | if (nil ~= t_5_) then 37 | t_5_ = (t_5_).filetypes 38 | else 39 | end 40 | _6_ = t_5_ 41 | end 42 | if _6_ then 43 | output.filetypes = opts.filetypes 44 | else 45 | output.filetypes = {"vim", "vimwiki", "markdown"} 46 | end 47 | local _10_ 48 | do 49 | local t_9_ = opts 50 | if (nil ~= t_9_) then 51 | t_9_ = (t_9_).comment_style 52 | else 53 | end 54 | _10_ = t_9_ 55 | end 56 | if _10_ then 57 | output.comment_style = opts.comment_style 58 | else 59 | output.comment_style = {"italic"} 60 | end 61 | local _14_ 62 | do 63 | local t_13_ = opts 64 | if (nil ~= t_13_) then 65 | t_13_ = (t_13_).render 66 | else 67 | end 68 | _14_ = t_13_ 69 | end 70 | if _14_ then 71 | output.render = opts.render 72 | else 73 | output.render = false 74 | end 75 | output.version = "0.8" 76 | return output 77 | end 78 | _2amodule_2a["default"] = default 79 | return _2amodule_2a -------------------------------------------------------------------------------- /lua/kreative/utils/override/init.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/kreative/utils/override/init.fnl" 2 | local _2amodule_name_2a = "kreative.utils.override.init" 3 | local _2amodule_2a 4 | do 5 | package.loaded[_2amodule_name_2a] = {} 6 | _2amodule_2a = package.loaded[_2amodule_name_2a] 7 | end 8 | local _2amodule_locals_2a 9 | do 10 | _2amodule_2a["aniseed/locals"] = {} 11 | _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] 12 | end 13 | local autoload = (require("kreative.aniseed.autoload")).autoload 14 | local json = autoload("kreative.utils.json.init") 15 | do end (_2amodule_locals_2a)["json"] = json 16 | local function main_files() 17 | local fd = vim.loop.fs_opendir(json.path(), nil, (#json.files * 2)) 18 | local output = {} 19 | if fd then 20 | local dir = vim.loop.fs_readdir(fd) 21 | if dir then 22 | for _, descriptor in pairs(dir) do 23 | if (descriptor.type == "file") then 24 | output[descriptor.name] = true 25 | else 26 | end 27 | end 28 | vim.loop.fs_closedir(fd) 29 | return output 30 | else 31 | return nil 32 | end 33 | else 34 | return {} 35 | end 36 | end 37 | _2amodule_2a["main-files"] = main_files 38 | local function get_dir() 39 | local desc_num = (10 + (#json.files * 4)) 40 | local fd = vim.loop.fs_opendir(json.path(), nil, desc_num) 41 | local output = {} 42 | if fd then 43 | for _, descriptor in pairs(vim.loop.fs_readdir(fd)) do 44 | if (descriptor.type == "directory") then 45 | output[descriptor.name] = true 46 | else 47 | end 48 | end 49 | vim.loop.fs_closedir(fd) 50 | return output 51 | else 52 | return nil 53 | end 54 | end 55 | _2amodule_2a["get-dir"] = get_dir 56 | local function files() 57 | local desc_num = 20 58 | local dirs = get_dir() 59 | local output = {} 60 | if dirs then 61 | for dir, _ in pairs(dirs) do 62 | local fd = vim.loop.fs_opendir((json.path() .. dir), nil, desc_num) 63 | if fd then 64 | for _0, descriptor in pairs(vim.loop.fs_readdir(fd)) do 65 | if (descriptor.type == "file") then 66 | output[(dir .. "/" .. descriptor.name)] = true 67 | else 68 | end 69 | end 70 | else 71 | end 72 | vim.loop.fs_closedir(fd) 73 | end 74 | return output 75 | else 76 | return nil 77 | end 78 | end 79 | _2amodule_2a["files"] = files 80 | return _2amodule_2a -------------------------------------------------------------------------------- /lua/lualine/themes/kreative.lua: -------------------------------------------------------------------------------- 1 | local _2afile_2a = "fnl/lualine/themes/kreative.fnl" 2 | local ucolors = require("kreative.utils.highlight.utils") 3 | local colors = require("kreative.color") 4 | local kreative = {} 5 | if (vim.o.termguicolors == true) then 6 | kreative["normal"] = {a = {bg = colors.kreative.purple.base.color, fg = colors.kreative.fg.auto.color, gui = "bold"}, b = {bg = colors.kreative.blue.mix_shadow_bg_more.color, fg = colors.kreative.fg.auto.color}, c = {bg = colors.kreative.pink.base.color, fg = colors.kreative.fg.auto.color}} 7 | kreative["insert"] = {a = {bg = colors.kreative.blue.base.color, fg = colors.kreative.fg.auto.color, gui = "bold"}, b = {bg = colors.kreative.blue.mix_shadow_bg_more.color, fg = colors.kreative.fg.auto.color}, c = {bg = colors.kreative.blue.brighten.color, fg = colors.kreative.fg.auto.color}} 8 | kreative["visual"] = {a = {bg = colors.kreative.red.base.color, fg = colors.kreative.fg.auto.color, gui = "bold"}, b = {bg = colors.kreative.blue.mix_shadow_bg_more.color, fg = colors.kreative.fg.auto.color}, c = {bg = colors.kreative.purple.base.color, fg = colors.kreative.fg.auto.color}} 9 | kreative["replace"] = {a = {bg = colors.kreative.orange.base.color, fg = colors.kreative.fg.auto.color, gui = "bold"}, b = {bg = colors.kreative.blue.mix_shadow_bg_more.color, fg = colors.kreative.fg.auto.color}, c = {bg = colors.kreative.blue.brighten.color, fg = colors.kreative.fg.auto.color}} 10 | kreative["command"] = {a = {bg = colors.kreative.green.match_bg.color, fg = colors.kreative.fg.auto.color, gui = "bold"}, b = {bg = colors.kreative.blue.mix_shadow_bg_more.color, fg = colors.kreative.fg.auto.color}, c = {bg = colors.kreative.green.match_bg_less.color, fg = colors.kreative.fg.auto.color}} 11 | kreative["terminal"] = {a = {bg = colors.kreative.pink.match_bg_less.color, fg = colors.kreative.fg.auto.color, gui = "bold"}, b = {bg = colors.kreative.blue.mix_shadow_bg_more.color, fg = colors.kreative.fg.auto.color}, c = {bg = colors.kreative.red.match_bg.color, fg = colors.kreative.fg.auto.color}} 12 | kreative["inactive"] = {a = {bg = colors.kreative.fg.sixth.color, fg = colors.kreative.bg.base.color}, b = {bg = colors.kreative.fg.sixth.color, fg = colors.kreative.bg.base.color}, c = {bg = colors.kreative.fg.shadow.color, fg = colors.kreative.bg.base.color}} 13 | else 14 | kreative["normal"] = {a = {bg = 6, fg = 7, gui = "bold"}, b = {bg = 12, fg = 7}, c = {bg = 5, fg = 7}} 15 | kreative["insert"] = {a = {bg = 4, fg = 7, gui = "bold"}, b = {bg = 12, fg = 7}, c = {bg = 4, fg = 7}} 16 | kreative["visual"] = {a = {bg = 1, fg = 7, gui = "bold"}, b = {bg = 12, fg = 7}, c = {bg = 6, fg = 7}} 17 | kreative["replace"] = {a = {bg = 3, fg = 7, gui = "bold"}, b = {bg = 4, fg = 7}, c = {bg = 4, fg = 7}} 18 | kreative["command"] = {a = {bg = 2, fg = 7, gui = "bold"}, b = {bg = 12, fg = 7}, c = {bg = 10, fg = 7}} 19 | kreative["terminal"] = {a = {bg = 13, fg = 7, gui = "bold"}, b = {bg = 12, fg = 7}, c = {bg = 9, fg = 7}} 20 | kreative["inactive"] = {a = {bg = 15, fg = 0}, b = {bg = 15, fg = 0}, c = {bg = 15, fg = 0}} 21 | end 22 | return kreative -------------------------------------------------------------------------------- /scripts/fnlfmt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | for i in $(find 'fnl/kreative/' -name "*.fnl"); do 4 | fnlfmt --fix "$i" 5 | done; 6 | echo "Done formatting with fnlfmt" 7 | --------------------------------------------------------------------------------