I've tried helix and got it running with rust quite easily, but I've found out that there's currently no easy way (aside from a hack that involves compiling a program from source) to get the program to open up with the cursor at its last position. I need this feature, so it's a non-starter for me. As far as I could tell, this is a bug that they still haven't solved.
I got vim working only to find that neovim is supposedly newer and better, so I'd like to get neovim running with rust. There are so many tutorials out there with different routes to take that's it's overwhelming to decide which is best for me.
Currently I'm just working on a small side-scrolling game (which was made by AI and I've been adding onto it, learning as I go).
So I'm looking not just for what to install but a guide that will show me exactly how to install everything and get the configs working.
Neovim has a version 1.0 planned which is supposed to make this easier (tree sitter, language server) - I think is 6 months away (April 1st - hope it is not a joke).
Both vim and neovim are active projects - but neovim is the one to use for the newer features.
Thanks for this. I've got many things to work perfectly.
However, I've been at it for about an hour trying to get this program to run a command with a shortcut, and it's not working for me. Tried about half a dozen AI methods. Tried a bunch of other methods suggested by people in posts.
This was so easy to setup in vim.
...
Found a solution!
Edit: .config/nvim/init.lua and add:
vim.keymap.set("n", "<leader>rr", ":!run-rust.sh %<CR>", { desc = "Cargo run + push to git" })
This is then activated by pressing the space bar and then 'r' and then 'r' again. It will then run the command 'run-rust.sh' with the current opened file ('%').
Another way is to edit the .config/nvim/init.lua file and add: