Use child name to append text after parent

Instead of providing the number of childs to append after the parent, it
will append the comment just after the first child encountered with
child_name
This commit is contained in:
Daniel Mathiot
2021-08-23 15:23:27 +02:00
parent 03781f23d6
commit 46febe447c
2 changed files with 10 additions and 3 deletions

View File

@@ -28,7 +28,7 @@ return {
template = {
annotation_convention = "google_docstrings", -- required: Which annotation convention to use (default_generator)
append = { position = "after", child_number = 3 }, -- optional: where to append the text (default_generator)
append = { position = "after", child_name = "block" }, -- optional: where to append the text (default_generator)
use_default_comment = false, -- If you want to prefix the template with the default comment for the language (default_generator)
google_docstrings = {
{ nil, '"""' },