JoosepAlviste / nvim-ts-context-commentstring

Neovim treesitter plugin for setting the commentstring based on the cursor location in a file.
MIT License
1.18k stars 35 forks source link

Required fields in ts_context_commentstring.Config #116

Closed EricDriussi closed 3 months ago

EricDriussi commented 3 months ago

When following the instructions for integrating with plugins with a pre-comment hook, I noticed my LSP complaining that languages, config and commentary_integration are required and missing. Looking at the class setup they are indeed set up as required but don't actually seem to be necessary. I'm guessing the class fields need to be updated as optional or the wiki needs to include them as well?

JoosepAlviste commented 3 months ago

The types were indeed not the best, unfortunately. Thanks for bringing this up!

I pushed a commit with some improvements, marking them as optional. Will close the issue but let me know if you notice any other problems with it 👍