dmmulroy / ts-error-translator.nvim

MIT License
226 stars 5 forks source link

fix: improve translation error detection #25

Closed mehalter closed 6 months ago

mehalter commented 6 months ago

This improves the error detection by not necessarily requiring the number of matches to equal the number of parameters. This happens when the number of parameters are 0 but there is a quoted string in the message. It should only error if it is unable to retrieve a specific match.

This also has some performance stuff by doing less if there are no errors or parameters

mehalter commented 6 months ago

here is an example of an error code that didn't work because it has no parameters but does have 'const' in the diagnostic text

image

mehalter commented 6 months ago

Nah for reals, no worries at all! I'm glad to help out! I am the maintainer of AstroNvim and the users over on our discord have been excited about your plugin and getting it into the AstroNvim ecosystem!