Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type annotations for vim.fn.setreg are incorrect #27619

Closed
bmendric opened this issue Feb 25, 2024 · 1 comment · Fixed by #27631
Closed

Type annotations for vim.fn.setreg are incorrect #27619

bmendric opened this issue Feb 25, 2024 · 1 comment · Fixed by #27631
Labels
bug issues reporting wrong behavior

Comments

@bmendric
Copy link

Problem

Current type annotations for vim.fn.setreg are as follows:

--- @param regname string
--- @param value any
--- @param options? table
--- @return any

The options parameter, I believe, should be string rather than table.

Steps to reproduce

nvim --clean
:lua vim.fn.setreg("+", "fails", { "c" })
:lua vim.fn.setreg("+", "works", "c")

Expected behavior

vim.fn.setreg either accepts a table or the type annotations are updated to show a string

Neovim version (nvim -v)

0.9.5

Vim (not Nvim) behaves the same?

kinda? but not really?

Operating system/version

openSUSE Tumbleweed 20240207

Terminal name/version

alacritty 0.13.1

$TERM environment variable

screen-256color

Installation

Unpacking nvim-linux64.tar.gz from GitHub Releases

@bmendric bmendric added the bug issues reporting wrong behavior label Feb 25, 2024
@bmendric
Copy link
Author

Related to folke/neodev.nvim#150

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issues reporting wrong behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant