by ThatGeoGuy · 4y ago · 0 comments
One thing I'm not so sure of though -- the justification for neovim seems to be partially due to needing a pretty recent version (at least newer than 0.5.0, for LSP features). There seems to be a big portion of vim users who seem to dump on neovim for one reason or another as some kind of meme, but I'm not sure that I agree about it being bloated or whatever. If I have to run Slack for work next to neovim / vim, I'm pretty sure I know what is using the majority of my system resources... Anyways, back to needing a recent version of neovim: I think the author could probably get by with just regular vim + extensions if they didn't use LSP stuff.
To be honest, I still haven't really used LSP much, and most of my experience using similar features in other products (Intellisense in Visual Studio, whatever the equivalent broken thing in Xcode is called) is that it really was never that useful? Maybe I'm misunderstanding something and it's just not good for me and my workflow, but I feel like a lot of newer devs seem to enable it and declare that they can't work with anything that doesn't support it. For a long time I've avoided such features since they often seem to have poor performance (Xcode's version of such has definitely taken down a Macbook Pro on me before), or just generally don't add much to the experience other than some coloured lines under parts of my code.
A good compiler (e.g. rustc) and corresponding linter for static analysis (e.g. cargo clippy) are actually pretty good on their own! This isn't true for every language out there, and maybe that's where LSPs are more useful - the Typescripts / Pythons / Javas of the world! I don't know if I'm over-simplifying it though. Either way, I'm pretty sure my point is that whether you choose vim or neovim, it's a great idea to sit down and spend a good chunk of time just getting better at using your tools. It's the kind of exponential improvement that won't even seem egregious a year down the line.
It's useful especially when you're switching many languages, or working with new libraries.
Syntax error is immediately highlighted. Saves a context switch of changing to compiler tab and back to editor.
With every symbol, you can view documentation by hovering. When autocompleting also, a small window/popup shows docs for currently selected symbol.
You have automated refactoring available in-place, especially renaming. In most LSP it renames across all files and modules.
Granted it's not that useful if you're in-and-out familiar with the stack you're working on. But once in a while you still need to switch languages and use new libraries it will be useful.
I can't go back to pre-LSP world.
I do think if folks find LSPs useful they should keep using them. I might even be convinced one day! But at the moment I find I'd rather not. Vim's default auto-complete functionality is actually fine enough for me most of the time, so I might actually be weird here.
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.
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. ¯\_(ツ)_/¯
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.
No, they are not useful
I have been using IDE for sometimes, none of the features helped me to solve very complex logic in the codebase. I have to debug, test and trace the errors manually
And those who often refactor their code (with their IDE), I don't know if they are designing the architecture correctly. Once in a while is fine, but if they are doing too much of that, yea probably they are messing up the codebase. I don't really want to work with somebody like this, imagine that you have to solve the errors that they produce and IDE doesn't actually help at all