diff --git a/nvim/.config/nvim/fnl/init.fnl b/nvim/.config/nvim/fnl/init.fnl index d592f10..85b5fa1 100644 --- a/nvim/.config/nvim/fnl/init.fnl +++ b/nvim/.config/nvim/fnl/init.fnl @@ -99,6 +99,8 @@ (utils.highlight-add :NormalFloat {:bg colors.dark0_hard}) (utils.highlight-add :SignColumn {:bg colors.dark0}) +(utils.highlight-add :FloatBorder {:bg colors.dark0_hard}) + (utils.highlight ["StatusLine" "GalaxyLineInfo" "GalaxySpace" ] {:bg colors.dark1 :fg colors.light0}) diff --git a/nvim/.config/nvim/fnl/keybinds.fnl b/nvim/.config/nvim/fnl/keybinds.fnl index 7919ed4..da6ddec 100644 --- a/nvim/.config/nvim/fnl/keybinds.fnl +++ b/nvim/.config/nvim/fnl/keybinds.fnl @@ -7,11 +7,8 @@ trouble trouble} require-macros [macros]}) - -(utils.keymap :i : "compe#complete()" {:expr true}) -;(utils.keymap :i : "compe#close('')" {:expr true}) -(utils.keymap :i :kj "compe#close('')" {:expr true}) - +; undo autopairs fuckup +(set vim.g.AutoPairsShortcutBackInsert "") (utils.keymap [:n] : "Telescope find_files") (utils.keymap :n :K "") @@ -22,13 +19,6 @@ (utils.keymap :n :MN "lua require('nvim-gehzu').show_definition()" {}) -; TODO let's see if i want these -; (utils.keymap :n : "") -; (utils.keymap :n : "") -; (utils.keymap :n : "") -; (utils.keymap :n : "") - - (fn cmd [s desc] [(.. "" s "") desc]) (fn rebind [s desc] [s desc]) diff --git a/nvim/.config/nvim/fnl/plugins.fnl b/nvim/.config/nvim/fnl/plugins.fnl index 6a87581..18d4ecc 100644 --- a/nvim/.config/nvim/fnl/plugins.fnl +++ b/nvim/.config/nvim/fnl/plugins.fnl @@ -21,6 +21,9 @@ :nvim-treesitter/nvim-treesitter {:mod "plugins.treesitter" :run ":TSUpdate"} :nvim-treesitter/playground {} + + + :jiangmiao/auto-pairs {} ; :code-biscuits/nvim-biscuits {} ; show opening line after closing curly @@ -91,8 +94,8 @@ :justinmk/vim-sneak {:mod "plugins.sneak"} :psliwka/vim-smoothie {} :editorconfig/editorconfig-vim {} - :honza/vim-snippets {} :tommcdo/vim-exchange {} + ;:frazrepo/vim-rainbow {} ;:bhurlow/vim-parinfer {:ft ["fennel" "carp" "lisp" "elisp"]} @@ -124,7 +127,7 @@ :simrat39/rust-tools.nvim {:ft ["rust"]} :qnighy/lalrpop.vim {} - ;:ray-x/lsp_signature.nvim {} + :ray-x/lsp_signature.nvim {} :vmchale/ats-vim {:ft ["ats"]} diff --git a/nvim/.config/nvim/fnl/plugins/compe.fnl b/nvim/.config/nvim/fnl/plugins/compe.fnl index 36a6728..69e92e5 100644 --- a/nvim/.config/nvim/fnl/plugins/compe.fnl +++ b/nvim/.config/nvim/fnl/plugins/compe.fnl @@ -1,5 +1,11 @@ (module plugins.compe - {require {compe compe}}) + {require {utils utils + compe compe}}) + + +(utils.keymap :i : "compe#complete()" {:expr true}) +(utils.keymap :i :kj "compe#close('')" {:expr true}) +;(utils.keymap :i : "compe#close('')" {:expr true}) (defn result-formatter [items] @@ -34,7 +40,8 @@ :buffer true :calc true :nvim_lsp true - :nvim_lua true + :nvim_lua true + :emoji false :vsnip false :conjure true}}) diff --git a/nvim/.config/nvim/fnl/plugins/lsp.fnl b/nvim/.config/nvim/fnl/plugins/lsp.fnl index 6344775..e30a5a1 100644 --- a/nvim/.config/nvim/fnl/plugins/lsp.fnl +++ b/nvim/.config/nvim/fnl/plugins/lsp.fnl @@ -8,7 +8,12 @@ (fn on_attach [client bufnr] (pkg lsp_signature.nvim [lsp_signature (require "lsp_signature")] - (lsp_signature.on_attach)) + (lsp_signature.on_attach {:bind true + :hint_scheme "String" + :hint_prefix "ƒ " + :handler_opts {:border "single"} + :use_lspsaga false + :decorator ["`" "`"]})) (if client.resolved_capabilities.document_highlight (do @@ -30,11 +35,15 @@ (when (not ((lsp.util.root_pattern except-patterns) path)) ((lsp.util.root_pattern patterns) path)))) - +; advertise snippet support +(def default-capabilities + (let [capabilities (vim.lsp.protocol.make_client_capabilities)] + (set capabilities.textDocument.completion.completionItem.snippetSupport true) + capabilities)) (fn init-lsp [lsp-name ?opts] "initialize a language server with defaults" - (let [merged-opts (a.merge {:on_attach on_attach} (or ?opts {}))] + (let [merged-opts (a.merge {:on_attach on_attach :capabilities default-capabilities} (or ?opts {}))] ((. lsp lsp-name :setup) merged-opts))) ; Added capabilities for rust-analyzer with nvim-compe