Skip to content

Getting "opt: expected table, got string" #408

@SuperCuber

Description

@SuperCuber

Wanted to try the plugin out. Installed using lazy, opened a test.http file and typed GET http://localhost:3000/ in it, then :Rest run

The vertical split opens but I get an error:

Error executing Lua callback: .../share/nvim/lazy/rest.nvim/lua/rest-nvim/parser/init.lua:189: opt: expected table, got string
stack traceback:
	[C]: in function 'error'
	vim/shared.lua: in function 'validate'
	.../share/nvim/lazy/rest.nvim/lua/rest-nvim/parser/init.lua:189: in function 'eval_context'
	.../share/nvim/lazy/rest.nvim/lua/rest-nvim/parser/init.lua:370: in function 'parse'
	...ocal/share/nvim/lazy/rest.nvim/lua/rest-nvim/request.lua:112: in function 'run'
	...cal/share/nvim/lazy/rest.nvim/lua/rest-nvim/commands.lua:106: in function 'impl'
	...cal/share/nvim/lazy/rest.nvim/lua/rest-nvim/commands.lua:276: in function <...cal/share/nvim/lazy/rest.nvim/lua/rest-nvim/commands.lua:264>

I see in the code

vim.validate("source", source, "number")

There on that line a call to vim.validate with several arguments. According to :help vim.validate on my neovim version v0.10.1, it takes a single parameter opt that is a table. Am I missing something does this plugin just not work?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions