3 ms·
You can get lsp support with vim. I have a set up for that. The best part for me with neovim is that I can run a server and open things up as tabs from other
by jethro_tell 4y ago
You can get lsp support with vim. I have a set up for that. The best part for me with neovim is that I can run a server and open things up as tabs from other parts of my tmux session by pointing at the remote server.
I have a file browser (ranger) with a preview pane set up, I can select logs on a remote server and open the tmux select buffer as a new tab, I can pipe or redirect output into a tab.
It really brings my tmux terminal workflow into one cohesive system.
I can do everything else with vim that I can do with neovim, completion, linting, formating though a lot of that is either in a tmux pane below or pulled in as a shell command at the vim prompt. (though I'm probably not as hard core as some who do more with neovim)
But I can't replicate that remote setup.
- ThatGeoGuy 4y agoInteresting! I actually didn't know this - I've stuck to neovim lately because GUI support is somewhat better than gvim on Wayland (which I think is really just about qt more than anything, but I never really used gvim-qt). But yeah, tmux & vim together definitely changed a lot of my workflow when I'm not at my local machine. Now working away from "the office" is just a matter of ssh-ing into my machine and jumping into tmux. I do keep a pretty spartan config though, so I imagine I could do most of what I do in regular vim as well. ¯\_(ツ)_/¯
- jethro_tell 4y agoI do as well, I have about 10 key binds and a couple functions for using tabs, and a couple plugins for linters/language servers which I can do without. I have in my past done quite a bit of work out on prod hosts with vim so I don't like to get too out there from stock. everything works in vim with the exception of the server: When I start tmux I create a window: new-window -n "Code" 'cd ~/working; NVIM_LISTEN_ADDRESS=/tmp/code nvim ; bash -i' then split the window with my file browser: split-window -t 1.0 -h -p 20 'cd ~/working ; EDITOR="$HOME/bin/ranger-edit.sh" ; ranger ; bash -i' ranger edit is just a command that opens a file as a tab in the server and then switches tmux panes: FILEARGS="$@" nvr --servername /tmp/code --remote-tab $FILEARGS ; tmux selectp -t 0 Thats about it. I guess you have to have nvr installed. Other than that, I have a pretty sparse config all around. I do a similar thing where I set a global nvim_listen_address variable when I log in and I can use that to pipe to a different editor for things like logs and such. I don't generally want my ops work opening a bunch of tabs in my coding window but I could set it globally and use the single editor if I wanted to.
- yjftsjthsd-h 4y agoThat sounds amazing; as a neovim/tmux/ssh user already, can you point me in the right direction to get this? Just search "neovim lsp" and follow tutorials until I grok it?
- jethro_tell 4y agoi use coc plugin and plugged it's pretty straight and forward