-
Notifications
You must be signed in to change notification settings - Fork 25
docs: update refactoring.nvim capabilities #175
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
base: main
Are you sure you want to change the base?
Conversation
@@ -240,25 +240,25 @@ should be used. | |||
| ------------------------------------------------------------------------ | ------------------------------ | ----------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------- | -------------------------------------------------------------------- | --------------------------------------------------- | ----------------------------------------------------- | | |||
| Include line numbers in log lines | :+1: | :+1: (via user config) | :+1: (via user config) | :+1: | :+1: | :x: | :+1: | | |||
| Include other location information in log lines | :+1: | :x: | :+1: (via user config) | :+1: | :+1: | :x: | :+1: | | |||
| Persistent location counter between NeoVim sessions | :+1: | :x: | :x: | :x: | :x: | :x: | :x: | | |||
| Persistent location counter between NeoVim sessions | :+1: | :x: | :x: | :x: | :+1: (depends on buffer state, not tracked internally in Lua) | :x: | :x: | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this. What does this mean? As best as I can tell from the documentation, refactoring.nvim doesn't support a location counter at all (I mean a monotonically increasing counter to help distinguish lines). I can't actually get refactoring.nvim to work for me right now (I'm seeing refactoring.nvim/lua/refactoring/debug/printf.lua:65: assertion failed!
whatever I do) so I can't see it working in practice...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is an example of this working. Instead of keeping track inside of the lua code of what parts of the buffer have debug print statements, it counts all of them each time a new one is inserted in the buffer and modifies them accordingly. This is only implemented for printf
not print_var
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I've left just a few comments here to make sure we're talking about similar / equivalent capability (quite possible I should make some of my descriptions more self-explanatory too).
@@ -267,14 +267,14 @@ should be used. | |||
| Extra visual emphasis of log statements | :+1: Highlights inserted lines | :+1: Flashes to highlight lines on insertion | :+1: status line counter, signcolumn, line-highlight, scrollbar | :x: | :x: | :x: | :x: | | |||
| Can insert logs in batches | :+1: (using registers) | :+1: | :x: | :x: | :x: | :x: | :x: | | |||
| Log watcher mechanism | :x: | :+1: | :x: | :x: | :x: | :x: | :x: | | |||
| Dynamic filetype configuration/log templates | :+1: | :x: | :x: | :x: | :x: | :x: | :x: | | |||
| Completely customizable log templates | :x: | :+1: | :+1: | :+1: | :x: | :x: | :x: | | |||
| Dynamic filetype configuration/log templates | :+1: | :x: | :x: | :x: | :+1: | :x: | :x: | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. How does one configure the dynamic filetype configuration? In the README I only see an example of statically configuring it at setup()
time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The setup function simply modifies values in a Lua table. So, modifying it multiple times (i.e. in a filetype plugin) is supported. Or did you meant using functions as configuration values? If it's the later, I can also remove this capability. It may have been a misunderstanding on my side
42fca8e
to
4a2822d
Compare
I'm the current maintainer of
refactoring.nvim
, so I updated the README to better reflect its current capabilities.