Some fixes

This commit is contained in:
elkowar 2021-05-17 17:06:21 +02:00
parent 39dae0dca0
commit 0a7b80f3e2
No known key found for this signature in database
GPG key ID: E321AD71B1D1F27F
5 changed files with 30 additions and 19 deletions

View file

@ -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})

View file

@ -7,11 +7,8 @@
trouble trouble}
require-macros [macros]})
(utils.keymap :i :<C-Space> "compe#complete()" {:expr true})
;(utils.keymap :i :<esc> "compe#close('<esc>')" {:expr true})
(utils.keymap :i :kj "compe#close('<esc>')" {:expr true})
; undo autopairs fuckup
(set vim.g.AutoPairsShortcutBackInsert "<M-b>")
(utils.keymap [:n] :<C-p> "<cmd>Telescope find_files<cr>")
(utils.keymap :n :K "<Nop>")
@ -22,13 +19,6 @@
(utils.keymap :n :MN "<cmd>lua require('nvim-gehzu').show_definition()<CR>" {})
; TODO let's see if i want these
; (utils.keymap :n :<C-h> "<C-w><C-h>")
; (utils.keymap :n :<C-j> "<C-w><C-j>")
; (utils.keymap :n :<C-k> "<C-w><C-k>")
; (utils.keymap :n :<C-l> "<C-w><C-l>")
(fn cmd [s desc] [(.. "<cmd>" s "<cr>") desc])
(fn rebind [s desc] [s desc])

View file

@ -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"]}

View file

@ -1,5 +1,11 @@
(module plugins.compe
{require {compe compe}})
{require {utils utils
compe compe}})
(utils.keymap :i :<C-Space> "compe#complete()" {:expr true})
(utils.keymap :i :kj "compe#close('<esc>')" {:expr true})
;(utils.keymap :i :<esc> "compe#close('<esc>')" {: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}})

View file

@ -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