35 ms·
Neovim 0.7 Released
- bheadmaster 4y agoI love Neovim. It's been my main editor for years now. The way it handles terminal sessions is so much better than vanilla Vim. Also LSP rocks.
- enriquto 4y agoWhat do you mean by "terminal sessions"? I use vim inside regular xterms or tmux. Am I using such terminal sessions already? What would be different in nvim?
- paskozdilar 4y agoI mean the buffer with a shell that opens when you type: :term I remember vanilla vim doing some weird stuff, like leaving the buffer open even though I've exited the shell, requiring me to close it manually. I don't know if it's been fixed since.
- sophacles 4y agoBoth vim and neovim have the ability to open a terminal in a window split. It's not my preferred workflow but some people really like it rather than tmux or ctel-z to drop onto a shell... the implementation of this feature in neovim is a lot nicer than the one in vim. One thing i do use it for: In neovim there's options to open the terminal as a sort of overlay on top of the existing splits, they call it floating term. Its really nice for opening tools ( e.g. lazygit or a test runner) because find it a bit less disruptive than having to bounce in and out of the editor by other means.
- yw3410 4y agoWhy wouldn't you set the makeprg and have it populate the quickfix list instead?
- sophacles 4y agoBecause lazygit doesn't really work that way? Because running tests doesn't necessarily play nice with quickfix? I do set the make program to build and get errors via the quickfix when there isn't a good lsp server for the language. When there is an lsp server for the language, why bother with a special make command? - the same info is just populated inline for you.
- yw3410 4y agoWhat do you mean by "play nice"? I tend to use quickfix lists because I can edit/filter/persist them; so for example I'll have some tests/warnings but won't care about them for the moment but then rerun the command and get the diff and navigate to that. It's fairly complicated to script the same using the LSP api.
- canaus 4y agoIt might not be what they want to do.
- Winsaucerer 4y agoIt's really useful to be able to use visual mode on your terminal window, to copy things. That's something you don't get via ctrl-z or tmux.
- ksala_ 4y agoTmux has support visual mode (at least character and line), I use it all the times. I don't remember if it's enabled by default, but I have this in my ~/.tmuxrc (where pbcopy is the excellent https://github.com/skaji/remote-pbcopy-iterm2/blob/master/pbcopy https://github.com/skaji/remote-pbcopy-iterm2/blob/master/pb...) # Enable vi mode setw -g mode-keys vi # Copy to host bind-key -T copy-mode-vi v send-keys -X begin-selection bind-key -T copy-mode-vi y send-keys -X copy-pipe "pbcopy" unbind -T copy-mode-vi Enter bind-key -T copy-mode-vi Enter send-keys -X copy-pipe "pbcopy" It mostly work as expected, ctrl+B ] enter copy mode, then you can use / and ? to search, v to enter character visual mode, V to enter line visual mode and y/enter to copy the selection.
- patricius 4y agoBetter than :term in Vim 8? How so?
- paskozdilar 4y agoCopying from the other comment: I remember vanilla vim doing some weird stuff, like leaving the buffer open even though I've exited the shell, requiring me to close it manually. I don't know if it's been fixed since.
- capableweb 4y agoSame here! It was the first project I helped funding, and been funding it for as long as they have allowed donations. The biggest feature for me is being able to use lua instead of vimscript for basically everything now. I never learned vimscript properly, and now I don't have to anymore either! Win-win.
- ilovecaching 4y agoI will never understand why people choose VSCode/Jetbrains over a terminal based editor. I can edit the kernel with clangd and get hover reference, autocomplete, go to def, ref, dec, smart refactor, and that's on top of being able to easily jump and fix lint/bugs using Vim's already great support for parsing compiler errors. With term added (which is a core Vim feature) it also has excellent support for gdb debugging. I am very glad that neovim is also making things EVEN BETTER with tree sitter and baked in LSP support. So I get 98-100% of what an IDE gives me, I can use my editor over ssh and edit anywhere, I don't need a GUI to even be installed on the system where I have all of my cores and RAM for compiling the kernel, it starts up instantly, and it's completely free and open source, not driven by a corporation, and there's decades of documentation on how to use it. Edit: I really don't understand the comments of "I will literally not spend a single minute configuring my editor". I guess it's the systems developer in me that can't fathom someone that wants to use a tool to make a living without understanding it fully and being able to tweak it to their exact liking over the course of their entire career. I personally consider my investment into Vim one of the best I ever made. If dumb college me can do it in a few weekends, you can do it. I recently setup Emacs and got it to the same level as my Vim usage in about two days of tinkering just for fun. Then again, I suppose some people are just here for the money and want to clock in and clock out as fast as possible. I really wish I could share with you the joy of tinkering, learning, and growing your knowledge about how these wonderful machines work.
- mbernstein 4y agoNeovim is amazing but recall how long it took you to get used to vim keybindings. It isn't something you master overnight. I recall it took me a few weeks to get comfortable. Lots of people are perfectly comfortable not using keyboard navigation. Edit: Also to note - vscode supports editing files anywhere over ssh as well, so there isn't a huge advantage to neovim there.
- ilovecaching 4y agoExcept that I can use vim on my iPad Pro with just a terminal app, which I can't do with VSCode. Vim is portable anywhere you can get a terminal connection, even if it's over serial.
- Brian_K_White 4y agoneovim should not be named anything-vim for the same reason a Tesla is not a "neomaclaran".
- yjftsjthsd-h 4y agoIt is literally a fork of the vim codebase, and the name clearly indicates that it has diverged. If Tesla had started with a complete copy of McLaren designs, then (aside commercial/trademark issues) it'd be 100% reasonable to call it a "Neo McLaren". (Obviously that wouldn't happen because businesses run differently from FOSS, but the principle is sound.)
- Brian_K_White 4y agoAnd Tesla is literally a fork of a Lotus.
- capableweb 4y agoNot sure how that's relevant here. Is Tesla (the cars) a fork of McLaren with changes after doing the fork? Neovim is literally a vim fork, with .lua supported everywhere .vim is used and many other additions/changes/removals.
- Brian_K_White 4y agoCorrect. Tesla is a fork of a Lotus not a Maclaran.
- capableweb 4y agoTesla is a car brand, not one model? You're thinking specifically about the Tesla Roadster I think.
- deergomoo 4y agovim should not be named vi-anything, for the same reason that a car is not a horse-improved :)
- gpanders 4y agoI did a brief write up on some of the biggest new features here: https://gpanders.com/blog/whats-new-in-neovim-0-7/ https://gpanders.com/blog/whats-new-in-neovim-0-7/
- capableweb 4y agoSeems to be missing one of the bigger changes: support for python 2 has been completely dropped in favor of python 3.
- alophawen 4y agoIt's always fascinating how differently people read the same text. I was just here browsing comments about the python2 drop after noticing the headline of the changelog: > BREAKING CHANGES > Support for Python 2 is dropped. For Python 3, the minimum supported version is 3.6. Legacy :pythonx commands are still available, and always uses the python 3 provider.
- ufo 4y agoThanks for summarizing the highlights! The client-server part is the one I'm most excited about. It is one of my favorite things in kakoune and it'll be nice to have it on neovim too. I find it more intuitive to use separate terminal windows with all the usual window manager shortcuts, instead of using vim-specific terminal splits.
- bbkane 4y agoDo the kakoune and neovim keyboard shortcuts conflict for you? I've put off trying non-vim modal editors because I think there's only enough room for one set of shortcuts in my head. How difficult is it for you to switch between them?
- ufo 4y agoIt's not too bad, because the most basic commands are about the same. The ones that get me the most are dd and V. When I switch to the other editor I get these wrong a couple of times before the mental model readjusts. That said, I never was a super advanced vim user because I couldn't remember the rarely used motions. Part of the reason I started using kakoune is that I find it easier on my brain. Basically everything is in Visual mode by default, where you select before issuing the command.
- drfuchs 4y agoOdd; their home page doesn't mention a new release. https://neovim.io https://neovim.io
- ducktective 4y agoPeople who have tried both vim and nvim: - I have a theory that using `coc.nvim` is still the superior solution even compared to a native LSP. Why? Cause we can siphon from the huge man-hours of development and polish that M$ has put on VSCode. Every time they tweak VSCode, we at downstream, enjoy the benefits. Am I wrong in my assessment? - Vim's regexp-based syntax highlighting is annoying. So I think nvim+tree-sitter is the better solution on this front
- blindseer 4y agoI’m not sure if CoC.nvim is necessarily superior. CoC.nvim, VSCode, and all the other nvim lsp plugins use the same LSP servers. The clients are all different obviously, and I don’t think there’s any major features in CoC.nvim that aren’t in neovim’s built in LSP. I’d be curious if someone has a more comprehensive answer for this. I use the built in LSP and have been perfectly happy.
- petepete 4y agoI like both COC and CMP (native). COC is way easier to set up and the default config is fine. CMP is lighter and more configurable, and it works really nicely with luasnip (my snippet engine of choice). Under the hood they both use the same LSPs, but COC pulls them down and sets them up for you.
- sreevisakh 4y agoTheoretically, we could build a plugin that does all automatic setup like COC, but then uses the built-in LSP to do the actual work. nvim-lspconfig already does part of this job - configuring the LSP, as long as the server is already installed. Personally, I prefer the system package manager taking care of the servers, rather than yet another package maintenance system.
- mjlbach 4y agolspconfig maintainer here, minor info dump: Lspconfig currently has 3 parts, the default settings for the servers, an implicit project detector to trigger when to launch the servers (conditioned on filetypes and some patterns), and the infrastructure to manage launching/shutting down/attaching buffers to servers as you open files within the same project. Eventually we'd like parts 2 & 3 to be in core as a "projects" module, leaving separate "project patterns" and "server settings" as mostly metadata containing repositories. That would open the door for third party plugins to create customized project templates which map keybindings, set formatexpr, pass custom server settings, etc. similar to how coc.nvim has coc-pyright, coc-gopls, etc. These plugins could also handle installing language servers automatically should they choose to offer that. There's also nvim-lsp-installer, but I really don't like the approach it takes of hijacking lspconfig's setup.
- qudat 4y agoInterested in looking for neovim specific plugins? Check out https://neovimcraft.com https://neovimcraft.com Or if you prefer living in the terminal, curl https://nvim.sh https://nvim.sh
- OtomotO 4y agoI think Helix does a lot right on the "initial configuration" front. It comes with LSP and treesitter configured out of the box. Neovim on the other hand is heavily customizable, but you also have to do this for awesome functionality
- davidkunz 4y agoFor people interested in Helix, I've done a small video: https://youtu.be/9Zj-wiQ9_Xw https://youtu.be/9Zj-wiQ9_Xw
- OtomotO 4y agoOmg, I am a fan! <3
- davidkunz 4y agoThank you! :)
- recuter 4y agoThis is a well done video and Helix is cute. But I feel like this is more of an Emacs-y batteries included attitude and therefore blasphemy. Configuring Neovim from scratch is part of the fun of learning your editor and isn't that much work.
- NotTheDr01ds 4y agoThank you for the great video - I'm glad I watched it. Hadn't heard of Helix or Kakoune until now. While I have decades of muscle-memory in the vi key-bindings, it's easy to see that the select-object/verb method makes a lot of sense.
- pkulak 4y agoYou can get nvim packaged up with goodies out of the box with something like Lunarvim.
- 4y ago
- totetsu 4y agoDoes any one have any advice for running neo vim on a centos host without admin to install it. (Short of hunting down all the source packages for dependencies and compiling)
- ptaken 4y agoTry the appimage, should bundle everything
- dantondwa 4y agoYou can download the appimage from the website or you can install it using flatpak. Then set up an alias for "neovim" pointing either to the appimage or to the flatpak command.
- totetsu 4y agoI'll check if they installed flatpak ;)
- vamega 4y agoInstall it via nix, or if nix is too big a leap, via conda.
- rgoulter 4y agoWithout admin privileges, it's not trivial to use nix.
- Fnoord 4y agoThe nvim on my work laptop is old being from Ubuntu 21.10 so I went with Nix (because I dont like Snap). Fairly easy to set up, Nix is even included in Ubuntu repo. You only have to install it once, and update things like update-alterrnatives or play with $PATH.
- _blz2 4y agoI use neovim on centos. Usually build it myself, but I used to grap app image earlier, just do wget here: https://github.com/neovim/neovim/archive/refs/tags/v0.7.0.tar.gz https://github.com/neovim/neovim/archive/refs/tags/v0.7.0.ta... and untar into a local ~<user>/usr/local directory that I maintain myself. Compiling is neovim at work is a hassle, since its dependencies are from sites which are behind a firewall. So I decided to use locally built dependencies. The most painful part was getting the 3 luarocks 5.1 (which is not the latest) packages to compile locally and work with neovim.
- gshakir 4y agoI moved to Neovim from Vim based on the recommendation from my 16 year old :). He also suggested https://nvchad.github.io https://nvchad.github.io . NvChad was great in setting up the Neovim configuration with LSP for Ruby and others. Much better experience than Vim.
- bachmeier 4y agoOne of the appealing things about Neovim has always been > MessagePack structured communication enables extensions in any language Is anyone writing extensions in other languages? Does it work well?
- qbasic_forever 4y agoOne of the more popular and recent LSP autocompletion plugins is written in python: https://github.com/ms-jpq/coq_nvim https://github.com/ms-jpq/coq_nvim It appears to work pretty well for them.
- iamdbtoo 4y agoI don't know how well or not it works, but there is an autocomplete plugin being written in Rust. https://github.com/noib3/nvim-compleet https://github.com/noib3/nvim-compleet
- deleted 4y ago[deleted]
- andrewmcwatters 4y agoNeovim is such a weird derivative utility to me. Derivative/forked software usually isn't very successful to begin with, but then Neovim makes attempts to be modern and it's so not appealing at all. Here are some 5 second examples. Example 1: nvim . Still uses Netrw, which is fine, but doesn't even attempt to do things like: let g:netrw_preview=1 let g:netrw_banner=0 let g:netrw_browse_split=4 let g:netrw_liststyle= 3 let g:netrw_altv=1 let g:netrw_winsize=8 So that you get something that remotely resembles a modern text editor's tree view. Example 2: set number Line numbers are off by default. Why? Why are all of these other configurations on by default? Every editor shows line numbers by default and Neovim doesn't make this 1 line configuration effort to look like everyone else. Example 3: set mouse Mouse is off by default. Again, why? I get that it's a terminal editor, but if the technology is there to allow me to select text with my mouse, why do we need act like luddites? After setting up my .vimrc file with sane defaults and a bit of an attempt to use the editor in earnest, my conclusion is that Vim/Neovim is just a bad editor. I want more from my editors. Here's a .vimrc file that attempts to make Vim and compatible editors more like Visual Studio Code, Atom, and Sublime Text: https://github.com/andrewmcwatters/dotfiles/blob/main/.vimrc https://github.com/andrewmcwatters/dotfiles/blob/main/.vimrc And it's still bad.
- canaus 4y agoI'm confused on the arguments presented. Is it that the out-of-box functionality isn't as good as other GUI based editors, or that certain things are off by default? I agree that certain settings shipped with neovim could be expanded. There should really be a process to elect plugins and settings that are generally accepted as "good" for neovim. Plugins like Gruvbox, vim-surround, coc.nvim, vim-plug, nerdtree etc. have been continuously maintained for years, why not make it easy for new users to install and use them without having to go on the path of wonder?
- lobstrosity420 4y agoIt's not for you, and that's ok.
- qbasic_forever 4y agoI don't want line numbers, IMHO it's an anti-pattern to have them. I'm not writing code trying to maximize the number of lines, or show my boss "look I wrote 10k lines today, so productive!". I'm trying to write less lines of code--if a function is sprawling past a page then I'm getting suspicious that it's too complex. If I have to remember "ok line 7000 is where the weird permission business logic starts" that's a failure to comment and make clear how the code is structured. If tooling is telling me there's a problem on a specific line then I should have a code action or command to take me directly to that line, I shouldn't have to juggle navigation manually.
- qbasic_forever 4y agolua is such a nice and sane language for application config. I really enjoy neovim's choice to use it, and with this release more or less allow 100% of typical configuration to be done entirely in lua. Good riddance to bespoke scripting languages.
- wyclif 4y agoIt's also so much easier to write plugins in Lua than the insanity that is Vimscript. It's why I'm slowly moving into Lua-ifying my configuration away from old standbys like NERDTree to things like nvim-tree.lua.
- emptyparadise 4y agoWill the new remote features allow sharing the same set of open buffers between multiple neovim windows in something like a tmux session? I don't want to see E325 ever again.
- vander_elst 4y agoI really wanted to love nvim, because I think that some philosophies it tries to follow better match my way of thinking. However, I tried several times to configure it to match 1:1 my vim config and to stick to it, but there are several edge cases that vim solves better. Additionally, nvim with my workflow crashes sometimes, while vim doesn't.
- pc86 4y agoAs someone who just started using nvim, and assumed that vim was identical (or close enough to it that it can just be considered identical), what are these edge cases/differences?
- vander_elst 4y agoThere are issues in how the terminal is handled and the numbering of the buffers. Moving between the buffers (e.g. C-w, C-t) is not configured by default on nvim.
- zacmps 4y agoThis solves a 6-year old SO post I had! https://stackoverflow.com/questions/38387964/is-it-possible-to-have-a-single-statusline-in-vim-with-multiple-splits/71889263#71889263 https://stackoverflow.com/questions/38387964/is-it-possible-...