aboutsummaryrefslogtreecommitdiff
path: root/fnl/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'fnl/plugins')
-rw-r--r--fnl/plugins/edgy.fnl3
-rw-r--r--fnl/plugins/jabs.fnl14
-rw-r--r--fnl/plugins/lualine.fnl92
-rw-r--r--fnl/plugins/notify.fnl1
-rw-r--r--fnl/plugins/which_key.fnl18
5 files changed, 125 insertions, 3 deletions
diff --git a/fnl/plugins/edgy.fnl b/fnl/plugins/edgy.fnl
index 4868367..ec4c77c 100644
--- a/fnl/plugins/edgy.fnl
+++ b/fnl/plugins/edgy.fnl
@@ -1,4 +1,7 @@
(_G.util.setup! :edgy {
+ :options {
+ :bottom {:size 9}
+ }
:bottom [:toggleterm]
:left [:neo-tree {:ft :Outline :title (fn []
(local buf_name (vim.api.nvim_buf_get_name 0)); or "[No Name]"
diff --git a/fnl/plugins/jabs.fnl b/fnl/plugins/jabs.fnl
new file mode 100644
index 0000000..1690121
--- /dev/null
+++ b/fnl/plugins/jabs.fnl
@@ -0,0 +1,14 @@
+(print "hi")
+(_G.util.setup! :jabs {:use_devicons false
+ :keymap {:close :x}
+ :symbols {
+ :current "C"
+ :split "S"
+ :alternate "A"
+ :hidden "H"
+ :locked "L"
+ :ro "R"
+ :edited "E"
+ :terminal "T"
+ :default_file "D"
+ :terminal_symbol ">_"}})
diff --git a/fnl/plugins/lualine.fnl b/fnl/plugins/lualine.fnl
new file mode 100644
index 0000000..9cda2ef
--- /dev/null
+++ b/fnl/plugins/lualine.fnl
@@ -0,0 +1,92 @@
+(local colors {
+ :bg :#252629
+ :fade-bg :#121314
+ :yellow :#ECBE7B
+ :cyan :#008080
+ :darkblue :#081633
+ :green :#98be65
+ :orange :#FF8800
+ :violet :#a9a1e1
+ :magenta :#c678dd
+ :blue :#51afef
+ :red :#ec5f67
+ :grey :#6a6a6a
+})
+
+(macro color [code]
+ {:fg code})
+
+(lambda table-to-pair [table]
+ (var idx 1)
+ (var out {})
+ (while (not= (. table (+ idx 1)) nil)
+ (tset out (. table idx) (. table (+ idx 1)))
+ (set idx (+ idx 2)))
+ out)
+
+
+(fn add [section mod col ...]
+ (var opt (table-to-pair [...]))
+ (when (= opt nil) (set opt {}))
+ (tset opt 1 mod)
+ (tset opt :color col)
+ (table.insert section opt))
+
+(local a [])
+(local b [])
+(local c [])
+(local x [])
+(local y [])
+(local z [])
+
+(local inactive-a [])
+(local inactive-b [])
+(local inactive-c [])
+(local inactive-x [])
+(local inactive-y [])
+(local inactive-z [])
+
+(add c :filesize (color colors.red))
+(add c :filename (color colors.magenta))
+(add c :diagnostics)
+
+(add c :branch (color colors.cyan) :icon "" :fmt (fn [s] (.. "(" s ")")))
+(add c :diff)
+
+(add x :searchcount (color colors.cyan))
+(add x :location (color colors.grey))
+(add x :progress (color colors.grey))
+
+(add inactive-c :filesize (color colors.grey))
+(add inactive-c :filename (color colors.grey))
+(add inactive-c :diagnostics (color colors.grey))
+
+(add inactive-x :progress (color colors.grey))
+
+
+(_G.util.setup! :lualine {
+ :options {
+ :theme {
+ :normal { :c {:bg colors.bg}}
+ :inactive { :c {:bg colors.fade-bg}}
+ }
+ :component_separators { :left "" :right "" }
+ :section_separators { :left "" :right "" }
+ }
+ :sections {
+ :lualine_a a
+ :lualine_b b
+ :lualine_c c
+ :lualine_x x
+ :lualine_y y
+ :lualine_z z
+ }
+ :inactive_sections {
+ :lualine_a inactive-a
+ :lualine_b inactive-b
+ :lualine_c inactive-c
+ :lualine_x inactive-x
+ :lualine_y inactive-y
+ :lualine_z inactive-z
+ }
+})
diff --git a/fnl/plugins/notify.fnl b/fnl/plugins/notify.fnl
deleted file mode 100644
index 46e3cd0..0000000
--- a/fnl/plugins/notify.fnl
+++ /dev/null
@@ -1 +0,0 @@
-(tset vim :notify (_G.util.require! :notify))
diff --git a/fnl/plugins/which_key.fnl b/fnl/plugins/which_key.fnl
index 16b10a1..643dfa3 100644
--- a/fnl/plugins/which_key.fnl
+++ b/fnl/plugins/which_key.fnl
@@ -6,6 +6,12 @@
(macro gmap [k group]
{1 (.. " " k) :group group})
+(fn swap-layout [new]
+ (_G.loaded.edgy.goto_main)
+ (when (not= _G.current_layout "") ((. (require (.. :layouts. _G.current_layout)) :disable)))
+ (when (not= new "") ((. (require (.. :layouts. new)) :enable)))
+ (tset _G :current_layout new))
+
(local mappings [
;;common
(wmap :f "<cmd>Neotree toggle<CR>" "fs")
@@ -28,8 +34,11 @@
;;layouts
(gmap :l "layout")
- (wmap :li (require :layouts.ide) "ide")
- (wmap :lq (require :layouts.quiet) "quiet")
+ (wmap :li (fn [] (swap-layout :ide)) "ide")
+ (wmap :lq (fn [] (swap-layout :quiet)) "quiet")
+ (wmap :lw (fn [] (swap-layout :writing)) "writing")
+ (wmap :lx (fn [] (swap-layout "")) "none")
+
;;visual
(gmap :v "visual")
@@ -40,9 +49,14 @@
(gmap :q "quick")
(wmap :qs "\"+y" "system grab")
(wmap :ql "0v$" "line")
+ (wmap :qw "^v$" "line w/out whitespace")
+ (wmap :qa "0ggvG$" "select all")
(wmap :qr "<cmd>SnipRun<CR>" "run highlighted")
(wmap :qf "<cmd>RunFile<CR>" "run file")
(wmap :qe "<cmd>RunCode<CR>" "run code")
+ (wmap :qt (fn []
+ (if _G._trans_ (_G.opt.trans-disable)
+ (_G.opt.trans-enable)) ) "toggle trans")
])
(tset mappings :mode [:n :v])