rcarriga / nvim-notify

A fancy, configurable, notification manager for NeoVim
MIT License
3k stars 80 forks source link

notify is expecting a maximum of only 2 arguments #130

Closed heygarrett closed 1 year ago

heygarrett commented 2 years ago

The docs say the notify function takes 1-3 arguments (msg, level and opts), but lua-language-server is giving me a warning and says the function only takes 2 arguments:

Screen Shot 2022-09-14 at 14 13 44
NVIM v0.8.0-dev-2548-gbf6de51f5-dirty
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by garrett@Garretts-MacBook-Pro.local

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/opt/homebrew/Cellar/neovim/HEAD-bf6de51_1/share/nvim"

Run :checkhealth for more info
rcarriga commented 1 year ago

AFAIK the Lua LS is not smart enough to infer the types of the module so it's likely from a type file you have from another plugin like lua-dev.nvim. If you use goto definition it should show where the type is defined.

heygarrett commented 1 year ago

If you use goto definition it should show where the type is defined.

It appears to be getting the definition from here: https://github.com/williamboman/mason.nvim/blob/main/lua/mason-core/notify.lua

I have no idea how to rectify that. 🤔 Thanks though!