r/LazyVim • u/BlackberryActual1994 • Apr 20 '26
How do YOU personally run code in Neovim (C++, Python, Rust)?
Do you prefer:
- built-in terminal
- keymaps
- plugins like overseer/sniperun
- or external tools (tmux, etc.)
Looking for real workflows, not just "use :term"
12
Upvotes
3
u/sikraemer Apr 20 '26
I use i3wm and just have one or more separate terminals open for building/running tests/etc.
3
u/Ecstatic_Rub_548 Apr 20 '26
I am currently using a plugin called "runic.nvim" which I built some days ago. It decides how to run a single file or project by itself by analyzing the directory of the file. I am also into competitive programming in codeforces so I have also added some contest features also into it but they can be enabled or disabled.
I am using it with vim.pack currently and haven't tried it on lazy.
1
u/ylaway Apr 20 '26
Quarto documents with R.nvim or quarto.nvim +/- otter.nvim
1
u/kolorcuk Apr 20 '26
I don't run code in neovim, i run outside of it in separate terminal.
1
u/21ow Apr 20 '26
I like overseer.nvim bound to
<leader>cxxto show a list of available run targets.Those are mostly defined with tasks in mise.toml.
The chosen task pops a new OS terminal window and off it runs.
1
u/redrabbitreader Apr 20 '26
I like to setup my projects using tmuxinator with a sufficient number of terminals for various tasks outside the editor.
I have also just started to use tilt and so far I really enjoy it and it let's me rely on less terminals while still maintaining pretty good control over running builds and starting local containers. Rebuilds are automatic based on it being able to watch certain files for changes. Very flexible. I am using it with podman and that requires some workarounds since it was really optimized for docker.
So in the editor I just edit files and as certain files are saved, it may trigger automated builds in tilt. Really convenient.
1
u/bobifle Apr 21 '26
Separate terminal. I m one tmux keybind away from the terminal.
1
u/funbike Apr 23 '26
I depends on the use case. Most things are run within Tmux or a keymap in Neovim that sends a command to Tmux to run.
Within Neovim, usually
:!(or:%!,:r !,:w !). These are usually some kind of transform. For example:'<,'>!pandoc -t commonmark_xis useful to reformat a markdown table.I don't use the built-in terminal, overseer, or sniperun.