rcarriga / nvim-notify

A fancy, configurable, notification manager for NeoVim
MIT License
3.03k stars 81 forks source link

Correct type of direction variable. It M.DIRECTION values are strings. #185

Closed andradei closed 1 year ago

andradei commented 1 year ago

Minor documentation corrections:

M.DIRECTION values are all strings, Lua LSP detected the type error while the values in function calls were correct. Example:

In

local next_row = stages_util.available_slot(state.open_windows, next_height, stages_util.DIRECTION.BOTTOM_UP)

stages_util.DIRECTION.BOTTOM_UP is a string, and is the correct value that should be used here. But since the available_slot method was expecting an integer, LSP complained (even though the code still works since lua is dynamically typed).

Same with window_intervals method.

rcarriga commented 1 year ago

Thanks for the PR! :smile: