consistent formatting

This commit is contained in:
elkowar 2021-05-02 17:15:33 +02:00
parent c188b55475
commit 66573e88ea
6 changed files with 189 additions and 189 deletions

View file

@ -25,6 +25,7 @@
"
asd FUCK FUKC FCUK CUFLKJASDFLKJASDLKJASDLKj
<label text="&lt; &gt; bruh &quot;"/>
@ -173,10 +174,11 @@
<pxbar/>
</widget>
</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">-->
<!--<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>
<test ree="test" />
</widget>

View file

@ -14,17 +14,18 @@
(require "plugins.galaxyline")
(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.")
; Colors ------------------------------------------------------- foldstart
(utils.highlight-add
[ "GruvboxBlueSign" "GruvboxAquaSign" "GruvboxRedSign" "GruvboxYellowSign" "GruvboxGreenSign" "GruvboxOrangeSign" "GruvboxPurpleSign"]
["GruvboxBlueSign" "GruvboxAquaSign" "GruvboxRedSign" "GruvboxYellowSign" "GruvboxGreenSign" "GruvboxOrangeSign" "GruvboxPurpleSign"]
{:bg "NONE"})
@ -41,8 +42,8 @@
:disable ["lua"]}
:incremental_selection
{ :enable true
:keymaps { :init_selection "gss"
{:enable true
:keymaps {:init_selection "gss"
:node_incremental "gsl"
:node_decremental "gsh"
:scope_incremental "gsj"
@ -52,7 +53,7 @@
;:rainbow { :enable true
;:extended_mode true}
:context_commentstring { :enable true}})
:context_commentstring {:enable true}})
;(nvim-biscuits.setup {}
;{ :on_events ["InsertLeave" "CursorHoldI"]})
@ -100,14 +101,11 @@
(utils.keymap :i :<Space> newKey {:buffer true}))
(fn _G.UnbindSpaceStuff []
(if (and remapped-space (~= remapped-space {}))
(do
(when (and remapped-space (~= remapped-space {}))
(utils.del-keymap :i :<Space> true)
(if (~= remapped-space.old "")
(when (~= remapped-space.old "")
(utils.keymap :i :<Space> remapped-space.old {:buffer true}))
(set remapped-space nil))))
(set remapped-space nil)))
@ -121,5 +119,4 @@
; foldend
; vim:foldmarker=foldstart,foldend

View file

