Skip to content

Commit

Permalink
vim-rest-console 설정, response json 까지 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
deptno committed Oct 29, 2023
1 parent 3fd855a commit 0597455
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
11 changes: 0 additions & 11 deletions after/ftplugin/http.lua

This file was deleted.

8 changes: 8 additions & 0 deletions lua/custom/autocmd.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,11 @@ vim.api.nvim_create_autocmd("SessionLoadPost", {
vim.cmd(':clearjumps')
end,
})
vim.api.nvim_create_autocmd({ "BufNewFile", "BufReadPost" }, {
pattern = { "*.rest", "*.http" },
group = vim.api.nvim_create_augroup("SetRestFileType", { clear = true }),
callback = function(ev)
vim.api.nvim_buf_set_option(ev.buf, "filetype", "rest")
vim.api.nvim_buf_set_var(ev.buf, "vrc_output_buffer_name", string.sub(ev.file, 1, -6) .. ".json")
end,
})
7 changes: 7 additions & 0 deletions lua/custom/plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,13 @@ return {
end,
event = 'VeryLazy',
},
{
"diepm/vim-rest-console",
config = function ()
vim.g.vrc_curl_opts = { ["-s"] = "" }
end,
ft = { "rest" },
},
{
"NeogitOrg/neogit",
dependencies = {
Expand Down

0 comments on commit 0597455

Please sign in to comment.