-
-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check if generation possible for current cursor position #132
Comments
You could use tree-sitter and simply detect all classes, functions, etc. |
If it is desired for the project or someone else is interested, I implemented a feature here triggering neogen for the node one line below. I am using it in combination with a keymap, so that a comment in the line above e.g. a function triggers neogen (comparable to the behavior in Jetbrains IDEs). |
Seems a very cool feature. However, I fall short understand what it needs to trigger neogen for the node one line below. If you are still interested in sharing, would you mind sharing a bit more ? |
Generating under the current cursor is possible. In fact it's needed for #201 I added integration with LuaSnip + Neogen in a separate example: #202 Being able to generate docstring code at any cursor position I think would be a welcome thing. |
Hi,
I am thinking about combining neogen with the lsp code actions. For that, I would like to check if it is possible to generate a comment at the current cursor position. If there is, I would like to display an option like "Generate comment" in the code action window.
I checked the API and it looks like right now it is only possible to trigger the generation, even if it is not at the cursor position. Is that correct?
Would be great if there was a way to check that. In case thats not available and not planned I offer help with implementation, if needed.
The text was updated successfully, but these errors were encountered: