From 7256f19a47e07fd6d74856ab6e99ec92aec1ea96 Mon Sep 17 00:00:00 2001 From: elkowar <5300871+elkowar@users.noreply.github.com> Date: Sat, 8 May 2021 20:51:05 +0200 Subject: [PATCH] more cleanup --- files/.config/nvim/fnl/init.fnl | 37 +----- files/.config/nvim/fnl/macros.fnl | 5 +- files/.config/nvim/fnl/plugins.fnl | 12 +- files/.config/nvim/fnl/plugins/compe.fnl | 24 ++++ files/.config/nvim/fnl/plugins/lsp.fnl | 118 +----------------- files/.config/nvim/fnl/plugins/lspsaga.fnl | 49 ++++++++ .../nvim/fnl/plugins/symbols-outline.fnl | 4 + files/.config/nvim/fnl/plugins/treesitter.fnl | 26 ++++ files/.config/nvim/fnl/plugins/trouble.fnl | 25 ++++ files/.config/nvim/init.vim | 23 ---- 10 files changed, 144 insertions(+), 179 deletions(-) create mode 100644 files/.config/nvim/fnl/plugins/compe.fnl create mode 100644 files/.config/nvim/fnl/plugins/lspsaga.fnl create mode 100644 files/.config/nvim/fnl/plugins/symbols-outline.fnl create mode 100644 files/.config/nvim/fnl/plugins/treesitter.fnl create mode 100644 files/.config/nvim/fnl/plugins/trouble.fnl diff --git a/files/.config/nvim/fnl/init.fnl b/files/.config/nvim/fnl/init.fnl index 11919d2..8b24883 100644 --- a/files/.config/nvim/fnl/init.fnl +++ b/files/.config/nvim/fnl/init.fnl @@ -1,10 +1,9 @@ (module init - {require {utils utils - str aniseed.string - nvim aniseed.nvim - a aniseed.core - fennel aniseed.fennel - colors colors} + {autoload {utils utils + nvim aniseed.nvim + a aniseed.core + fennel aniseed.fennel + colors colors} require-macros [macros]}) (macro make-errors-epic [f] @@ -28,36 +27,10 @@ ; foldend -; Treesitter ------------------------------------------------------- foldstart - - -(pkg nvim-treesitter [configs (require "nvim-treesitter.configs")] - (configs.setup - {:ensure_installed "all" - :highlight {:enable true - :disable ["fennel"]} - ;:indent {:enable true} - ;:disable ["lua"]} - - :incremental_selection - {:enable true - :keymaps {:init_selection "gss" - :node_incremental "gsl" - :node_decremental "gsh" - :scope_incremental "gsj" - :scope_decremental "gsk"}} - - ; disabled due to it fucking with gitsigns.nvim - ;:rainbow { :enable true - ;:extended_mode true} - - :context_commentstring {:enable true}})) ;(nvim-biscuits.setup {} ;{ :on_events ["InsertLeave" "CursorHoldI"]}) -; foldend - ; :: and _ as space ------------------------------------------------------------------- foldstart (var remapped-space nil) (fn _G.RebindShit [newKey] diff --git a/files/.config/nvim/fnl/macros.fnl b/files/.config/nvim/fnl/macros.fnl index ea9e040..b359f38 100644 --- a/files/.config/nvim/fnl/macros.fnl +++ b/files/.config/nvim/fnl/macros.fnl @@ -26,9 +26,8 @@ :pkg (fn [name mappings ...] - ;(if (~= nil (. packer_plugins `,(tostring name))) - (if true - `(let ,mappings ,...) + `(if (~= nil (. packer_plugins `,(tostring name))) + (let ,mappings ,...) (print (.. "plugin disabled " `,(tostring name))))) :each-pair diff --git a/files/.config/nvim/fnl/plugins.fnl b/files/.config/nvim/fnl/plugins.fnl index 2cccbdc..66bc39b 100644 --- a/files/.config/nvim/fnl/plugins.fnl +++ b/files/.config/nvim/fnl/plugins.fnl @@ -5,7 +5,7 @@ :nvim-telescope/telescope.nvim {:mod "plugins.telescope" :requires [:nvim-lua/popup.nvim :nvim-lua/plenary.nvim]} - :p00f/nvim-ts-rainbow {} + :p00f/nvim-ts-rainbow {:mod "plugins.treesitter"} :romgrk/nvim-treesitter-context {} :JoosepAlviste/nvim-ts-context-commentstring {} :nvim-treesitter/nvim-treesitter {:run ":TSUpdate"} @@ -56,11 +56,11 @@ ; code-related ----------------------------------------- <<< - :folke/lsp-trouble.nvim {} - :simrat39/symbols-outline.nvim {} + :folke/lsp-trouble.nvim {:mod "plugins.trouble"} + :simrat39/symbols-outline.nvim {:mod "plugins.symbols-outline"} :neovim/nvim-lspconfig {} - :hrsh7th/nvim-compe {} - :glepnir/lspsaga.nvim {} + :hrsh7th/nvim-compe {:mod "plugins.compe"} + :glepnir/lspsaga.nvim {:mod "plugins.lspsaga"} :Olical/conjure {} @@ -74,7 +74,7 @@ :editorconfig/editorconfig-vim {} :honza/vim-snippets {} :tommcdo/vim-exchange {} - :kien/rainbow_parentheses.vim {} + ;:frazrepo/vim-rainbow {} :bhurlow/vim-parinfer {:ft ["fennel" "carp" "lisp" "elisp"]} diff --git a/files/.config/nvim/fnl/plugins/compe.fnl b/files/.config/nvim/fnl/plugins/compe.fnl new file mode 100644 index 0000000..a08687e --- /dev/null +++ b/files/.config/nvim/fnl/plugins/compe.fnl @@ -0,0 +1,24 @@ +(module plugins.compe + {autoload {compe compe}}) + +(compe.setup + {:enabled true + :autocomplete false + :debug false + :min_length 1 + :preselect "enable" + :throttle_time 80 + :source_timeout 200 + :incomplete_delay 400 + :max_abbr_width 100 + :max_kind_width 100 + :max_menu_width 100 + :documentation true + :source {:path true + :buffer true + :calc true + :nvim_lsp true + :nvim_lua true + :vsnip false + :conjure true}}) + diff --git a/files/.config/nvim/fnl/plugins/lsp.fnl b/files/.config/nvim/fnl/plugins/lsp.fnl index 6265c43..e170873 100644 --- a/files/.config/nvim/fnl/plugins/lsp.fnl +++ b/files/.config/nvim/fnl/plugins/lsp.fnl @@ -1,23 +1,14 @@ (module plugins.lsp {require {a aniseed.core - fennel aniseed.fennel - nvim aniseed.nvim lsp lspconfig lsp-configs lspconfig.configs - utils utils - colors colors} + utils utils} + require-macros [macros]}) - -(pkg symbols-outline.nvim [symbols-outline (require "symbols-outline")] - (symbols-outline.setup { :highlight_hovered_item true :show_guides true})) - - -; LSP config -------------------------------------------------------------------------------- <<<<< - (fn on_attach [client bufnr] - (pkg lsp_signature.nvim [lsp_signature (require "lsp_signature")] + (pkg lsp-signature.nvim [lsp_signature (require "lsp_signature")] (lsp_signature.on_attach)) (if client.resolved_capabilities.document_highlight @@ -48,8 +39,6 @@ ((. lsp lsp-name :setup) merged-opts))) - - (let [capabilities (vim.lsp.protocol.make_client_capabilities)] (set capabilities.textDocument.completion.completionItem.snippetSupport true) (set capabilities.textDocument.completion.completionItem.resolveSupport @@ -75,107 +64,6 @@ ;(lsp.vimls.setup { :on_attach on_attach}) -; >>>>> - -; compe -------------------------------------------------------------------------------- <<<<< -(pkg nvim-compe [compe (require "compe")] - (compe.setup - {:enabled true - :autocomplete false - :debug false - :min_length 1 - :preselect "enable" - :throttle_time 80 - :source_timeout 200 - :incomplete_delay 400 - :max_abbr_width 100 - :max_kind_width 100 - :max_menu_width 100 - :documentation true - :source {:path true - :buffer true - :calc true - :nvim_lsp true - :nvim_lua true - :vsnip false - :conjure true}})) - -; >>>>> - -; LSP saga -------------------------------------------------------------------------------- <<<<< -(pkg lspsaga.nvim [saga (require "lspsaga")] - (saga.init_lsp_saga - {:border_style "single" ; single double round plus - :code_action_prompt {:enable true - :sign true - :virtual_text false} - :code_action_keys {:quit "" :exec ""} - :rename_action_keys {:quit "" :exec ""} - :finder_action_keys {:quit "" - :open "" - :vsplit "v" - :split "b" - :scroll_up "" - :scroll_down ""}}) - - - (utils.highlight ["LspFloatWinBorder" - "LspSagaHoverBorder" - "LspSagaRenameBorder" - "LspSagaSignatureHelpBorder" - "LspSagaCodeActionBorder" - "LspSagaDefPreviewBorder" - "LspSagaDiagnosticBorder"] - {:bg colors.dark0_hard :fg colors.dark0_hard}) - - (utils.highlight ["LspSagaDiagnosticTruncateLine" - "LspSagaDocTruncateLine" - "LspSagaShTruncateLine"] - {:bg "NONE" :fg colors.dark0}) - - (utils.highlight ["TargetWord" - "LspSagaCodeActionTitle" - "LspSagaBorderTitle" - "LspSagaCodeActionContent" - "LspSagaFinderSelection" - "LspSagaDiagnosticHeader"] - {:fg colors.bright_aqua})) - - -(utils.highlight "LspFloatWinNormal" {:bg colors.dark0_hard}) -(utils.highlight "LspFloatWinBorder" {:bg colors.dark0_hard - :fg colors.dark0_hard}) -(utils.highlight "TargetWord" {:fg colors.bright_aqua}) -; >>>>> - -; LSP trouble -------------------------------------------------------------------------------- <<<<< -(pkg lsp-trouble.nvim [trouble (require "trouble")] - (trouble.setup - {:icons false - :auto_preview true - :auto_close true - :auto_open false - :action_keys - {:jump "o" - :jump_close "" - :close "" - :cancel "q" - :hover ["a" "K"]}}) - - (utils.highlight "LspTroubleFoldIcon" {:bg "NONE" :fg colors.bright_orange}) - (utils.highlight "LspTroubleCount" {:bg "NONE" :fg colors.bright_green}) - (utils.highlight "LspTroubleText" {:bg "NONE" :fg colors.light0}) - - (utils.highlight "LspTroubleSignError" {:bg "NONE" :fg colors.bright_red}) - (utils.highlight "LspTroubleSignWarning" {:bg "NONE" :fg colors.bright_yellow}) - (utils.highlight "LspTroubleSignInformation" {:bg "NONE" :fg colors.bright_aqua}) - (utils.highlight "LspTroubleSignHint" {:bg "NONE" :fg colors.bright_blue})) - -; >>>>> - -; Empty template -------------------------------------------------------------------------------- <<<<< - -; >>>>> (set vim.o.signcolumn "yes") diff --git a/files/.config/nvim/fnl/plugins/lspsaga.fnl b/files/.config/nvim/fnl/plugins/lspsaga.fnl new file mode 100644 index 0000000..5a564b9 --- /dev/null +++ b/files/.config/nvim/fnl/plugins/lspsaga.fnl @@ -0,0 +1,49 @@ +(module plugins.lspsaga + {autoload {utils utils + colors colors + + saga lspsaga}}) + + +(saga.init_lsp_saga + {:border_style "single" ; single double round plus + :code_action_prompt {:enable true + :sign true + :virtual_text false} + :code_action_keys {:quit "" :exec ""} + :rename_action_keys {:quit "" :exec ""} + :finder_action_keys {:quit "" + :open "" + :vsplit "v" + :split "b" + :scroll_up "" + :scroll_down ""}}) + + +(utils.highlight ["LspFloatWinBorder" + "LspSagaHoverBorder" + "LspSagaRenameBorder" + "LspSagaSignatureHelpBorder" + "LspSagaCodeActionBorder" + "LspSagaDefPreviewBorder" + "LspSagaDiagnosticBorder"] + {:bg colors.dark0_hard :fg colors.dark0_hard}) + +(utils.highlight ["LspSagaDiagnosticTruncateLine" + "LspSagaDocTruncateLine" + "LspSagaShTruncateLine"] + {:bg "NONE" :fg colors.dark0}) + +(utils.highlight ["TargetWord" + "LspSagaCodeActionTitle" + "LspSagaBorderTitle" + "LspSagaCodeActionContent" + "LspSagaFinderSelection" + "LspSagaDiagnosticHeader"] + {:fg colors.bright_aqua}) + + +(utils.highlight "LspFloatWinNormal" {:bg colors.dark0_hard}) +(utils.highlight "LspFloatWinBorder" {:bg colors.dark0_hard + :fg colors.dark0_hard}) +(utils.highlight "TargetWord" {:fg colors.bright_aqua}) diff --git a/files/.config/nvim/fnl/plugins/symbols-outline.fnl b/files/.config/nvim/fnl/plugins/symbols-outline.fnl new file mode 100644 index 0000000..bfe95b5 --- /dev/null +++ b/files/.config/nvim/fnl/plugins/symbols-outline.fnl @@ -0,0 +1,4 @@ +(module plugins.symbols-outline + {require {symbols-outline symbols-outline}}) + +(symbols-outline.setup {:highlight_hovered_item true :show_guides true}) diff --git a/files/.config/nvim/fnl/plugins/treesitter.fnl b/files/.config/nvim/fnl/plugins/treesitter.fnl new file mode 100644 index 0000000..619637d --- /dev/null +++ b/files/.config/nvim/fnl/plugins/treesitter.fnl @@ -0,0 +1,26 @@ +(module plugins.treesitter + {autoload {a aniseed.core} + require {configs nvim-treesitter.configs} + require-macros [macros]}) + +(configs.setup + {:ensure_installed "all" + :highlight {:enable true + :disable ["fennel"]} + + :incremental_selection {:enable true + :keymaps {:init_selection "gss" + :node_incremental "gsl" + :node_decremental "gsh" + :scope_incremental "gsj" + :scope_decremental "gsk"}} + + ; Might fuck with gitsigns + :rainbow {:enable true + :extended_mode true} + :context_commentstring {:enable true}}) + + ;:indent {:enable true} + ;:disable ["lua"] + + diff --git a/files/.config/nvim/fnl/plugins/trouble.fnl b/files/.config/nvim/fnl/plugins/trouble.fnl new file mode 100644 index 0000000..b18d0fe --- /dev/null +++ b/files/.config/nvim/fnl/plugins/trouble.fnl @@ -0,0 +1,25 @@ +(module plugins.trouble + {autoload {utils utils + colors colors} + require {trouble trouble}}) + +(trouble.setup + {:icons false + :auto_preview true + :auto_close true + :auto_open false + :action_keys + {:jump "o" + :jump_close "" + :close "" + :cancel "q" + :hover ["a" "K"]}}) + +(utils.highlight "LspTroubleFoldIcon" {:bg "NONE" :fg colors.bright_orange}) +(utils.highlight "LspTroubleCount" {:bg "NONE" :fg colors.bright_green}) +(utils.highlight "LspTroubleText" {:bg "NONE" :fg colors.light0}) + +(utils.highlight "LspTroubleSignError" {:bg "NONE" :fg colors.bright_red}) +(utils.highlight "LspTroubleSignWarning" {:bg "NONE" :fg colors.bright_yellow}) +(utils.highlight "LspTroubleSignInformation" {:bg "NONE" :fg colors.bright_aqua}) +(utils.highlight "LspTroubleSignHint" {:bg "NONE" :fg colors.bright_blue}) diff --git a/files/.config/nvim/init.vim b/files/.config/nvim/init.vim index 5ecf793..6e3231e 100644 --- a/files/.config/nvim/init.vim +++ b/files/.config/nvim/init.vim @@ -241,29 +241,6 @@ let g:user_emmet_settings = { 'javascript.jsx' : { 'extends' : 'jsx' }, 'typescr let g:qs_highlight_on_keys = ['f', 'F', 't', 'T'] let g:qs_lazy_highlight = 1 - - -" au VimEnter * RainbowParenthesesToggle -" au Syntax * RainbowParenthesesLoadRound -" au Syntax * RainbowParenthesesLoadSquare -" au Syntax * RainbowParenthesesLoadBraces - - - -"map f (easymotion-bd-f) -"map s (easymotion-overwin-f2) -"let g:EasyMotion_smartcase = 1 - -let g:signify_sign_add = '▍' -let g:signify_sign_delete = '▍' -let g:signify_sign_delete_first_line = '▍' -let g:signify_sign_change = '▍' -"let g:signify_sign_show_text = 0 - -hi SignifySignDelete cterm=NONE gui=NONE guifg='#fb4934' -hi SignifySignChange cterm=NONE gui=NONE guifg='#83a598' -hi SignifySignAdd cterm=NONE gui=NONE guifg='#8ec07c' - " }}} " }}}