3 ms·
> e.g. I wanted to have a function header visible in the first line of editor even when the top of the function has scrolled off the screen This sounds super-u
by endorphine 4y ago
> e.g. I wanted to have a function header visible in the first line of editor even when the top of the function has scrolled off the screen
This sounds super-useful. Do you mind sharing how you achieved this?
- lancebeet 4y agoThere are a couple of plugins that do this. For vim: https://github.com/wellle/context.vim https://github.com/wellle/context.vim For neovim (much higher performance in my experience): https://github.com/nvim-treesitter/nvim-treesitter-context https://github.com/nvim-treesitter/nvim-treesitter-context I believe there's now also a VS code plugin for the same behavior, but I don't know what it's called.
- ndand 4y ago> I believe there's now also a VS code plugin for the same behavior, but I don't know what it's called. It's called "sticky scroll". It's a relatively new feature of VS Code.
- pjot 4y agoIt actually ships with vscode! https://code.visualstudio.com/updates/v1_70#_editor-sticky-scroll https://code.visualstudio.com/updates/v1_70#_editor-sticky-s...
- code-blooded 4y agoSure thing! https://github.com/nvim-treesitter/nvim-treesitter-context https://github.com/nvim-treesitter/nvim-treesitter-context is what I use nowadays. It has a little clip demonstrating how it works so you'll instantly know if you want it or not ;)