mirror of
https://github.com/elkowar/dots-of-war.git
synced 2024-12-25 13:42:23 +00:00
Lazy-load telescope
This commit is contained in:
parent
945eddd33e
commit
d2d7afd367
4 changed files with 32 additions and 13 deletions
|
@ -9,11 +9,17 @@
|
||||||
(macro make-errors-epic [f]
|
(macro make-errors-epic [f]
|
||||||
`(xpcall #,f #(a.println (fennel.traceback $1))))
|
`(xpcall #,f #(a.println (fennel.traceback $1))))
|
||||||
|
|
||||||
|
|
||||||
(make-errors-epic (require "plugins.lsp"))
|
(make-errors-epic (require "plugins.lsp"))
|
||||||
(make-errors-epic (require "keybinds"))
|
(make-errors-epic (require "keybinds"))
|
||||||
|
|
||||||
(pkg telescope.nvim []
|
|
||||||
(make-errors-epic (require "plugins.telescope")))
|
; called from packer config
|
||||||
|
(fn _G.load_telescope []
|
||||||
|
(require "plugins.telescope"))
|
||||||
|
;(pkg telescope.nvim []
|
||||||
|
;(make-errors-epic (require "plugins.telescope"))))
|
||||||
|
|
||||||
(pkg galaxyline.nvim []
|
(pkg galaxyline.nvim []
|
||||||
(make-errors-epic (require "plugins.galaxyline")))
|
(make-errors-epic (require "plugins.galaxyline")))
|
||||||
(pkg nvim-bufferline.lua []
|
(pkg nvim-bufferline.lua []
|
||||||
|
|
|
@ -13,6 +13,8 @@
|
||||||
(utils.keymap :i :<esc> "compe#close('<esc>')" {:expr true})
|
(utils.keymap :i :<esc> "compe#close('<esc>')" {:expr true})
|
||||||
|
|
||||||
|
|
||||||
|
(utils.keymap :n :<C-p> "<cmd>Telescope find_files<cr>")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(fn cmd [s desc] [(.. "<cmd>" s "<cr>") desc])
|
(fn cmd [s desc] [(.. "<cmd>" s "<cr>") desc])
|
||||||
|
|
|
@ -48,11 +48,18 @@
|
||||||
((. lsp lsp-name :setup) merged-opts)))
|
((. lsp lsp-name :setup) merged-opts)))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(let [capabilities (vim.lsp.protocol.make_client_capabilities)]
|
(let [capabilities (vim.lsp.protocol.make_client_capabilities)]
|
||||||
(set capabilities.textDocument.completion.completionItem.snippetSupport true)
|
(set capabilities.textDocument.completion.completionItem.snippetSupport true)
|
||||||
(set capabilities.textDocument.completion.completionItem.resolveSupport
|
(set capabilities.textDocument.completion.completionItem.resolveSupport
|
||||||
{:properties ["documentation" "detail" "additionalTextEdits"]})
|
{:properties ["documentation" "detail" "additionalTextEdits"]})
|
||||||
(init-lsp :rust_analyzer { :capabilities capabilities}))
|
(lsp.rust_analyzer.setup
|
||||||
|
{:capabilities capabilities
|
||||||
|
:on_attach (fn [...]
|
||||||
|
(on_attach ...)
|
||||||
|
(pkg rust-tools.nvim [rust-tools (require "rust-tools")]
|
||||||
|
(rust-tools.setup { :tools { :inlay_hints { :show_parameter_hints false}}})))}))
|
||||||
|
|
||||||
(init-lsp :tsserver {:root_dir (lsp.util.root_pattern "package.json")})
|
(init-lsp :tsserver {:root_dir (lsp.util.root_pattern "package.json")})
|
||||||
(init-lsp :jsonls {:commands {:Format [ #(vim.lsp.buf.range_formatting [] [0 0] [(vim.fn.line "$") 0])]}})
|
(init-lsp :jsonls {:commands {:Format [ #(vim.lsp.buf.range_formatting [] [0 0] [(vim.fn.line "$") 0])]}})
|
||||||
|
@ -170,9 +177,6 @@
|
||||||
|
|
||||||
; >>>>>
|
; >>>>>
|
||||||
|
|
||||||
(pkg rust-tools.nvim [rust-tools (require "rust-tools")]
|
|
||||||
(rust-tools.setup { :tools { :inlay_hints { :show_parameter_hints false}}}))
|
|
||||||
|
|
||||||
(set vim.o.signcolumn "yes")
|
(set vim.o.signcolumn "yes")
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ require("packer").startup(function(use)
|
||||||
|
|
||||||
use {
|
use {
|
||||||
"Olical/aniseed",
|
"Olical/aniseed",
|
||||||
tag = "v3.16.0"
|
--tag = "v3.16.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
-- general purpose lua wrappers for nvim stuff
|
-- general purpose lua wrappers for nvim stuff
|
||||||
|
@ -151,7 +151,14 @@ require("packer").startup(function(use)
|
||||||
|
|
||||||
use "nvim-lua/popup.nvim"
|
use "nvim-lua/popup.nvim"
|
||||||
use "nvim-lua/plenary.nvim"
|
use "nvim-lua/plenary.nvim"
|
||||||
use "nvim-telescope/telescope.nvim"
|
|
||||||
|
use {
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
cmd = { "Telescope" },
|
||||||
|
config = function()
|
||||||
|
_G.load_telescope()
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
--use "RishabhRD/popfix"
|
--use "RishabhRD/popfix"
|
||||||
--use "RishabhRD/nvim-lsputils"
|
--use "RishabhRD/nvim-lsputils"
|
||||||
|
|
Loading…
Reference in a new issue