diff options
| author | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2023-01-09 20:55:56 +0100 |
|---|---|---|
| committer | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2023-01-09 20:55:56 +0100 |
| commit | 5b6c5ca5b0f081c799fa870dec3a88178c1e28e6 (patch) | |
| tree | 9d512d3d2abe6518efe3dd15a11b92d5c4e1af79 | |
| parent | 6dc01b561fa6cb53d25096641a73df8b7c337f0d (diff) | |
| download | nvim-conf-5b6c5ca5b0f081c799fa870dec3a88178c1e28e6.tar.gz nvim-conf-5b6c5ca5b0f081c799fa870dec3a88178c1e28e6.zip | |
feat: move rest to lazy loading
| -rw-r--r-- | lua/alpha/plugins.lua | 4 | ||||
| -rw-r--r-- | lua/alpha/rest.lua (renamed from after/plugin/rest.lua) | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/lua/alpha/plugins.lua b/lua/alpha/plugins.lua index c0a4f82..42843e7 100644 --- a/lua/alpha/plugins.lua +++ b/lua/alpha/plugins.lua @@ -232,6 +232,10 @@ return require("packer").startup(function(use) use({ "NTBBloodbath/rest.nvim", requires = { "nvim-lua/plenary.nvim" }, + ft = "http", + config = function () + require("alpha.rest") + end, }) use({ diff --git a/after/plugin/rest.lua b/lua/alpha/rest.lua index f9417dd..a5838ff 100644 --- a/after/plugin/rest.lua +++ b/lua/alpha/rest.lua @@ -1,7 +1,4 @@ -local ok, rest_nvim = pcall(require, "rest-nvim") -if not ok then - return -end +local rest_nvim = require("rest-nvim") rest_nvim.setup({ -- Open request results in a horizontal split |