ShinKage / idris2-nvim

Simple configuration and extra tools for NVIM + LSP + Idris2
MIT License
46 stars 8 forks source link

Properly handle semantic token errors #16

Closed gwerbin closed 2 years ago

gwerbin commented 2 years ago

Semantic token errors are reported as tables and not plain strings. They implement __tostring, so we can use tostring() to obtain human-readable error messages.

Without this change, semantic token errors triggered a traceback from vim.notify (because the input was not a string), and the actual error was not reported to the user.

This change should be backward-compatible, because tostring() is idempotent on strings.