@ -13,15 +13,15 @@
(wk.setup {})
(fn cmd [s desc] [(.. "<cmd>" s "<cr>") desc])
(fn le [s desc] (cmd (.. "call luaeval(\"" s "\")") desc))
(fn rebind [s desc] [s desc])
(wk.setup {})
(wk.register
{ "c" { :name "+comment out"}
"e" { :name "+emmet"}
{"c" {:name "+comment out"}
"e" {:name "+emmet"}
"h" (cmd "bprevious" "previous buffer")
"l" (cmd "bnext" "next buffer")
@ -29,7 +29,7 @@
"p" (cmd "Telescope file_browser" "Open file-browser")
":" (cmd "Telescope commands" "Search command with fzf")
"m" { :name "+Code actions"
"m" {:name "+Code actions"
"d" (cmd "Lspsaga hover_doc" "Show documentation")
"b" (cmd "Lspsaga lsp_finder" "Find stuff")
"x" (cmd "Lspsaga preview_definition" "Preview definition")
@ -49,43 +49,43 @@
"f" [vim.lsp.buf.formatting "format file"]
"h" (cmd "RustToggleInlayHints" "Toggle inlay hints")}
"f" { :name "+folds"
"f" {:name "+folds"
"o" (cmd "foldopen" "open fold")
"n" (cmd "foldclose" "close fold")
"j" (rebind "zj" "jump to next 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")
"m" (cmd "set nonumber! norelativenumber" "toggle numbers")
"g" (cmd "Goyo | set linebreak" "toggle focus mode")
"i" (cmd "IndentGuidesToggle" "toggle indent guides")}
"b" { :name "+buffers"
"b" {:name "+buffers"
"b" (cmd "Buffers" "select open buffer")
"c" (cmd "bdelete!" "close open buffer")
"w" (cmd "bwipeout!" "wipeout open buffer")}}
{ :prefix "<leader>"})
{:prefix "<leader>"})
(wk.register
{ "<tab>" "which_key_ignore"
{"<tab>" "which_key_ignore"
"gss" "init selection"
"z" { :name "+folds"
"z" {:name "+folds"
"c" (cmd "foldclose" "close fold")
"o" (cmd "foldopen" "open fold")}})
(wk.register
{ "<tab>" "which_key_ignore"}
{ :mode "i"})
{"<tab>" "which_key_ignore"}
{:mode "i"})
(wk.register
{ :name "+Selection"
{:name "+Selection"
"j" "increment selection"
"k" "decrement selection"
"l" "increment node"
"h" "decrement node"}
{ :prefix "gs"
{:prefix "gs"
:mode "v"})

View file

@ -8,11 +8,11 @@
(local colors (utils.colors))
; :h bufferline-lua-highlights
(let [selected { :guibg colors.neutral_aqua :guifg colors.dark0 :gui ""}
visible { :guibg colors.dark1 :guifg colors.neutral_aqua :gui ""}]
(let [selected {:guibg colors.neutral_aqua :guifg colors.dark0 :gui ""}
visible {:guibg colors.dark1 :guifg colors.neutral_aqua :gui ""}]
(bufferline.setup
{ :options
{ :diagnostics "nvim_lsp"
{:options
{:diagnostics "nvim_lsp"
:diagnostics_indicator (fn [cnt lvl diagnostics-dict] (.. " (" cnt ")"))
:show_buffer_close_icons false
:show_close_icon false
@ -22,7 +22,7 @@
; https://github.com/akinsho/nvim-bufferline.lua/blob/4ebab39af2376b850724dd29c29579c8e024abe6/lua/bufferline/config.lua#L74
:highlights
{ :fill { :guibg colors.dark0 :guifg colors.light0}
{:fill {:guibg colors.dark0 :guifg colors.light0}
:background visible
:buffer_visible visible
:buffer_selected selected
@ -40,17 +40,17 @@
:duplicate_visible visible
:duplicate_selected selected
:diagnostic { :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 {: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}
:info_diagnostic { :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 {: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}
:warning_diagnostic { :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 {: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}
:separator visible
:indicator_selected {:guibg colors.neutral_aqua :guifg colors.neutral_aqua}
@ -61,5 +61,5 @@
: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"})

View file

@ -15,23 +15,23 @@
(local colors (utils.colors))
(local modes
{ :n { :text "NORMAL" :colors { :bg colors.neutral_aqua :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}}
:ce { :text "NORMEX" :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}}
: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 "CONFIRM" :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}}
: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}}
:v { :text "VISUAL" :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}}})
{:n {:text "NORMAL" :colors {:bg colors.neutral_aqua :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}}
:ce {:text "NORMEX" :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}}
: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 "CONFIRM" :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}}
: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}}
:v {:text "VISUAL" :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}}})
(fn buf-name-empty? []
@ -39,15 +39,14 @@
(fn get-current-file-name []
(let [file (nvim.fn.expand "%:t")]
(if
(a.empty? file) ""
(if (a.empty? file) ""
nvim.bo.readonly (.. "RO " file)
(and nvim.bo.modifiable nvim.bo.modified) (.. file " ")
file)))
(fn get-mode-data []
(or (. modes (nvim.fn.mode))
{ :text (nvim.fn.mode)
{:text (nvim.fn.mode)
:colors {:bg colors.neutral_orange :fg colors.dark0}}))
(fn vim-mode-provider []
@ -61,10 +60,10 @@
(set galaxyline.section.left
[ { :ViMode { :provider vim-mode-provider}}
{ :FileName { :provider get-current-file-name
[{:ViMode {:provider vim-mode-provider}}
{:FileName {:provider get-current-file-name
:highlight [colors.light4 colors.dark1]}}
{ :Space { :provider (fn [] "")
{:Space {:provider (fn [] "")
:highlight [colors.light0 colors.dark1]}}])
(fn make-lsp-diagnostic-provider [kind]
@ -77,33 +76,34 @@
(if (= "master" branch) "" branch)))
(set galaxyline.section.right
[ { :GitBranch { :provider git-branch-provider
[{:GitBranch {:provider git-branch-provider
:highlight [colors.light4 colors.dark1]}}
{ :FileType { :provider (fn [] nvim.bo.filetype)
{:FileType {:provider (fn [] nvim.bo.filetype)
: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]}}
{ :DiagnosticWarn { :provider (make-lsp-diagnostic-provider "Warning")
{:DiagnosticWarn {:provider (make-lsp-diagnostic-provider "Warning")
:highlight [colors.dark1 colors.neutral_yellow]
:separator ""}}
{ :DiagnosticError { :provider (make-lsp-diagnostic-provider "Error")
{:DiagnosticError {:provider (make-lsp-diagnostic-provider "Error")
:highlight [colors.dark1 colors.bright_red]
:separator ""}}
{ :LineInfo { :provider (fn [] (.. " " (gl-fileinfo.line_column) " "))
{:LineInfo {:provider (fn [] (.. " " (gl-fileinfo.line_column) " "))
:highlight "GalaxyViMode"
:separator ""}}])
(do
(fn add-segment-defaults [data]
(a.merge { :highlight [colors.light0 colors.dark1]
(a.merge {:highlight [colors.light0 colors.dark1]
:separator " "
:separator_highlight "StatusLine"}
data))
(fn map-gl-section [f 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.right (map-gl-section add-segment-defaults galaxyline.section.right)))

View file

@ -40,6 +40,7 @@
(defn colors []
{ :dark0_hard "#1d2021"
:dark0 "#282828"