Comments (10)
this looks really cool. when's the next release? :)
Thanks! For 0.3.0 I planned 'mini.doc' and 'mini.indentscope' as new modules. They need to be publicly beta-tested for a while (each at least couple of weeks). I also really want to create at least rudimentary tests for all modules, but that is a daunting task. But I'll try.
So, in short: in quite a while.
from mini.nvim.
The combination of text-object + motions + vizualisation is perfect and allowed me to ditch indent-blankline, vim-indent-object and vim-indentwise since I don't use all their features.
from mini.nvim.
A few ideas:
1. A toggle (to ensure opt-in) to show either the current indent, or, the current indent and all 'upstream | higher' indents up until the first one 2. Using `Yggdroot/indentLine` in combination with this module seems to have this module overlay lines over Yggdroot's lines. It would be nice if the two could be combined, however not sure if this is possible as I didn't come across any sign of using `extmark` in `Yggdroot/indentLine`, so a priority change would not easily fix this. Might be redundant if point 1 is taken into consideration
Seems to work well so far, cheers !
Thanks for the feedback, this is helpful!
About ideas:
- I considered implementing it for quite a while, but it proved to be a lot of small nuances which would make code more complicated. I might rethink this in the future, but at the moment I don't see it implemented here.
- Yes, 'mini.indentscope' will overlay those lines exactly because it uses extmarks. Unfortunately, currently it doesn't coexists well even with lukas-reineke/indent-blankline.nvim, which uses extmarks. The main reason is that Neovim at the moment doesn't (and probably won't ever) allow placing extmarks not near the text. This is an issue because I want vertical line to be shown correctly even on empty lines. So this means using approach from 'indent-blankline.nvim' - place extmark on first column with text mimicking padding. Current API of extmarks allows different highlighting groups for different parts of text, but not different priorities. This is why I created neovim/neovim#17366. If it gets implemented, then I'll make whitespace padding have a very low priority so that it will get overlaid by extmarks from 'indent-blankline.nvim'. However, I don't have my hopes high because it seems like a difficult feature to implement. Maybe allowing placing extmarks on any screen position might be even simpler :)
from mini.nvim.
Thank you all for beta-testing 'mini.indentscope'! I made new release (hey, @hunleyd), so it is now not in beta any more.
from mini.nvim.
Beautiful! I've wanted something like this!
I don't like that it's animated by default. IMO, it goes against the spirit of Vim where everything happens as fast as possible. But it's easy to turn off the animation, so it's not that much of a problem.
from mini.nvim.
Yeah, I've had this exact thought today just before the release. I just really like the animation outcome and how I got there implementation-wise. And technically, it does happen as fast as possible, because it is non-blocking :)
from mini.nvim.
this looks really cool. when's the next release? :)
from mini.nvim.
Turning this into a toggle-able command would not be super useful, right? Its basically the same thing as :set cursorline
at that point, with some goodies like text objects, cool animations, and whatnot.
from mini.nvim.
Turning this into a toggle-able command would not be super useful, right? Its basically the same thing as
:set cursorline
at that point, with some goodies like text objects, cool animations, and whatnot.
Not sure, what exactly you mean here.
Some possibilities:
- There are
vim.{g,b}.miniindentscope_disable
to enable/disable/toggle automated visualization. Toggle here is done with:lua vim.g.miniindentscope_disable = not vim.g.miniindentscope_disable
. - There are
MiniIndentscope.draw()
andMiniIndentscope.undraw()
for manual drawing and undrawing of visual indicator. There is nodraw_toggle()
or exported indicator of drawing status to manually implement "perfect"draw_toggle()
, but it might be done using variables from previous bullet and/or settingdraw.delay
to a very large value. Didn't do it, because it wasn't the main point of this module, but not opposed to it. If you describe your intended usage, we can work something out.
from mini.nvim.
A few ideas:
- A toggle (to ensure opt-in) to show either the current indent, or, the current indent and all 'upstream | higher' indents up until the first one
- Using
Yggdroot/indentLine
in combination with this module seems to have this module overlay lines over Yggdroot's lines. It would be nice if the two could be combined, however not sure if this is possible as I didn't come across any sign of usingextmark
inYggdroot/indentLine
, so a priority change would not easily fix this. Might be redundant if point 1 is taken into consideration
Seems to work well so far, cheers !
from mini.nvim.
Related Issues (20)
- [mini.tests] conditional `quit_on_finish` option or API to determine if tests failed? HOT 2
- Can't disable local session in mini.sessions HOT 1
- return keyword in mini.base16 HOT 2
- [mini.jump2d] Lua mappings for start_jumping_forwards and start_jumping_backwards HOT 1
- Mini.ai breaks `vim.on_key()` in combination with some other plugins HOT 3
- Italic options for mini.hues HOT 1
- mini.files to work better without acd HOT 1
- (misc): setup_termbg_sync reset can spuriously fail HOT 9
- Add git log --graph functionality like rbong/vim-flog HOT 1
- Strange `gs` mapping with `Sleep` comment HOT 3
- Invalid `cwd` passed to `H.git_cli_output` in `MiniGit.show_at_cursor` temporarily hangs Neovim HOT 1
- (misc): `setup_termbg_sync` breaks firenvim HOT 1
- Follow global system-wide dark mode preference HOT 1
- mini.splitjoin - Golang requires an additional `,` on the last argument HOT 2
- mini.animate scroll to respect scrolloff settings HOT 1
- mini.clue default bindings support HOT 1
- mini.run: simple run configs manager in your editor HOT 2
- mini.statusline: disable statusline per buffer HOT 1
- mini.git: when visiting the diff file of HEAD, `show_at_cursor()` opens the current file instead of a snapshot HOT 6
- mini.starter fuzzy find HOT 1
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 mini.nvim.