Error on unsupported #212
Replies: 1 comment 1 reply
-
Here's my take:
It's "impossible" to get this error/crash unless you try something funny like comment json or text file, which i would call undefined behavior, in that case this panic make sense to me. And second reason for using Comment.nvim/lua/Comment/utils.lua Line 176 in 350bf0c |
Beta Was this translation helpful? Give feedback.
-
Hey, really nice plugin, I love using it.
The other day I tried to use it on a JSON file. I forgot it wasn't possible to comment JSON, but after I did I received this error message:
It's totally correct for the plugin to refuse to comment in a language that hasn't that feature.
But what I would suggest is avoiding to crash and break the user experience.
The plugin could show a yellow message under the statusline with something like
For example, in
nvim-lspconfig
, when a Language Server crashes, it's reported this way.Thanks for your time and your awesome plugin
Beta Was this translation helpful? Give feedback.
All reactions