From 63d6a211bbcfca462403fd12f6d7090434026f2d Mon Sep 17 00:00:00 2001 From: elkowar <5300871+elkowar@users.noreply.github.com> Date: Sat, 15 May 2021 22:06:45 +0200 Subject: [PATCH] more stuff --- nvim/.config/nvim/fnl/help-thingy.fnl | 1 - nvim/.config/nvim/fnl/keybinds.fnl | 1 - nvim/.config/nvim/fnl/macros.fnl | 1 - nvim/.config/nvim/fnl/plugins.fnl | 2 -- nvim/.config/nvim/fnl/plugins/bufferline.fnl | 11 +++++----- nvim/.config/nvim/fnl/plugins/feline.fnl | 22 ++++++++++--------- nvim/.config/nvim/fnl/plugins/galaxyline.fnl | 1 - nvim/.config/nvim/fnl/smart-compe-conjure.fnl | 6 ++--- nvim/.config/nvim/fnl/utils.fnl | 6 ++++- 9 files changed, 24 insertions(+), 27 deletions(-) diff --git a/nvim/.config/nvim/fnl/help-thingy.fnl b/nvim/.config/nvim/fnl/help-thingy.fnl index cf759ee..479578f 100644 --- a/nvim/.config/nvim/fnl/help-thingy.fnl +++ b/nvim/.config/nvim/fnl/help-thingy.fnl @@ -2,7 +2,6 @@ {require {utils utils a aniseed.core str aniseed.string - fennel aniseed.fennel popup popup ts nvim-treesitter} require-macros [macros]}) diff --git a/nvim/.config/nvim/fnl/keybinds.fnl b/nvim/.config/nvim/fnl/keybinds.fnl index b22716b..024f55b 100644 --- a/nvim/.config/nvim/fnl/keybinds.fnl +++ b/nvim/.config/nvim/fnl/keybinds.fnl @@ -2,7 +2,6 @@ {require {a aniseed.core nvim aniseed.nvim utils utils - fennel aniseed.fennel wk which-key treesitter-selection nvim-treesitter.incremental_selection trouble trouble} diff --git a/nvim/.config/nvim/fnl/macros.fnl b/nvim/.config/nvim/fnl/macros.fnl index 91038d0..8ca668e 100644 --- a/nvim/.config/nvim/fnl/macros.fnl +++ b/nvim/.config/nvim/fnl/macros.fnl @@ -60,7 +60,6 @@ :packer-use (fn [...] (let [a (require "aniseed.core") - fennel (require "aniseed.fennel") args [...] use-statements []] (for [i 1 (a.count args) 2] diff --git a/nvim/.config/nvim/fnl/plugins.fnl b/nvim/.config/nvim/fnl/plugins.fnl index f785b94..dbadf6d 100644 --- a/nvim/.config/nvim/fnl/plugins.fnl +++ b/nvim/.config/nvim/fnl/plugins.fnl @@ -26,8 +26,6 @@ :folke/which-key.nvim {} - :pwntester/octo.nvim {} - ; json query stuff :gennaro-tedesco/nvim-jqx {:ft ["json"]} diff --git a/nvim/.config/nvim/fnl/plugins/bufferline.fnl b/nvim/.config/nvim/fnl/plugins/bufferline.fnl index 62e103d..df3b4ec 100644 --- a/nvim/.config/nvim/fnl/plugins/bufferline.fnl +++ b/nvim/.config/nvim/fnl/plugins/bufferline.fnl @@ -1,10 +1,9 @@ (module plugins.bufferline - {require {a aniseed.core - fennel aniseed.fennel - nvim aniseed.nvim - utils utils - bufferline bufferline - colors colors}}) + {autoload {a aniseed.core + nvim aniseed.nvim + utils utils + bufferline bufferline + colors colors}}) ; :h bufferline-lua-highlights (let [selected {:gui "" :guibg colors.neutral_aqua :guifg colors.dark0} diff --git a/nvim/.config/nvim/fnl/plugins/feline.fnl b/nvim/.config/nvim/fnl/plugins/feline.fnl index 719bbde..9a03411 100644 --- a/nvim/.config/nvim/fnl/plugins/feline.fnl +++ b/nvim/.config/nvim/fnl/plugins/feline.fnl @@ -61,6 +61,15 @@ (or-empty (utils.keep-if #(~= "master" $1) (?. vim.b :gitsigns_status_dict :head)))) + +(defn lsp-progress-provider [] + (let [msgs (vim.lsp.util.get_progress_messages) + s (icollect [_ msg (ipairs msgs)] + (when msg.message + (.. msg.title " " msg.message)))] + (or-empty (str.join " | " s)))) + + (def components {:left {:active {} :inactive {}} :mid {:active {} :inactive {}} @@ -72,17 +81,10 @@ {:provider get-current-filepath :left_sep " "} {:provider git-status-provider :left_sep " " :hl #(vim-mode-hl true)}]) - - -(defn get-lsp-progress [] - (let [msgs (vim.lsp.util.get_progress_messages) - s (icollect [_ msg (ipairs msgs)] - (when msg.message - (.. msg.title " " msg.message)))] - (or-empty (str.join " | " s)))) - (set components.mid.active - [{:provider get-lsp-progress}]) + [{:provider lsp-progress-provider + :enabled #(< 0 (length (vim.lsp.buf_get_clients)))}]) + (set components.right.active [{:provider vim.bo.filetype diff --git a/nvim/.config/nvim/fnl/plugins/galaxyline.fnl b/nvim/.config/nvim/fnl/plugins/galaxyline.fnl index 28c6d85..6466577 100644 --- a/nvim/.config/nvim/fnl/plugins/galaxyline.fnl +++ b/nvim/.config/nvim/fnl/plugins/galaxyline.fnl @@ -1,7 +1,6 @@ (module plugins.galaxyline {require {a aniseed.core str aniseed.string - fennel aniseed.fennel nvim aniseed.nvim utils utils colors colors diff --git a/nvim/.config/nvim/fnl/smart-compe-conjure.fnl b/nvim/.config/nvim/fnl/smart-compe-conjure.fnl index 55cad19..40adfe4 100644 --- a/nvim/.config/nvim/fnl/smart-compe-conjure.fnl +++ b/nvim/.config/nvim/fnl/smart-compe-conjure.fnl @@ -2,7 +2,7 @@ {require {utils utils a aniseed.core str aniseed.string - fennel aniseed.fennel + view aniseed.view popup popup compe compe help help-thingy} @@ -23,7 +23,7 @@ (set my_source.abort fuck.abort) (set my_source.documentation (fn [self args] - (a.println (fennel.view args)) + (a.println (view.serialise args)) (args.callback (let [help-tag (help.find-help-tag-for args.completed_item.word)] (when help-tag @@ -59,5 +59,3 @@ - -;(print (fennel.view compe)) diff --git a/nvim/.config/nvim/fnl/utils.fnl b/nvim/.config/nvim/fnl/utils.fnl index 026a191..ca3ee99 100644 --- a/nvim/.config/nvim/fnl/utils.fnl +++ b/nvim/.config/nvim/fnl/utils.fnl @@ -71,7 +71,11 @@ (defn safe-require [name] (xpcall - #(require name) + #( + ;do + ;(print name) + ;(time + (require name)) #(a.println (.. "Error sourcing " name ":\n" (fennel.traceback $1)))))