summaryrefslogtreecommitdiff
path: root/fnl
diff options
context:
space:
mode:
authorMike Vink <>2023-04-12 15:32:50 +0200
committerMike Vink <>2023-04-12 15:32:50 +0200
commitc03ef6f5efd3fe96a12dbc7d7af57d2cfda2fb1b (patch)
tree793c5ef656f9c70149a8b49711b94da877deecdd /fnl
parented09c3ecc940138fda9a63288ec1df18ea9d8f38 (diff)
try out noice
Diffstat (limited to 'fnl')
-rw-r--r--fnl/conf/newtab/init.fnl7
-rw-r--r--fnl/conf/pkgs.fnl2
-rw-r--r--fnl/conf/pkgs/cmp.fnl39
-rw-r--r--fnl/conf/pkgs/noice.fnl31
-rw-r--r--fnl/conf/settings.fnl2
-rw-r--r--fnl/conf/wictl-nvim/init.fnl1
-rw-r--r--fnl/conf/wictl-nvim/term.lua1
7 files changed, 74 insertions, 9 deletions
diff --git a/fnl/conf/newtab/init.fnl b/fnl/conf/newtab/init.fnl
index 560e0e2..04096b2 100644
--- a/fnl/conf/newtab/init.fnl
+++ b/fnl/conf/newtab/init.fnl
@@ -29,9 +29,10 @@
(vim.cmd (.. :tc
(. selection
1)))
- (vim.cmd (.. :Telescope
- " "
- :find_files)))))
+ (vim.schedule (fn []
+ (vim.cmd (.. :Telescope
+ " "
+ :find_files)))))))
:sorter (conf.generic_sorter opts)}))
(finder:find))
diff --git a/fnl/conf/pkgs.fnl b/fnl/conf/pkgs.fnl
index af5ee71..df7c974 100644
--- a/fnl/conf/pkgs.fnl
+++ b/fnl/conf/pkgs.fnl
@@ -8,7 +8,7 @@
(require :conf.pkgs.test)
(require :conf.pkgs.trouble)
(require :conf.pkgs.lsp_lines)
-(require :conf.pkgs.lsp_signature)
+(require :conf.pkgs.noice)
(require :conf.pkgs.dap)
(require :conf.pkgs.heirline)
(require :conf.pkgs.gitsigns)
diff --git a/fnl/conf/pkgs/cmp.fnl b/fnl/conf/pkgs/cmp.fnl
index e772966..987c7b7 100644
--- a/fnl/conf/pkgs/cmp.fnl
+++ b/fnl/conf/pkgs/cmp.fnl
@@ -1,4 +1,5 @@
(local cmp (require :cmp))
+(local compare (require :cmp.config.compare))
(fn has-words-before []
(local [line col] (vim.api.nvim_win_get_cursor 0))
@@ -15,7 +16,8 @@
snip (fn [args]
(luasnip.lsp_expand (. args :body)))]
(local cfg
- {:snippet {:expand snip}
+ {:experimental {:ghost_text true}
+ :snippet {:expand snip}
:preselect cmp.PreselectMode.None
:mapping {:<Tab> (cmp.mapping (fn [fallback]
(if (cmp.visible)
@@ -39,11 +41,38 @@
:<CR> (cmp.mapping.confirm {:behavior (enum :ConfirmBehavior
:Replace)
:select true})}
- :sources (cmp.config.sources [{:name :nvim_lsp}
- {:name :path}
- {:name :luasnip}])})
+ :sources (cmp.config.sources [{:name :nvim_lsp
+ {:name :path} {:name :luasnip}}])})
(if (not autocomplete) (tset cfg :completion {:autocomplete false}))
;; (print (vim.inspect cfg))
- (cmp.setup cfg)))
+ (cmp.setup cfg)
+ (cmp.setup.cmdline ["/" "?"]
+ {:sources (cmp.config.sources [{:name :buffer}])
+ :experimental {:ghost_text true}
+ :mapping (cmp.mapping.preset.cmdline)})
+ (cmp.setup.cmdline ":"
+ {:sources (cmp.config.sources [{:name :path}]
+ [{:name :cmdline_history
+ :max_item_count 5}
+ {:name :cmdline}])
+ :experimental {:ghost_text true}
+ :preselect cmp.PreselectMode.Item
+ :sorting {:priority_weight 2
+ :comparators [compare.offset
+ ; compare.scopes
+ ; compare.length
+ ; compare.recently_used
+ compare.order
+ compare.exact]}
+ ;compare.score]}
+ ; compare.locality]}
+ ; compare.kind]}
+ ; compare.sort_text
+ :mapping (cmp.mapping.preset.cmdline {:<CR> {:c (fn [fallback]
+ (if (not (cmp.confirm {:behavior (enum :ConfirmBehavior
+ :Replace)
+ :select true}))
+ (fallback)
+ (vim.schedule fallback)))}})})))
(cmp-setup cmp true)
diff --git a/fnl/conf/pkgs/noice.fnl b/fnl/conf/pkgs/noice.fnl
new file mode 100644
index 0000000..578b8fa
--- /dev/null
+++ b/fnl/conf/pkgs/noice.fnl
@@ -0,0 +1,31 @@
+(local noice (require :noice))
+(noice.setup {:lsp {;; override markdown rendering so that **cmp** and other plugins use **Treesitter**
+ :override {[:vim.lsp.util.convert_input_to_markdown_lines] true
+ [:vim.lsp.util.stylize_markdown] true
+ [:cmp.entry.get_documentation] true}}
+ :messages {; NOTE: If you enable messages then the cmdline is enabled automatically.
+ ; This is a current Neovim limitation.
+ :enabled true
+ ; enables the Noice messages UI
+ :view :mini
+ ; default view for messages
+ :view_error :mini
+ ; view for errors
+ :view_warn :mini
+ ; view for warnings
+ :view_history :mini
+ ; view for :messages
+ :view_search :virtualtext}
+ ; view for search count messages. Set to `false` to disable}
+ ;; you can enable a preset for easier configuration
+ :presets {:bottom_search true
+ ; use a classic bottom cmdline for search
+ :command_palette true
+ ; position the cmdline and popupmenu together
+ :long_message_to_split true
+ ; long messages will be sent to a split
+ :inc_rename false
+ ; enables an input dialog for inc-rename.nvim
+ :lsp_doc_border false}})
+
+; add a border to hover docs and signature help}})
diff --git a/fnl/conf/settings.fnl b/fnl/conf/settings.fnl
index d9ada32..8eb0c19 100644
--- a/fnl/conf/settings.fnl
+++ b/fnl/conf/settings.fnl
@@ -1,6 +1,7 @@
(import-macros {: settings : globals} :conf.macros)
(globals
+ codeium_enabled false
loaded_2html_plugin true
loaded_fzf false
loaded_man false
@@ -55,6 +56,7 @@
exrc on
secure on
completeopt "menuone,noselect"
+ wildmode "lastused"
complete ".,w,k,kspell,b"
foldopen "block,hor,jump,mark,percent,quickfix,search,tag"
laststatus 3
diff --git a/fnl/conf/wictl-nvim/init.fnl b/fnl/conf/wictl-nvim/init.fnl
index a6aca91..935f1f8 100644
--- a/fnl/conf/wictl-nvim/init.fnl
+++ b/fnl/conf/wictl-nvim/init.fnl
@@ -28,3 +28,4 @@
(bld.Build (eff:new))))
(ui wict.root-frame)
+(table.tostring {:hi :there})
diff --git a/fnl/conf/wictl-nvim/term.lua b/fnl/conf/wictl-nvim/term.lua
new file mode 100644
index 0000000..68faa1f
--- /dev/null
+++ b/fnl/conf/wictl-nvim/term.lua
@@ -0,0 +1 @@
+(local m {})