This repository was archived by the owner on Feb 12, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 41
vim.ui.input clashes with rest.nvim #172
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Dressing seems to clash with rest.nvim. When rest.nvim reads in input using with vim.ui.input using dressing.nvim an error is thrown. If I remove dressing.nvim it works. It also works with noice.nvim's vim.ui.input modification.
System information
- OS: linux
- Neovim version: v0.11.0-dev-794+gf01c764cc
- Is this related to a specific
vim.ui.selectbackend? If so, which one? - Dressing config:
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
'git',
'clone',
'--filter=blob:none',
'https://github.com/folke/lazy.nvim.git',
'--branch=stable', -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require('lazy').setup({
{
"rest-nvim/rest.nvim",
dependencies = 'nvim-treesitter/nvim-treesitter',
},
{
'stevearc/dressing.nvim',
opts = {}
}
})To Reproduce
Steps to reproduce the behavior:
-
nvim -u path/to/config -
Input the following to your buffer:
@host = https://api.github.com # @prompt host Host to send the request GET /users/{{user}} Host: {{host}} user-agent: neovim
-
:Rest run -
rest.nvim tries to read from
vim.ui.input, but the following error is thrown:
Error executing Lua callback: /usr/share/nvim/runtime/lua/vim/treesitter.lua:217: Index out of bounds
stack traceback:
[C]: in function 'nvim_buf_get_text'
/usr/share/nvim/runtime/lua/vim/treesitter.lua:217: in function 'get_node_text'
.../share/nvim/lazy/rest.nvim/lua/rest-nvim/parser/init.lua:41: in function 'get_node_field_text'
.../share/nvim/lazy/rest.nvim/lua/rest-nvim/parser/init.lua:264: in function 'parse_variable_declaration'
.../share/nvim/lazy/rest.nvim/lua/rest-nvim/parser/init.lua:465: in function 'parse'
...ocal/share/nvim/lazy/rest.nvim/lua/rest-nvim/request.lua:111: in function 'run'
...cal/share/nvim/lazy/rest.nvim/lua/rest-nvim/commands.lua:125: in function 'impl'
...cal/share/nvim/lazy/rest.nvim/lua/rest-nvim/commands.lua:309: in function <...cal/share/nvim/lazy/rest.nvim/lua/rest-nvim/commands.lua:297>
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working