rest-nvim / rest.nvim

A fast Neovim http client written in Lua
GNU General Public License v3.0
1.61k stars 142 forks source link

feat: add buffer_name option #267

Closed davidsierradz closed 2 months ago

davidsierradz commented 11 months ago

Hi! It would be nice to have the ability to keep multiple result buffers open at the same time, like in diepm/vim-rest-console, I'm guessing adding an option would be the most flexible way.

You could check a buffer variable like in vim-rest-console:

buffer_name = function()
  return vim.b.rest_nvim_result_buffer or 'rest_nvim_results'
end

Thanks, let me know any questions or review' comments.

boltlessengineer commented 2 months ago

I’m a bit afraid to allow buffer_name option. As now rest.nvim creates multiple buffers for each result UI panes, allowing custom buffer name might allow users to break things unintentionally. We can support multiple result buffers in first place with response saving feature (#359)