diff --git a/README.md b/README.md index dbfdef8..d03ad5b 100644 --- a/README.md +++ b/README.md @@ -55,10 +55,10 @@ use { - If you want to keep it simple, you can use the `:Neogen` command: ```vim -" will generate annotation for the function you're inside +" will generate annotation for the function, class or other relevant type you're currently in :Neogen -" or you can force a certain type of annotation. -" It'll find the next upper node that matches the type +" or you can force a certain type of annotation with `:Neogen ` +" It'll find the next upper node that matches the type `TYPE` " E.g if you're on a method of a class and do `:Neogen class`, it'll find the class declaration and generate the annotation. :Neogen func|class|type|... ``` diff --git a/lua/neogen/init.lua b/lua/neogen/init.lua index 90534a9..50e9d99 100644 --- a/lua/neogen/init.lua +++ b/lua/neogen/init.lua @@ -241,6 +241,11 @@ end --- --- Note: We will only document `major` and `minor` versions, not `patch` ones. (only X and Y in X.Y.z) --- +--- ## 2.11.0~ +--- - Calling `:Neogen` will try to find the best type used to generate annotations (#116) +--- It'll recursively go up the syntax tree from the cursor position. +--- For example, if a function is defined inside class and the cursor is inside the function, +--- the annotation will be generated for the function. --- ## 2.10.0~ --- - Add support for Throw statements in python --- Note: only active for reST template as of right now (please open an issue request for more templates) @@ -285,7 +290,7 @@ end --- with multiple annotation conventions. ---@tag neogen-changelog ---@toc_entry Changes in neogen plugin -neogen.version = "2.10.3" +neogen.version = "2.11.0" --minidoc_afterlines_end return neogen