diff options
| author | Ariel D'Alessandro <ariel.dalessandro@auto1.com> | 2022-04-12 20:10:58 +0200 |
|---|---|---|
| committer | Ariel D'Alessandro <ariel.dalessandro@auto1.com> | 2022-04-12 20:10:58 +0200 |
| commit | 2f09ab84a13e114b8a1585b55ba62e8d31c59370 (patch) | |
| tree | 0f6018b8489aadfe6c9d251da6558bdbcf578507 | |
| parent | 2d526b3a2499bcef17f1dccc61377b52c3cdced7 (diff) | |
| download | nvim-conf-2f09ab84a13e114b8a1585b55ba62e8d31c59370.tar.gz nvim-conf-2f09ab84a13e114b8a1585b55ba62e8d31c59370.zip | |
Add new plugin for http not blocking
| -rw-r--r-- | after/plugin/rest.lua | 37 | ||||
| -rw-r--r-- | lua/alpha/dap.lua | 2 | ||||
| -rw-r--r-- | lua/alpha/plugins.lua | 6 |
3 files changed, 44 insertions, 1 deletions
diff --git a/after/plugin/rest.lua b/after/plugin/rest.lua new file mode 100644 index 0000000..baf4edd --- /dev/null +++ b/after/plugin/rest.lua @@ -0,0 +1,37 @@ +local ok, rest_nvim = pcall(require, "rest-nvim") +if not ok then + return +end + +rest_nvim.setup({ + -- Open request results in a horizontal split + result_split_horizontal = false, + -- Skip SSL verification, useful for unknown certificates + skip_ssl_verification = false, + -- Highlight request on run + highlight = { + enabled = true, + timeout = 150, + }, + result = { + -- toggle showing URL, HTTP info, headers at top the of result window + show_url = true, + show_http_info = true, + show_headers = true, + }, + -- Jump to request line on run + jump_to_request = false, + env_file = ".env", + custom_dynamic_variables = {}, + yank_dry_run = true, +}) + +vim.api.nvim_create_autocmd("FileType", { + pattern = "http", + callback = function () + local buff = tonumber(vim.fn.expand("<abuf>"), 10) + vim.keymap.set("n", "<leader>rn", rest_nvim.run, { noremap = true, buffer = buff }) + vim.keymap.set("n", "<leader>rl", rest_nvim.last, { noremap = true, buffer = buff }) + end +}) + diff --git a/lua/alpha/dap.lua b/lua/alpha/dap.lua index e0058e0..27b596d 100644 --- a/lua/alpha/dap.lua +++ b/lua/alpha/dap.lua @@ -10,6 +10,8 @@ dapui.setup({ require("dap-go").setup() +vim.fn.sign_define("DapBreakpoint", { text = "ß", texthl = "", linehl = "", numhl = "" }) + dap_install.config("php", { configurations = { { diff --git a/lua/alpha/plugins.lua b/lua/alpha/plugins.lua index 3b16980..042791f 100644 --- a/lua/alpha/plugins.lua +++ b/lua/alpha/plugins.lua @@ -190,7 +190,11 @@ return require("packer").startup(function(use) }, }) - use({ "nicwest/vim-http", opt = true, cmd = { "Http" } }) + use({ + "NTBBloodbath/rest.nvim", + requires = { "nvim-lua/plenary.nvim" }, + }) + use({ "vimwiki/vimwiki", opt = true, cmd = { "VimwikiIndex" } }) -- Local plugins can be included |