neodev.nvim icon indicating copy to clipboard operation
neodev.nvim copied to clipboard

bug:

Open ivyl opened this issue 2 years ago • 0 comments

Did you check docs and existing issues?

  • [X] I have read all the neodev.nvim docs
  • [X] I have searched the existing issues of neodev.nvim
  • [X] I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

0.9.5

Operating system/version

Linux

Describe the bug

function vim.fn.bufname(buf) end
--- @param buf? buffer

buffer is an alias to integer but that function takes string (e.g. "%", "$")

Steps To Reproduce

  1. type vim.fn.bufnr("%") in your init.lua
  2. get:
param-type-mismatch: Cannot assign `string` to parameter `integer?`.
- `string` cannot match `integer?`
- Type `string` cannot match `nil`
- Type `string` cannot match `integer`

Expected Behavior

no lsp errors

Repro

No response

ivyl avatar Feb 07 '24 16:02 ivyl