aboutsummaryrefslogtreecommitdiff
path: root/fnl/plugins
diff options
context:
space:
mode:
authoramelia squires <[email protected]>2024-10-22 23:40:30 -0500
committeramelia squires <[email protected]>2024-10-22 23:40:30 -0500
commit0b7b1684d87b7d0b01b5645713b413e317699fd0 (patch)
tree70d54faa4536e97894754e63061f0d2fad99079c /fnl/plugins
readme
Diffstat (limited to 'fnl/plugins')
-rw-r--r--fnl/plugins/cmp.fnl23
-rw-r--r--fnl/plugins/lsp_signature.fnl1
-rw-r--r--fnl/plugins/lspconfig.fnl10
-rw-r--r--fnl/plugins/neo_tree.fnl20
-rw-r--r--fnl/plugins/notify.fnl1
-rw-r--r--fnl/plugins/toggleterm.fnl1
-rw-r--r--fnl/plugins/treesitter.fnl3
-rw-r--r--fnl/plugins/which_key.fnl14
-rw-r--r--fnl/plugins/wilder.fnl21
-rw-r--r--fnl/plugins/winshift.fnl1
10 files changed, 95 insertions, 0 deletions
diff --git a/fnl/plugins/cmp.fnl b/fnl/plugins/cmp.fnl
new file mode 100644
index 0000000..8d13986
--- /dev/null
+++ b/fnl/plugins/cmp.fnl
@@ -0,0 +1,23 @@
+(local cmp (require :cmp))
+
+((. cmp :setup) {
+ :snippet {
+ :expand (fn [args]
+ (vim.snippet.expand args.body)
+ ;((. vim.fn "vsnip#anonymous") args.body) ;for older neovim version (< 0.10)
+ )}
+ :mapping (cmp.mapping.preset.insert {
+ :<C-b> (cmp.mapping.scroll_docs -4)
+ :<C-f> (cmp.mapping.scroll_docs 4)
+ :<C-Space> (cmp.mapping.complete)
+ :<C-e> (cmp.mapping.abort)
+ :<CR> (cmp.mapping.confirm {select true})
+ :<Tab> (cmp.mapping (cmp.mapping.select_next_item) [:i :s])
+ })
+ :sources (cmp.config.sources [
+ {:name :nvim_lsp}
+ ;{:name :vsnip}
+ ] [{:name :buffer}])
+ })
+
+
diff --git a/fnl/plugins/lsp_signature.fnl b/fnl/plugins/lsp_signature.fnl
new file mode 100644
index 0000000..9b5509d
--- /dev/null
+++ b/fnl/plugins/lsp_signature.fnl
@@ -0,0 +1 @@
+((. (require :lsp_signature) :setup))
diff --git a/fnl/plugins/lspconfig.fnl b/fnl/plugins/lspconfig.fnl
new file mode 100644
index 0000000..7034e33
--- /dev/null
+++ b/fnl/plugins/lspconfig.fnl
@@ -0,0 +1,10 @@
+(var capabilities (require :cmp_nvim_lsp))
+(set capabilities (capabilities.default_capabilities))
+(local lsp _G.settings.lsp)
+(local config_table {})
+(local lspconfig (require :lspconfig))
+
+(each [language (lsp:gmatch "([^,]+)")]
+ (when (= (. config_table language) nil) (tset config_table language {}))
+ (tset (. config_table language) :capabilities capabilities)
+ ((. (. lspconfig language) :setup) (. config_table language)))
diff --git a/fnl/plugins/neo_tree.fnl b/fnl/plugins/neo_tree.fnl
new file mode 100644
index 0000000..76bf708
--- /dev/null
+++ b/fnl/plugins/neo_tree.fnl
@@ -0,0 +1,20 @@
+((. (require :neo-tree) :setup) {
+ :close_if_last_window true
+ :default_component_configs {
+ :git_status {
+ :symbols {
+ :added :+
+ :modified :m
+ :deleted :x
+ :renamed :->
+
+ :untracked " "
+ :ignored " "
+ :unstaged :*
+ :staged " "
+ :conflict ":("}}}
+ :window {
+ :position :left
+ :width 30}
+ :filesystem {
+ :use_libuv_file_watcher true}})
diff --git a/fnl/plugins/notify.fnl b/fnl/plugins/notify.fnl
new file mode 100644
index 0000000..4084871
--- /dev/null
+++ b/fnl/plugins/notify.fnl
@@ -0,0 +1 @@
+(tset vim :notify (require :notify))
diff --git a/fnl/plugins/toggleterm.fnl b/fnl/plugins/toggleterm.fnl
new file mode 100644
index 0000000..aed1edc
--- /dev/null
+++ b/fnl/plugins/toggleterm.fnl
@@ -0,0 +1 @@
+((. (require :toggleterm) :setup) {:persist_mode true :persistant_size true})
diff --git a/fnl/plugins/treesitter.fnl b/fnl/plugins/treesitter.fnl
new file mode 100644
index 0000000..4b2a687
--- /dev/null
+++ b/fnl/plugins/treesitter.fnl
@@ -0,0 +1,3 @@
+((. (require :nvim-treesitter.configs) :setup)
+ {:highlight {
+ :enable true}})
diff --git a/fnl/plugins/which_key.fnl b/fnl/plugins/which_key.fnl
new file mode 100644
index 0000000..959e0a6
--- /dev/null
+++ b/fnl/plugins/which_key.fnl
@@ -0,0 +1,14 @@
+(local whichkey (require :which-key))
+(whichkey.setup)
+
+(local mappings {
+ 1 {1 " f" 2 "<cmd>Neotree toggle<CR>" :desc "fs"}
+ 2 {1 " w" 2 "<cmd>WinShift<CR>" :desc "win shift"}
+ 3 {1 " t" 2 "<cmd>ToggleTerm direction=horizontal<CR>" :desc "hterm"}
+
+ :mode [:n :v]
+ :silent true
+ :noremap true
+ :nowait true})
+
+(whichkey.add mappings)
diff --git a/fnl/plugins/wilder.fnl b/fnl/plugins/wilder.fnl
new file mode 100644
index 0000000..56b4155
--- /dev/null
+++ b/fnl/plugins/wilder.fnl
@@ -0,0 +1,21 @@
+(local gradient [:#74d7ec :#96cde2 :#b9c3d9 :#dcb9d0 :#ffafc7 :#ffafc7 :#fec1d2 :#fdd4de
+ :#fce6e9 :#fbf9f5 :#fbf9f5 :#fce8ea :#fdd7e0 :#fec6d5 :#ffb5cb :#ffb5cb :#dcbdd2 :#b9c5da
+ :#96cde2 :#73d5ea])
+
+(local wilder (require :wilder))
+(wilder.setup {:modes [:: :/ :?]})
+
+;this like 'builds' the gradient? idk
+(each [i fg (ipairs gradient)]
+ (tset gradient i
+ (wilder.make_hl (.. :WilderGradient i) :Pmenu [{:a 1} {:a 1} {:foreground fg}])))
+
+(wilder.set_option :renderer (wilder.wildmenu_renderer {
+ :separator " . "
+ :left [" "]
+ :right [" "]
+
+ :highlights {:gradient gradient}
+
+ :highlighter (wilder.highlighter_with_gradient [
+ (wilder.basic_highlighter)])}))
diff --git a/fnl/plugins/winshift.fnl b/fnl/plugins/winshift.fnl
new file mode 100644
index 0000000..542f15c
--- /dev/null
+++ b/fnl/plugins/winshift.fnl
@@ -0,0 +1 @@
+((. (require :winshift) :setup))