diff options
author | sefidel <contact@sefidel.net> | 2023-10-01 22:20:04 +0900 |
---|---|---|
committer | sefidel <contact@sefidel.net> | 2023-10-01 23:13:12 +0900 |
commit | ff2b7e744afec051844aa20e25b9564a44505ffb (patch) | |
tree | 777e507fb2531b40da22a3c7f378e2f4555c024b | |
parent | 9805575ca35b2c1519e363309a9965bc56bb26a0 (diff) | |
download | nvimrc-ff2b7e744afec051844aa20e25b9564a44505ffb.tar.gz nvimrc-ff2b7e744afec051844aa20e25b9564a44505ffb.zip |
feat(pack): aggressively lazy load packs
-rw-r--r-- | fnl/nvrc/pack.fnl | 29 | ||||
-rw-r--r-- | fnl/nvrc/packs/lspconfig.fnl | 6 | ||||
-rw-r--r-- | lazy-lock.json | 2 |
3 files changed, 20 insertions, 17 deletions
diff --git a/fnl/nvrc/pack.fnl b/fnl/nvrc/pack.fnl index 15481b3..5708f51 100644 --- a/fnl/nvrc/pack.fnl +++ b/fnl/nvrc/pack.fnl @@ -5,8 +5,9 @@ (pack! :rktjmp/hotpot.nvim) (pack! :nanotech/jellybeans.vim {:config #((. (require :nvrc.colors) :apply) :jellybeans)}) -(pack! :kvrohit/rasmus.nvim) +(pack! :kvrohit/rasmus.nvim {:lazy true}) (pack! :nvim-treesitter/nvim-treesitter {:req :treesitter + :event [:BufReadPost :BufNewFile] :dependencies [(pack :nvim-treesitter/nvim-treesitter-refactor) (pack :nvim-treesitter/nvim-treesitter-textobjects)]}) @@ -14,25 +15,33 @@ (pack! :justinmk/vim-dirvish) (pack! :neovim/nvim-lspconfig {:req :lspconfig + :event :BufReadPre :dependencies [(pack :j-hui/fidget.nvim {:req :fidget :branch :legacy})]}) -(pack! :simrat39/rust-tools.nvim {:req :rust :ft :rust :dependencies [(pack :nvim-lua/plenary.nvim)]}) -(pack! :p00f/clangd_extensions.nvim {:req :clangd :ft [:c :cpp :objc :objcpp]}) -(pack! :mfussenegger/nvim-dap {:req :dap :dependencies [(pack :nvim-lua/plenary.nvim) - (pack :rcarriga/nvim-dap-ui {:init :dapui})]}) +(pack! :simrat39/rust-tools.nvim {:req :rust + :event :BufReadPre ;; doesn't work when loaded on filetype + :dependencies [(pack :nvim-lua/plenary.nvim)]}) +(pack! :p00f/clangd_extensions.nvim {:req :clangd + :ft [:c :cpp :objc :objcpp]}) +(pack! :mfussenegger/nvim-dap {:req :dap + :event :VeryLazy + :dependencies [(pack :nvim-lua/plenary.nvim) + (pack :rcarriga/nvim-dap-ui {:init :dapui :lazy true})]} + :lazy true) (pack! :gpanders/editorconfig.nvim) (pack! :stefandtw/quickfix-reflector.vim {:ft :qf}) (pack! :tpope/vim-fugitive) (pack! :tpope/vim-eunuch) (pack! :tpope/vim-sleuth) -(pack! :hrsh7th/nvim-cmp {:req :cmp :event :BufEnter +(pack! :hrsh7th/nvim-cmp {:req :cmp + :event [:InsertEnter :CmdlineEnter] :dependencies [(pack :L3MON4D3/LuaSnip) (pack :lukas-reineke/cmp-under-comparator) (pack :hrsh7th/cmp-nvim-lsp {:after :nvim-cmp}) (pack :hrsh7th/cmp-nvim-lsp-signature-help)]}) -(pack! :numToStr/Comment.nvim {:init :Comment}) -(pack! :ibhagwan/fzf-lua {:req :fzf}) -(pack! :ggandor/leap.nvim {:req :leap}) -(pack! :windwp/nvim-autopairs {:req :autopairs}) +(pack! :numToStr/Comment.nvim {:init :Comment :lazy true}) +(pack! :ibhagwan/fzf-lua {:req :fzf :lazy true}) +(pack! :ggandor/leap.nvim {:req :leap :lazy true}) +(pack! :windwp/nvim-autopairs {:req :autopairs :lazy true}) (unpack!) diff --git a/fnl/nvrc/packs/lspconfig.fnl b/fnl/nvrc/packs/lspconfig.fnl index e69c337..55d0bd0 100644 --- a/fnl/nvrc/packs/lspconfig.fnl +++ b/fnl/nvrc/packs/lspconfig.fnl @@ -10,12 +10,6 @@ autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references() augroup END" false)))) -(fn better_root_pattern [patterns except-patterns] - "match path if one of the given patterns is matched, EXCEPT if one of the except-patterns is matched" - (fn [path] - (when (not ((lsp.util.root_pattern except-patterns) path)) - ((lsp.util.root_pattern patterns) path)))) - (local default_capabilities (vim.lsp.protocol.make_client_capabilities)) (fn init_lsp [lsp-name ?opts] diff --git a/lazy-lock.json b/lazy-lock.json index e6f0366..28e4be7 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -17,7 +17,7 @@ "nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" }, "nvim-dap": { "branch": "master", "commit": "b3d4408e29d924fe130c9397a7c3b3630b3ea671" }, "nvim-dap-ui": { "branch": "master", "commit": "34160a7ce6072ef332f350ae1d4a6a501daf0159" }, - "nvim-lspconfig": { "branch": "master", "commit": "7ec2ab0cb8f529708dba55964fb0a59d3cc21853" }, + "nvim-lspconfig": { "branch": "master", "commit": "eb1b53162755888ff75e495797071644d983bff7" }, "nvim-treesitter": { "branch": "master", "commit": "776e4d341b5416c995e74c3abbf75f9cec26aa5e" }, "nvim-treesitter-refactor": { "branch": "master", "commit": "65ad2eca822dfaec2a3603119ec3cc8826a7859e" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "bd103502252027434ec42f628d2dbf54821d4ce6" }, |