5 ms·
What setup/plugins do you recommend for using Neovim as an IDE replacement? I use vi for minor text editing but have never used it for development.
by greymalik 4y ago
What setup/plugins do you recommend for using Neovim as an IDE replacement? I use vi for minor text editing but have never used it for development.
- Ian_Macharia 4y agoLunarvim is a pretty solid choice and comes fully stocked with cool plugins that match most of the popular editors out there. Sometimes I even forget i'm in a terminal.
- ablob 4y agoDepending on what you deem to be a suitable replacement i'd recommend: nvim-telescope/telescope.nvim // integrates well with code actions and searching (very extensible in general, similar to ctrl-p) hrsh7th/nvim-cmp hrsh7th/cmp-nvim-lsp // for language server completion neovim/nvim-lspconfig // a bunch of language server specific stuff note, that you'll probably need a bit of time to configure it to your liking and that nvim doesn't install the language server by itself, so that is something that you need to take care of by yourself as well. If you want to see what a preconfigured IDE-replacement might look like you can take a look at lunarvim(but beware, it misbehaves on windows quite a bit, you're better of with a linux system here)
- tonto 4y agolsp-zero is a good way to get a completion running without configuring many plugins...it installs several of the above.
- lelandbatey 4y agoThere's really only one "class" of plugin that's a "must have" to turn Vim (Vim or Neovim) into an IDE replacement and that's some kind of Language Server integration; there are several you could pick, they all allow your Vim to automatically start and talk to a local Language Server, giving you all the fancy autocomplete/go-to-definition/inline documentation/etc that you expect from an IDE. Otherwise, I dunno, maybe a nice color theme? Probably the only one I really depend on that's not part of "general" vim is the FZF plugin, which lets me rapidly and quickly fuzzy search for files by their name anywhere in the folder I'm in.
- adriand 4y agoI use Neovim all the time but although I do have some linters installed I find all the fancy stuff so much worse than in a more visually appealing editor. I love vim and I do have a lot of affection for the terminal but things get extremely visually noisy with language servers in a way they just don’t with a more graphical interface. It sucks because I want to use vim for TypeScript dev but I just can’t stand it compared to VS Code. For non-typed languages I still use vim, and I love how I can fluently edit anything on servers I shell into, but I kind of wish there was a middle ground of some kind.
- gpanders 4y agoCan you explain what you mean by “visually noisy”? If you’re referring to the diagnostics messages (virtual text and signs and such), that is easily configurable to disable (I would know, I wrote it)
- adriand 4y agoI mean like all the stuff that displays in and around the code, that isn’t the code itself. For example warnings, hints, etc. An obvious example of something you can’t do in Neovim is display information in a smaller font. Generally speaking you just don’t have nearly as many options for creating information hierarchies in a UI consisting of ASCII characters. In terms of turning things off, if you turn them off, then what’s the point of having the language server? (Not a rhetorical question - I would describe myself as a workaday programmer, not a master by any means.)
- gpanders 4y ago>In terms of turning things off, if you turn them off, then what’s the point of having the language server? Code navigation and completion, for one. But there are plenty of knobs to turn that provide a spectrum between “show nothing” and “show everything”. I also find the inline diagnostic text noisy, so I configure it to only show on the line where my cursor is. You can also use the “open_float” function to open the diagnostics on your current line in a floating window. That way you can leave them off my and simply view them on-demand.
- jmcphers 4y agoIn addition to all the language servers folks have already pointed to, Github Copilot works -- surprisingly --- great in Neovim. Tim Pope (author of fugitive and many other popular Vim plugins) wrote the integration. https://github.com/github/copilot.vim https://github.com/github/copilot.vim
- acapybara 4y agoHave this running in Termux on my phone. Copilot + nvim + Termux makes it reasonable to code on a phone.
- reissbaker 4y agoI've had great success with coc.nvim for IDE-like features; it manages language servers for you: https://github.com/neoclide/coc.nvim https://github.com/neoclide/coc.nvim For file browser side-panes there are tons of options, but no one ever got fired for using the venerable old NERDTree. The rest is mostly just tmux!
- markmaglana 4y agoI still haven’t made the transition to Neovim in favor of stability, but here’s part of my dotfiles repo that installs all the plugins that I use with Vim: https://github.com/relaxdiego/dotfiles/blob/main/run_once_070_install_vim_plugins.sh.tmpl https://github.com/relaxdiego/dotfiles/blob/main/run_once_07...
- lizardking 4y agoI use a lot of them, many specific to my work, but here are some of the ones that I think will most improve the quality of life for most developers. - For a plug-in manager I user packer - For file/text search I recommend telescope (https://github.com/nvim-telescope/telescope.nvim https://github.com/nvim-telescope/telescope.nvim) - Copilot (https://github.com/github/copilot.vim https://github.com/github/copilot.vim) - Nerd tree for file browsing (https://github.com/preservim/nerdtree https://github.com/preservim/nerdtree) - commentary for commenting (https://github.com/tpope/vim-commentary https://github.com/tpope/vim-commentary) - ALE for linting (https://github.com/dense-analysis/ale https://github.com/dense-analysis/ale) - Mason for installing LSP servers (https://github.com/williamboman/mason.nvim https://github.com/williamboman/mason.nvim) Once you have the proper tooling in place you can do pretty much everything in vim that you are doing in vs code or intelliJ. I've just started using it for most of my dev work recently and I have found ThePrimeagen's youtube videos on vim to be a great resource. Series on using vim as you editor (https://www.youtube.com/playlist?list=PLm323Lc7iSW_wuxqmKx_xxNtJC_hJbQ7R https://www.youtube.com/playlist?list=PLm323Lc7iSW_wuxqmKx_x...) Introduction to setting up your vim configuration (https://www.youtube.com/watch?v=x2QJYq4IX6M&t=512s https://www.youtube.com/watch?v=x2QJYq4IX6M&t=512s) I recommend giving it a try. The process of learning it all was fun, and as you may have heard you can eventually get pretty quick using Vim.
- thomasahle 4y agoIs there an LSP that allows refactoring Python code like PyCharm? I haven't found any other tools that does simple things like extracting a function, renaming or inlining variables. For example, vscode's Python support is terrible.
- rockwotj 4y agoJetbrains IDEs have refactorings that are light-years ahead of any LSP functionality. I can use nvim for simple or small code bases, but for any real work project I've had to use IntelliJ. For example, I had a VSCode coworker who was asking to switch all typescript string union types to enums so they could be refactored, but IntelliJ is able to refactor (in this case rename) the string union types
- gateorade 4y agoIf you’re just jumping in, you can’t beat starting with lunarvim or astrovim and then customizing further from there if you need to. Neovim is fantastic, and the best way to edit code IMO, but getting it set up to a point where it has the features of vscode/IDEs can be a project in itself.
- stonecharioteer 4y agoLook up astronvim for a pre-configured setup that'll work for you. You cam try that and add your own stuff in the user configuration. It's pretty easy.