Comments (13)
I'm looking cursor.lua
, just using a singleton table for the positions is enough. Using extmarks is overkilled, less stable, and has more side-effects for Neovim.
from neogen.
No, the code is a little bit messy lol (I did not have a good understanding of Lua at the time)
I think the code that is messy is really inside the granulator and generator, so maybe we could start from there.
I'm currently improving the templates part, and providing some docs and API for it.
Feel free to open a PR, and let me know what do you plan to refactor ;)
Thanks for your contribution !
from neogen.
Sure, thanks for your contribution ! 💯
from neogen.
Are you using extmarks because you want to support inserting a new line for the comments? If yes, I think must use extmarks or marks, but extmarks are better than the limited marks.
from neogen.
What do you mean exactly ?
from neogen.
Once the template is generated, the positions are computed that are immutable, but the position of extmarks are mutable.
:h extmarks
Extended marks (extmarks) represent buffer annotations that track text changes
in the buffer. They can represent cursors, folds, misspelled words, anything
that needs to track a logical location in the buffer over time.
from neogen.
Oh yeah, I use extmarks because we can jump between annotation types even after we create some annotation and modify the lines
from neogen.
Thanks, I will deep into the codebase and refactor it later, maybe tomorrow or the day after tomorrow.
from neogen.
No problem, take your time, feel free to ping me if you need anything
from neogen.
Why
neogen/lua/neogen/generators/default.lua
Line 96 in 271260c
from neogen.
Why
neogen/lua/neogen/generators/default.lua
Line 96 in 271260c
may be a function type? I can't find and grep any information about this.
Yes, during initial development it was assumed we could pass templates as functions, but I guess we'll not use them anymore. Even the granulator and generator, I'm not really found of creating your own.
Maybe we could simplify the process by making granulator and generator a default one, and only make templates and locators modifiable.
Because right now, the generator is used everywhere and with some special options..
from neogen.
Why
neogen/lua/neogen/generators/default.lua
Line 96 in 271260c
may be a function type? I can't find and grep any information about this.
Yes, during initial development it was assumed we could pass templates as functions, but I guess we'll not use them anymore. Even the granulator and generator, I'm not really found of creating your own. Maybe we could simplify the process by making granulator and generator a default one, and only make templates and locators modifiable. Because right now, the generator is used everywhere and with some special options..
Thanks, refactor is going to be done, WIP in my local repo.
Maybe we could simplify the process by making granulator and generator a default one, and only make templates and locators modifiable.
I'm doing this idea, but I have no idea how to write the doc and tell the users what's the change is breaking.
from neogen.
I'm doing this idea, but I have no idea how to write the doc and tell the users what's the change is breaking.
No worries, I will update the docs in your pr before merging
from neogen.
Related Issues (20)
- Python bug - nested functions should not have their first parameter removed
- Empty types in jsdoc HOT 4
- Highlight groups of block after docstring changes after completion of final choice node HOT 1
- This structure cannot generate annotations through neogen
- Module 'neogen.types.template' not found
- Feature Request - Support NeoVim native snippet engine HOT 2
- `Invalid 'end_col': out of range` error whenever running `Neogen file` HOT 2
- Bug: handling of arbitrary args and kwargs with type hints HOT 1
- Allow generating explicit sections HOT 3
- Update / Correction command HOT 2
- Python - raise module_name.Error() is not detected
- Bug: Neogen not functioning in vue files. HOT 2
- Could not get neogen to work with LazyVim HOT 4
- Need unittests HOT 1
- Missing blank line in numpydoc
- Option to always disable writing argument types in Python HOT 2
- FR: support creating annotations in Markdown code blocks HOT 1
- Sometimes native snippets do not expand on tab
- Add support for records in C# HOT 2
- Support annotating interfaces HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neogen.