[Guide/Discussion] Neovide as a terminal #3123
Replies: 1 comment
-
I've made a few tweaks so thought I'd update. Neovide really is a first class terminal with this setup, I haven't found anything other than tmux/zellij that are going to be an issue with it. If you're on nix and want to test out my implementation run:
You'll need my shell rc from above to run nvim inside it properly. I'm using nixvim but my basic config for neovide terminal mode is here: https://github.com/TRPB/neovim-nix/blob/master/config/neovide-terminal.nix The important pieces I've changed are:
I'm using
with:
Being able to hit I did play around with enabling lualine in normal mode scroll buffer navigation but it causes problems with the stl horizontal separator. If you want that just add I'll take a look at lualine and raise a PR if I can find a fix, I think we just need to stop (or noop) the refresh timer if the filetype is disabled |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Neovide is great. The animations in particular make it feel fun to work with. Kitty recently implemented a cursor trail but it's only 90% of the way there. And it's still missing the blur, slide animations and other stuff in neovide.
There was a discussion here about implementing a general purpose terminal: #1875
I've been playing around with doing so and thought I'd share my config.
Aims
Limitations
Everything will have to be done through neovim's terminal feature.
Implementation
nvim
command so that it sets the CWD in the running nvim instance.The idea here is that the shell command
nvim
is context-aware. If it's running inside an nvim terminal, have it set nvim's CWD. I'm using fish shell so I added the following to my config, it would be simple enough to port to bash/zsh:This does a few things:
:Alpha
, replace that with the command that starts your greeter.nvim file.txt
it opens the file (it won't support any other launch options likenvim -c
That way you can do exactly as you do in a normal terminal
That's all you need really ,the rest is normal nvim config.
For completeness, here's my config for multiplexing which mimics my kitty setup. Alt+Return opens a new tab, Alt+Space opens a horizonal split, and Alt+Left/Right moves between tabs
Issues/limitations
I'll point out these are neovim issues, not neovide's
bbciw
to change a word. That doesn't work so you'll still need an implementation in your shell for thatBenefits
Being able to navigate the scroll buffer using native vim motions (Ctrl-O for normal mode and navigate away).
Marks in the scroll buffer!
Smooth scrolling and cursor animation work surprisingly well
One set of configuration, I don't need to sort out my kitty/wezterm/ghostty config/keybinds and my neovim config
Beta Was this translation helpful? Give feedback.
All reactions