aboutsummaryrefslogtreecommitdiff
path: root/fnl/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'fnl/plugins')
-rw-r--r--fnl/plugins/blink.fnl39
-rw-r--r--fnl/plugins/cmp.fnl23
-rw-r--r--fnl/plugins/lspconfig.fnl7
-rw-r--r--fnl/plugins/lualine.fnl5
-rw-r--r--fnl/plugins/neo_tree.fnl1
-rw-r--r--fnl/plugins/oil.fnl19
-rw-r--r--fnl/plugins/which_key.fnl4
7 files changed, 65 insertions, 33 deletions
diff --git a/fnl/plugins/blink.fnl b/fnl/plugins/blink.fnl
new file mode 100644
index 0000000..a7fe877
--- /dev/null
+++ b/fnl/plugins/blink.fnl
@@ -0,0 +1,39 @@
+(local blink (_G.util.require! :blink.cmp))
+(blink.setup {
+ :keymap {
+ :<Tab> [ :select_next :fallback ]
+ }
+
+ :cmdline {
+ :enabled false
+ }
+
+ :completion {
+ :documentation {
+ :auto_show true
+ :auto_show_delay_ms 350
+ }
+ :menu {
+ :draw {
+ :components {
+ :label {
+ :text (fn [ctx]
+ ((. (require "colorful-menu") :blink_components_text) ctx))
+ :highlight (fn [ctx]
+ ((. (require "colorful-menu") :blink_components_highlight) ctx))
+ }
+ }
+ :treesitter [ :lsp ]
+ }
+ }
+ :list {
+ :selection {
+ :preselect false
+ }
+ }
+ }
+
+ :fuzzy {
+ :implementation :lua
+ }
+})
diff --git a/fnl/plugins/cmp.fnl b/fnl/plugins/cmp.fnl
deleted file mode 100644
index 09067eb..0000000
--- a/fnl/plugins/cmp.fnl
+++ /dev/null
@@ -1,23 +0,0 @@
-(local cmp (_G.util.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 :calc} ;to anyone new to this codebase, calc is short for calculator (no clue what this adds, but its funny)
- ] [{:name :buffer}])
- })
-
-
diff --git a/fnl/plugins/lspconfig.fnl b/fnl/plugins/lspconfig.fnl
index 5a257ad..fc39846 100644
--- a/fnl/plugins/lspconfig.fnl
+++ b/fnl/plugins/lspconfig.fnl
@@ -1,9 +1,10 @@
-(var capabilities (require :cmp_nvim_lsp))
-(set capabilities (capabilities.default_capabilities))
+(var capabilities (require :blink.cmp))
+(set capabilities (capabilities.get_lsp_capabilities))
+
(local lsp _G.settings.lsp)
(local config_table {
:lua_ls {:settings {:Lua {:diagnostics {:disable
- ["lowercase-global" "trailing-space" "unused-local"]}}}}
+ ["lowercase-global" "trailing-space"]}}}}
})
(local lspconfig (_G.util.require! :lspconfig))
diff --git a/fnl/plugins/lualine.fnl b/fnl/plugins/lualine.fnl
index 9cda2ef..ef79a5a 100644
--- a/fnl/plugins/lualine.fnl
+++ b/fnl/plugins/lualine.fnl
@@ -66,10 +66,7 @@
(_G.util.setup! :lualine {
:options {
- :theme {
- :normal { :c {:bg colors.bg}}
- :inactive { :c {:bg colors.fade-bg}}
- }
+ :theme :auto
:component_separators { :left "" :right "" }
:section_separators { :left "" :right "" }
}
diff --git a/fnl/plugins/neo_tree.fnl b/fnl/plugins/neo_tree.fnl
index 9925d60..758614b 100644
--- a/fnl/plugins/neo_tree.fnl
+++ b/fnl/plugins/neo_tree.fnl
@@ -15,7 +15,6 @@
:staged " "
:conflict ":("}}}
:window {
- :position :left
:width 30}
:filesystem {
:use_libuv_file_watcher true}})
diff --git a/fnl/plugins/oil.fnl b/fnl/plugins/oil.fnl
new file mode 100644
index 0000000..fa1e69d
--- /dev/null
+++ b/fnl/plugins/oil.fnl
@@ -0,0 +1,19 @@
+(local oil (_G.util.require! :oil))
+;maybe use other one so dirs can show status
+(local oil-git (_G.util.require! :oil-git))
+(local oil-gitignore (require "lua.oil-gitignore"))
+
+(oil.setup {
+ :view_options {
+ ;heh, get it?
+ :is_hidden_file (fn [en by]
+ (local dir (oil.get_current_dir by))
+ (. oil-gitignore.git_status dir :ignored en)
+ )
+ }
+
+ :float {
+ :padding 7
+ }
+})
+(oil-git.setup)
diff --git a/fnl/plugins/which_key.fnl b/fnl/plugins/which_key.fnl
index 643dfa3..3697f7d 100644
--- a/fnl/plugins/which_key.fnl
+++ b/fnl/plugins/which_key.fnl
@@ -14,12 +14,12 @@
(local mappings [
;;common
- (wmap :f "<cmd>Neotree toggle<CR>" "fs")
+ (wmap :f "<cmd>Neotree position=left toggle<CR>" "fs")
(wmap :w "<cmd>WinShift<CR>" "win shift")
(wmap :t "<cmd>ToggleTerm direction=horizontal<CR>" "hterm")
(wmap :d "<cmd>Glance references<CR>" "references")
(wmap :s "<cmd>Telescope live_grep<CR>" "search")
- (wmap :z "<cmd>Telescope find_files<CR>" "open file")
+ (wmap :z "<cmd>lua require('oil').toggle_float()<CR>" "open file")
(wmap :b "<cmd>JABSOpen<CR>" "buffers")
(wmap :g (fn []
(local buffer (vim.fn.expand :%))