Only warn of parsers needed by the current filetype#589
Conversation
|
The documentation and |
|
|
| if not has_parser(v, parsers) then | ||
| swarn( | ||
| string.format( | ||
| 'R.nvim requires the following tree-sitter parsers: "%s". Please, install them.', |
There was a problem hiding this comment.
Just one small thing
When v is the missing parser, table.concat(needed, ...) still concatenates the entire needed list, not just the missing one. ie. all parser in the table will be printed. I think?
There was a problem hiding this comment.
Initially, the needed is only {"r"}. The other parsers are inserted into the table according to the current value of filetype. So, they are all needed for the specific file being edited.
PMassicotte
left a comment
There was a problem hiding this comment.
All good! Just this message, I think it will print all the needed parsers, not just the missing one.
I see your point now. It might be better to be specific and warn about the missing one that triggered the warning. |
|
All good with me, maybe ok also to print all. I do not have preference in fact. Lets merge it? |
|
Thank you 👍 |
No description provided.