mirror of
https://github.com/elkowar/dots-of-war.git
synced 2024-11-06 03:12:24 +00:00
consistent formatting
This commit is contained in:
parent
c188b55475
commit
66573e88ea
6 changed files with 189 additions and 189 deletions
|
@ -25,6 +25,7 @@
|
||||||
"
|
"
|
||||||
|
|
||||||
|
|
||||||
|
asd FUCK FUKC FCUK CUFLKJASDFLKJASDLKJASDLKj
|
||||||
|
|
||||||
|
|
||||||
<label text="< > bruh ""/>
|
<label text="< > bruh ""/>
|
||||||
|
@ -173,10 +174,11 @@
|
||||||
<pxbar/>
|
<pxbar/>
|
||||||
</widget>
|
</widget>
|
||||||
</window>
|
</window>
|
||||||
<window screen="1" name="mw" stacking="fg" focusable="false">
|
<window screen="0" name="mw" stacking="fg" focusable="false">
|
||||||
<!--<window screen="2" name="mw" stacking="fg" focusable="false">-->
|
<!--<window screen="2" name="mw" stacking="fg" focusable="false">-->
|
||||||
<!--<reserve side="l" distance="500px"/>-->
|
<!--<reserve side="l" distance="500px"/>-->
|
||||||
<geometry anchor="center" width="200px" height="200px" x="0px" y="0px"/>
|
<geometry anchor="center" width="20%" height="50%" x="50px" y="20px"/>
|
||||||
|
<reserve x="12px" y="20px" side="top" distance="4%" layer="top" exclusive="true"/>
|
||||||
<widget>
|
<widget>
|
||||||
<test ree="test" />
|
<test ree="test" />
|
||||||
</widget>
|
</widget>
|
||||||
|
|
|
@ -14,18 +14,19 @@
|
||||||
(require "plugins.galaxyline")
|
(require "plugins.galaxyline")
|
||||||
(require "plugins.bufferline")
|
(require "plugins.bufferline")
|
||||||
|
|
||||||
(local colors (utils.colors))
|
;(tset debug :traceback fennel.traceback)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(def colors (utils.colors))
|
||||||
|
|
||||||
(set vim.g.conjure#client#fennel#aniseed#aniseed_module_prefix "aniseed.")
|
(set vim.g.conjure#client#fennel#aniseed#aniseed_module_prefix "aniseed.")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; Colors ------------------------------------------------------- foldstart
|
; Colors ------------------------------------------------------- foldstart
|
||||||
|
|
||||||
(utils.highlight-add
|
(utils.highlight-add
|
||||||
[ "GruvboxBlueSign" "GruvboxAquaSign" "GruvboxRedSign" "GruvboxYellowSign" "GruvboxGreenSign" "GruvboxOrangeSign" "GruvboxPurpleSign"]
|
["GruvboxBlueSign" "GruvboxAquaSign" "GruvboxRedSign" "GruvboxYellowSign" "GruvboxGreenSign" "GruvboxOrangeSign" "GruvboxPurpleSign"]
|
||||||
{:bg "NONE"})
|
{:bg "NONE"})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -34,25 +35,25 @@
|
||||||
; Treesitter ------------------------------------------------------- foldstart
|
; Treesitter ------------------------------------------------------- foldstart
|
||||||
|
|
||||||
(nvim-treesitter-configs.setup
|
(nvim-treesitter-configs.setup
|
||||||
{:ensure_installed "all"
|
{:ensure_installed "all"
|
||||||
:highlight {:enable true
|
:highlight {:enable true
|
||||||
:disable ["fennel"]}
|
:disable ["fennel"]}
|
||||||
:indent {:enable true
|
:indent {:enable true
|
||||||
:disable ["lua"]}
|
:disable ["lua"]}
|
||||||
|
|
||||||
:incremental_selection
|
:incremental_selection
|
||||||
{ :enable true
|
{:enable true
|
||||||
:keymaps { :init_selection "gss"
|
:keymaps {:init_selection "gss"
|
||||||
:node_incremental "gsl"
|
:node_incremental "gsl"
|
||||||
:node_decremental "gsh"
|
:node_decremental "gsh"
|
||||||
:scope_incremental "gsj"
|
:scope_incremental "gsj"
|
||||||
:scope_decremental "gsk"}}
|
:scope_decremental "gsk"}}
|
||||||
|
|
||||||
; disabled due to it fucking with gitsigns.nvim
|
; disabled due to it fucking with gitsigns.nvim
|
||||||
;:rainbow { :enable true
|
;:rainbow { :enable true
|
||||||
;:extended_mode true}
|
;:extended_mode true}
|
||||||
|
|
||||||
:context_commentstring { :enable true}})
|
:context_commentstring {:enable true}})
|
||||||
|
|
||||||
;(nvim-biscuits.setup {}
|
;(nvim-biscuits.setup {}
|
||||||
;{ :on_events ["InsertLeave" "CursorHoldI"]})
|
;{ :on_events ["InsertLeave" "CursorHoldI"]})
|
||||||
|
@ -83,12 +84,12 @@
|
||||||
(let [diffview (require "diffview")
|
(let [diffview (require "diffview")
|
||||||
cb (. (require "diffview.config") :diffview_callback)]
|
cb (. (require "diffview.config") :diffview_callback)]
|
||||||
(diffview.setup
|
(diffview.setup
|
||||||
{:diff_binaries false
|
{:diff_binaries false
|
||||||
:file_panel {:width 35
|
:file_panel {:width 35
|
||||||
:use_icons false}
|
:use_icons false}
|
||||||
:key_bindings {:view {:<leader>dn (cb "select_next_entry")
|
:key_bindings {:view {:<leader>dn (cb "select_next_entry")
|
||||||
:<leader>dp (cb "select_prev_entry")
|
:<leader>dp (cb "select_prev_entry")
|
||||||
:<leader>dd (cb "toggle_files")}}}))
|
:<leader>dd (cb "toggle_files")}}}))
|
||||||
|
|
||||||
; foldend
|
; foldend
|
||||||
|
|
||||||
|
@ -100,17 +101,14 @@
|
||||||
(utils.keymap :i :<Space> newKey {:buffer true}))
|
(utils.keymap :i :<Space> newKey {:buffer true}))
|
||||||
|
|
||||||
(fn _G.UnbindSpaceStuff []
|
(fn _G.UnbindSpaceStuff []
|
||||||
(if (and remapped-space (~= remapped-space {}))
|
(when (and remapped-space (~= remapped-space {}))
|
||||||
(do
|
(utils.del-keymap :i :<Space> true)
|
||||||
(utils.del-keymap :i :<Space> true)
|
(when (~= remapped-space.old "")
|
||||||
(if (~= remapped-space.old "")
|
(utils.keymap :i :<Space> remapped-space.old {:buffer true}))
|
||||||
(utils.keymap :i :<Space> remapped-space.old {:buffer true}))
|
(set remapped-space nil)))
|
||||||
(set remapped-space nil))))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(nvim.command "autocmd! InsertLeave * :call v:lua.UnbindSpaceStuff()")
|
(nvim.command "autocmd! InsertLeave * :call v:lua.UnbindSpaceStuff()")
|
||||||
(utils.keymap :n "<Tab>j" ":call v:lua.RebindShit('_')<CR>")
|
(utils.keymap :n "<Tab>j" ":call v:lua.RebindShit('_')<CR>")
|
||||||
(utils.keymap :n "<Tab>k" ":call v:lua.RebindShit('::')<CR>")
|
(utils.keymap :n "<Tab>k" ":call v:lua.RebindShit('::')<CR>")
|
||||||
|
@ -121,5 +119,4 @@
|
||||||
; foldend
|
; foldend
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; vim:foldmarker=foldstart,foldend
|
; vim:foldmarker=foldstart,foldend
|
||||||
|
|
|
@ -13,80 +13,80 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(wk.setup {})
|
|
||||||
|
|
||||||
(fn cmd [s desc] [(.. "<cmd>" s "<cr>") desc])
|
(fn cmd [s desc] [(.. "<cmd>" s "<cr>") desc])
|
||||||
(fn le [s desc] (cmd (.. "call luaeval(\"" s "\")") desc))
|
(fn le [s desc] (cmd (.. "call luaeval(\"" s "\")") desc))
|
||||||
(fn rebind [s desc] [s desc])
|
(fn rebind [s desc] [s desc])
|
||||||
|
|
||||||
|
(wk.setup {})
|
||||||
(wk.register
|
(wk.register
|
||||||
{ "c" { :name "+comment out"}
|
{"c" {:name "+comment out"}
|
||||||
"e" { :name "+emmet"}
|
"e" {:name "+emmet"}
|
||||||
|
|
||||||
"h" (cmd "bprevious" "previous buffer")
|
"h" (cmd "bprevious" "previous buffer")
|
||||||
"l" (cmd "bnext" "next buffer")
|
"l" (cmd "bnext" "next buffer")
|
||||||
"o" (cmd "Telescope live_grep" "Grep files")
|
"o" (cmd "Telescope live_grep" "Grep files")
|
||||||
"p" (cmd "Telescope file_browser" "Open file-browser")
|
"p" (cmd "Telescope file_browser" "Open file-browser")
|
||||||
":" (cmd "Telescope commands" "Search command with fzf")
|
":" (cmd "Telescope commands" "Search command with fzf")
|
||||||
|
|
||||||
"m" { :name "+Code actions"
|
"m" {:name "+Code actions"
|
||||||
"d" (cmd "Lspsaga hover_doc" "Show documentation")
|
"d" (cmd "Lspsaga hover_doc" "Show documentation")
|
||||||
"b" (cmd "Lspsaga lsp_finder" "Find stuff")
|
"b" (cmd "Lspsaga lsp_finder" "Find stuff")
|
||||||
"x" (cmd "Lspsaga preview_definition" "Preview definition")
|
"x" (cmd "Lspsaga preview_definition" "Preview definition")
|
||||||
"o" (cmd "SymbolsOutline" "Outline")
|
"o" (cmd "SymbolsOutline" "Outline")
|
||||||
"S" (cmd "Telescope lsp_document_symbols" "Symbols in document")
|
"S" (cmd "Telescope lsp_document_symbols" "Symbols in document")
|
||||||
"s" (cmd "Telescope lsp_dynamic_workspace_symbols" "Symbols in workspace")
|
"s" (cmd "Telescope lsp_dynamic_workspace_symbols" "Symbols in workspace")
|
||||||
"t" (cmd "Lspsaga signature_help" "Show signature help")
|
"t" (cmd "Lspsaga signature_help" "Show signature help")
|
||||||
"n" (cmd "Lspsaga rename" "Rename")
|
"n" (cmd "Lspsaga rename" "Rename")
|
||||||
"v" (cmd "Lspsaga code_action" "Apply codeaction")
|
"v" (cmd "Lspsaga code_action" "Apply codeaction")
|
||||||
"a" (cmd "Lspsaga show_cursor_diagnostics" "Cursor diagnostics")
|
"a" (cmd "Lspsaga show_cursor_diagnostics" "Cursor diagnostics")
|
||||||
"A" (cmd "Lspsaga show_line_diagnostics" "Line diagnostics")
|
"A" (cmd "Lspsaga show_line_diagnostics" "Line diagnostics")
|
||||||
"E" (cmd "Telescope lsp_workspace_diagnostics" "List diagnostics")
|
"E" (cmd "Telescope lsp_workspace_diagnostics" "List diagnostics")
|
||||||
"r" (cmd "Telescope lsp_references" "Show references")
|
"r" (cmd "Telescope lsp_references" "Show references")
|
||||||
"e" (cmd "LspTroubleOpen" "Show diagnostics")
|
"e" (cmd "LspTroubleOpen" "Show diagnostics")
|
||||||
"g" [vim.lsp.buf.definition "Go to definition"]
|
"g" [vim.lsp.buf.definition "Go to definition"]
|
||||||
"i" [vim.lsp.buf.implementation "Show implementation"]
|
"i" [vim.lsp.buf.implementation "Show implementation"]
|
||||||
"f" [vim.lsp.buf.formatting "format file"]
|
"f" [vim.lsp.buf.formatting "format file"]
|
||||||
"h" (cmd "RustToggleInlayHints" "Toggle inlay hints")}
|
"h" (cmd "RustToggleInlayHints" "Toggle inlay hints")}
|
||||||
|
|
||||||
"f" { :name "+folds"
|
"f" {:name "+folds"
|
||||||
"o" (cmd "foldopen" "open fold")
|
"o" (cmd "foldopen" "open fold")
|
||||||
"n" (cmd "foldclose" "close fold")
|
"n" (cmd "foldclose" "close fold")
|
||||||
"j" (rebind "zj" "jump to next fold")
|
"j" (rebind "zj" "jump to next fold")
|
||||||
"k" (rebind "zk" "jump to previous fold")}
|
"k" (rebind "zk" "jump to previous fold")}
|
||||||
|
|
||||||
"v" { :name "+view-and-layout"
|
"v" {:name "+view-and-layout"
|
||||||
"n" (cmd "set relativenumber!" "toggle relative numbers")
|
"n" (cmd "set relativenumber!" "toggle relative numbers")
|
||||||
"m" (cmd "set nonumber! norelativenumber" "toggle numbers")
|
"m" (cmd "set nonumber! norelativenumber" "toggle numbers")
|
||||||
"g" (cmd "Goyo | set linebreak" "toggle focus mode")
|
"g" (cmd "Goyo | set linebreak" "toggle focus mode")
|
||||||
"i" (cmd "IndentGuidesToggle" "toggle indent guides")}
|
"i" (cmd "IndentGuidesToggle" "toggle indent guides")}
|
||||||
|
|
||||||
"b" { :name "+buffers"
|
"b" {:name "+buffers"
|
||||||
"b" (cmd "Buffers" "select open buffer")
|
"b" (cmd "Buffers" "select open buffer")
|
||||||
"c" (cmd "bdelete!" "close open buffer")
|
"c" (cmd "bdelete!" "close open buffer")
|
||||||
"w" (cmd "bwipeout!" "wipeout open buffer")}}
|
"w" (cmd "bwipeout!" "wipeout open buffer")}}
|
||||||
|
|
||||||
{ :prefix "<leader>"})
|
{:prefix "<leader>"})
|
||||||
|
|
||||||
(wk.register
|
(wk.register
|
||||||
{ "<tab>" "which_key_ignore"
|
{"<tab>" "which_key_ignore"
|
||||||
"gss" "init selection"
|
"gss" "init selection"
|
||||||
"z" { :name "+folds"
|
"z" {:name "+folds"
|
||||||
"c" (cmd "foldclose" "close fold")
|
"c" (cmd "foldclose" "close fold")
|
||||||
"o" (cmd "foldopen" "open fold")}})
|
"o" (cmd "foldopen" "open fold")}})
|
||||||
|
|
||||||
(wk.register
|
(wk.register
|
||||||
{ "<tab>" "which_key_ignore"}
|
{"<tab>" "which_key_ignore"}
|
||||||
{ :mode "i"})
|
{:mode "i"})
|
||||||
|
|
||||||
(wk.register
|
(wk.register
|
||||||
{ :name "+Selection"
|
{:name "+Selection"
|
||||||
"j" "increment selection"
|
"j" "increment selection"
|
||||||
"k" "decrement selection"
|
"k" "decrement selection"
|
||||||
"l" "increment node"
|
"l" "increment node"
|
||||||
"h" "decrement node"}
|
"h" "decrement node"}
|
||||||
{ :prefix "gs"
|
{:prefix "gs"
|
||||||
:mode "v"})
|
:mode "v"})
|
||||||
|
|
||||||
|
|
||||||
(set nvim.o.timeoutlen 200)
|
(set nvim.o.timeoutlen 200)
|
||||||
|
|
|
@ -8,58 +8,58 @@
|
||||||
(local colors (utils.colors))
|
(local colors (utils.colors))
|
||||||
|
|
||||||
; :h bufferline-lua-highlights
|
; :h bufferline-lua-highlights
|
||||||
(let [selected { :guibg colors.neutral_aqua :guifg colors.dark0 :gui ""}
|
(let [selected {:guibg colors.neutral_aqua :guifg colors.dark0 :gui ""}
|
||||||
visible { :guibg colors.dark1 :guifg colors.neutral_aqua :gui ""}]
|
visible {:guibg colors.dark1 :guifg colors.neutral_aqua :gui ""}]
|
||||||
(bufferline.setup
|
(bufferline.setup
|
||||||
{ :options
|
{:options
|
||||||
{ :diagnostics "nvim_lsp"
|
{:diagnostics "nvim_lsp"
|
||||||
:diagnostics_indicator (fn [cnt lvl diagnostics-dict] (.. " (" cnt ")"))
|
:diagnostics_indicator (fn [cnt lvl diagnostics-dict] (.. " (" cnt ")"))
|
||||||
:show_buffer_close_icons false
|
:show_buffer_close_icons false
|
||||||
:show_close_icon false
|
:show_close_icon false
|
||||||
:show_tab_indicators false
|
:show_tab_indicators false
|
||||||
:enforce_regular_tabs false
|
:enforce_regular_tabs false
|
||||||
:tab_size 10}
|
:tab_size 10}
|
||||||
|
|
||||||
; https://github.com/akinsho/nvim-bufferline.lua/blob/4ebab39af2376b850724dd29c29579c8e024abe6/lua/bufferline/config.lua#L74
|
; https://github.com/akinsho/nvim-bufferline.lua/blob/4ebab39af2376b850724dd29c29579c8e024abe6/lua/bufferline/config.lua#L74
|
||||||
:highlights
|
:highlights
|
||||||
{ :fill { :guibg colors.dark0 :guifg colors.light0}
|
{:fill {:guibg colors.dark0 :guifg colors.light0}
|
||||||
:background visible
|
:background visible
|
||||||
:buffer_visible visible
|
:buffer_visible visible
|
||||||
:buffer_selected selected
|
:buffer_selected selected
|
||||||
:modified visible
|
:modified visible
|
||||||
:modified_visible visible
|
:modified_visible visible
|
||||||
:modified_selected selected
|
:modified_selected selected
|
||||||
:error visible
|
:error visible
|
||||||
:error_selected selected
|
:error_selected selected
|
||||||
:error_visible selected
|
:error_visible selected
|
||||||
:warning visible
|
:warning visible
|
||||||
:warning_selected selected
|
:warning_selected selected
|
||||||
:warning_visible visible
|
:warning_visible visible
|
||||||
|
|
||||||
:duplicate visible
|
:duplicate visible
|
||||||
:duplicate_visible visible
|
:duplicate_visible visible
|
||||||
:duplicate_selected selected
|
:duplicate_selected selected
|
||||||
|
|
||||||
:diagnostic { :gui "" :guibg colors.dark1 :guifg colors.neutral_red}
|
:diagnostic {:gui "" :guibg colors.dark1 :guifg colors.neutral_red}
|
||||||
:diagnostic_visible { :gui "" :guibg colors.dark1 :guifg colors.neutral_red}
|
:diagnostic_visible {:gui "" :guibg colors.dark1 :guifg colors.neutral_red}
|
||||||
:diagnostic_selected { :gui "" :guibg colors.neutral_aqua :guifg colors.faded_red}
|
:diagnostic_selected {:gui "" :guibg colors.neutral_aqua :guifg colors.faded_red}
|
||||||
|
|
||||||
:info_diagnostic { :gui "" :guibg colors.dark1 :guifg colors.neutral_blue}
|
:info_diagnostic {:gui "" :guibg colors.dark1 :guifg colors.neutral_blue}
|
||||||
:info_diagnostic_visible { :gui "" :guibg colors.dark1 :guifg colors.neutral_blue}
|
:info_diagnostic_visible {:gui "" :guibg colors.dark1 :guifg colors.neutral_blue}
|
||||||
:info_diagnostic_selected { :gui "" :guibg colors.neutral_aqua :guifg colors.faded_blue}
|
:info_diagnostic_selected {:gui "" :guibg colors.neutral_aqua :guifg colors.faded_blue}
|
||||||
|
|
||||||
:warning_diagnostic { :gui "" :guibg colors.dark1 :guifg colors.neutral_yellow}
|
:warning_diagnostic {:gui "" :guibg colors.dark1 :guifg colors.neutral_yellow}
|
||||||
:warning_diagnostic_visible { :gui "" :guibg colors.dark1 :guifg colors.neutral_yellow}
|
:warning_diagnostic_visible {:gui "" :guibg colors.dark1 :guifg colors.neutral_yellow}
|
||||||
:warning_diagnostic_selected { :gui "" :guibg colors.neutral_aqua :guifg colors.faded_yellow}
|
:warning_diagnostic_selected {:gui "" :guibg colors.neutral_aqua :guifg colors.faded_yellow}
|
||||||
|
|
||||||
:separator visible
|
:separator visible
|
||||||
:indicator_selected {:guibg colors.neutral_aqua :guifg colors.neutral_aqua}
|
:indicator_selected {:guibg colors.neutral_aqua :guifg colors.neutral_aqua}
|
||||||
|
|
||||||
; stuff I've never seen before :thonk:
|
; stuff I've never seen before :thonk:
|
||||||
:pick_selected {:guibg colors.bright_red :guifg colors.bright_red}
|
:pick_selected {:guibg colors.bright_red :guifg colors.bright_red}
|
||||||
:tab_selected {:guibg colors.bright_green :guifg colors.bright_green}
|
:tab_selected {:guibg colors.bright_green :guifg colors.bright_green}
|
||||||
:tab {:guibg colors.bright_yellow :guifg colors.bright_yellow}}}))
|
:tab {:guibg colors.bright_yellow :guifg colors.bright_yellow}}}))
|
||||||
|
|
||||||
|
|
||||||
(utils.highlight :BufferLineInfoSelected { :bg colors.neutral_aqua :fg colors.dark0 :gui "NONE"})
|
(utils.highlight :BufferLineInfoSelected {:bg colors.neutral_aqua :fg colors.dark0 :gui "NONE"})
|
||||||
|
|
||||||
|
|
|
@ -15,23 +15,23 @@
|
||||||
(local colors (utils.colors))
|
(local colors (utils.colors))
|
||||||
|
|
||||||
(local modes
|
(local modes
|
||||||
{ :n { :text "NORMAL" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
|
{:n {:text "NORMAL" :colors {:bg colors.neutral_aqua :fg colors.dark0}}
|
||||||
:i { :text "INSERT" :colors { :bg colors.neutral_yellow :fg colors.dark0}}
|
:i {:text "INSERT" :colors {:bg colors.neutral_yellow :fg colors.dark0}}
|
||||||
:c { :text "CMD" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
|
:c {:text "CMD" :colors {:bg colors.neutral_aqua :fg colors.dark0}}
|
||||||
:ce { :text "NORMEX" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
|
:ce {:text "NORMEX" :colors {:bg colors.neutral_aqua :fg colors.dark0}}
|
||||||
:cv { :text "EX" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
|
:cv {:text "EX" :colors {:bg colors.neutral_aqua :fg colors.dark0}}
|
||||||
:ic { :text "INSCOMP" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
|
:ic {:text "INSCOMP" :colors {:bg colors.neutral_aqua :fg colors.dark0}}
|
||||||
:no { :text "OP-PENDING" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
|
:no {:text "OP-PENDING" :colors {:bg colors.neutral_aqua :fg colors.dark0}}
|
||||||
:r { :text "HIT-ENTER" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
|
:r {:text "HIT-ENTER" :colors {:bg colors.neutral_aqua :fg colors.dark0}}
|
||||||
:r? { :text "CONFIRM" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
|
:r? {:text "CONFIRM" :colors {:bg colors.neutral_aqua :fg colors.dark0}}
|
||||||
:R { :text "REPLACE" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
|
:R {:text "REPLACE" :colors {:bg colors.neutral_aqua :fg colors.dark0}}
|
||||||
:Rv { :text "VIRTUAL" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
|
:Rv {:text "VIRTUAL" :colors {:bg colors.neutral_aqua :fg colors.dark0}}
|
||||||
:s { :text "SELECT" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
|
:s {:text "SELECT" :colors {:bg colors.neutral_aqua :fg colors.dark0}}
|
||||||
:S { :text "SELECT" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
|
:S {:text "SELECT" :colors {:bg colors.neutral_aqua :fg colors.dark0}}
|
||||||
:t { :text "TERM" :colors { :bg colors.neutral_aqua :fg colors.dark0}}
|
:t {:text "TERM" :colors {:bg colors.neutral_aqua :fg colors.dark0}}
|
||||||
:v { :text "VISUAL" :colors { :bg colors.neutral_blue :fg colors.dark0}}
|
:v {:text "VISUAL" :colors {:bg colors.neutral_blue :fg colors.dark0}}
|
||||||
:V { :text "VISUAL LINE" :colors { :bg colors.neutral_blue :fg colors.dark0}}
|
:V {:text "VISUAL LINE" :colors {:bg colors.neutral_blue :fg colors.dark0}}
|
||||||
"" { :text "VISUAL BLOCK" :colors { :bg colors.neutral_blue :fg colors.dark0}}})
|
"" {:text "VISUAL BLOCK" :colors {:bg colors.neutral_blue :fg colors.dark0}}})
|
||||||
|
|
||||||
|
|
||||||
(fn buf-name-empty? []
|
(fn buf-name-empty? []
|
||||||
|
@ -39,16 +39,15 @@
|
||||||
|
|
||||||
(fn get-current-file-name []
|
(fn get-current-file-name []
|
||||||
(let [file (nvim.fn.expand "%:t")]
|
(let [file (nvim.fn.expand "%:t")]
|
||||||
(if
|
(if (a.empty? file) ""
|
||||||
(a.empty? file) ""
|
nvim.bo.readonly (.. "RO " file)
|
||||||
nvim.bo.readonly (.. "RO " file)
|
(and nvim.bo.modifiable nvim.bo.modified) (.. file " ")
|
||||||
(and nvim.bo.modifiable nvim.bo.modified) (.. file " ")
|
file)))
|
||||||
file)))
|
|
||||||
|
|
||||||
(fn get-mode-data []
|
(fn get-mode-data []
|
||||||
(or (. modes (nvim.fn.mode))
|
(or (. modes (nvim.fn.mode))
|
||||||
{ :text (nvim.fn.mode)
|
{:text (nvim.fn.mode)
|
||||||
:colors {:bg colors.neutral_orange :fg colors.dark0}}))
|
:colors {:bg colors.neutral_orange :fg colors.dark0}}))
|
||||||
|
|
||||||
(fn vim-mode-provider []
|
(fn vim-mode-provider []
|
||||||
(let [modedata (get-mode-data)]
|
(let [modedata (get-mode-data)]
|
||||||
|
@ -61,11 +60,11 @@
|
||||||
|
|
||||||
|
|
||||||
(set galaxyline.section.left
|
(set galaxyline.section.left
|
||||||
[ { :ViMode { :provider vim-mode-provider}}
|
[{:ViMode {:provider vim-mode-provider}}
|
||||||
{ :FileName { :provider get-current-file-name
|
{:FileName {:provider get-current-file-name
|
||||||
:highlight [colors.light4 colors.dark1]}}
|
:highlight [colors.light4 colors.dark1]}}
|
||||||
{ :Space { :provider (fn [] "")
|
{:Space {:provider (fn [] "")
|
||||||
:highlight [colors.light0 colors.dark1]}}])
|
:highlight [colors.light0 colors.dark1]}}])
|
||||||
|
|
||||||
(fn make-lsp-diagnostic-provider [kind]
|
(fn make-lsp-diagnostic-provider [kind]
|
||||||
(fn []
|
(fn []
|
||||||
|
@ -77,33 +76,34 @@
|
||||||
(if (= "master" branch) "" branch)))
|
(if (= "master" branch) "" branch)))
|
||||||
|
|
||||||
(set galaxyline.section.right
|
(set galaxyline.section.right
|
||||||
[ { :GitBranch { :provider git-branch-provider
|
[{:GitBranch {:provider git-branch-provider
|
||||||
:highlight [colors.light4 colors.dark1]}}
|
:highlight [colors.light4 colors.dark1]}}
|
||||||
{ :FileType { :provider (fn [] nvim.bo.filetype)
|
{:FileType {:provider (fn [] nvim.bo.filetype)
|
||||||
:highlight [colors.neutral_aqua colors.dark1]}}
|
:highlight [colors.neutral_aqua colors.dark1]}}
|
||||||
|
|
||||||
{ :DiagnosticInfo { :provider (make-lsp-diagnostic-provider "Info")
|
{:DiagnosticInfo {:provider (make-lsp-diagnostic-provider "Info")
|
||||||
:highlight [colors.dark1 colors.neutral_blue]}}
|
:highlight [colors.dark1 colors.neutral_blue]}}
|
||||||
{ :DiagnosticWarn { :provider (make-lsp-diagnostic-provider "Warning")
|
{:DiagnosticWarn {:provider (make-lsp-diagnostic-provider "Warning")
|
||||||
:highlight [colors.dark1 colors.neutral_yellow]
|
:highlight [colors.dark1 colors.neutral_yellow]
|
||||||
:separator ""}}
|
:separator ""}}
|
||||||
{ :DiagnosticError { :provider (make-lsp-diagnostic-provider "Error")
|
{:DiagnosticError {:provider (make-lsp-diagnostic-provider "Error")
|
||||||
:highlight [colors.dark1 colors.bright_red]
|
:highlight [colors.dark1 colors.bright_red]
|
||||||
:separator ""}}
|
:separator ""}}
|
||||||
{ :LineInfo { :provider (fn [] (.. " " (gl-fileinfo.line_column) " "))
|
{:LineInfo {:provider (fn [] (.. " " (gl-fileinfo.line_column) " "))
|
||||||
:highlight "GalaxyViMode"
|
:highlight "GalaxyViMode"
|
||||||
:separator ""}}])
|
:separator ""}}])
|
||||||
|
|
||||||
(do
|
(do
|
||||||
(fn add-segment-defaults [data]
|
(fn add-segment-defaults [data]
|
||||||
(a.merge { :highlight [colors.light0 colors.dark1]
|
(a.merge {:highlight [colors.light0 colors.dark1]
|
||||||
:separator " "
|
:separator " "
|
||||||
:separator_highlight "StatusLine"}
|
:separator_highlight "StatusLine"}
|
||||||
data))
|
data))
|
||||||
|
|
||||||
(fn map-gl-section [f section]
|
(fn map-gl-section [f section]
|
||||||
(icollect [_ elem (ipairs section)]
|
(icollect [_ elem (ipairs section)]
|
||||||
(collect [k v (pairs elem)] (values k (f v)))))
|
(collect [k v (pairs elem)]
|
||||||
|
(values k (f v)))))
|
||||||
|
|
||||||
(set galaxyline.section.left (map-gl-section add-segment-defaults galaxyline.section.left))
|
(set galaxyline.section.left (map-gl-section add-segment-defaults galaxyline.section.left))
|
||||||
(set galaxyline.section.right (map-gl-section add-segment-defaults galaxyline.section.right)))
|
(set galaxyline.section.right (map-gl-section add-segment-defaults galaxyline.section.right)))
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(defn colors []
|
(defn colors []
|
||||||
{ :dark0_hard "#1d2021"
|
{ :dark0_hard "#1d2021"
|
||||||
:dark0 "#282828"
|
:dark0 "#282828"
|
||||||
|
|
Loading…
Reference in a new issue