27 ms·
Neovim 0.5 is overpowering
- varbhat 5y agoNeovim 0.5 is awesome. It has native LSP support, Lua configuration support that it feels like true revolution over past versions. But, getting into optimal setup in neovim/vim involves lot of configuration. Here is mine if you want to refer: https://github.com/varbhat/dotfiles/tree/main/dot_config/nvim https://github.com/varbhat/dotfiles/tree/main/dot_config/nvi...
- sigzero 5y agoWhat's a good x-platform GUI for it?
- varbhat 5y ago1) Terminal 2) Neovide : https://github.com/Kethku/neovide https://github.com/Kethku/neovide 3) Neovim-Qt : https://github.com/equalsraf/neovim-qt https://github.com/equalsraf/neovim-qt
- yakubin 5y agoYour comment triggers my OCD in 2-3 different ways: 1. First you start numbering with 1. 2. Then you start numbering with 0. 3. You provide links for all but the first element in the list, which, combined with my first 2 points, results in a juxtaposition of "2" and "0", suggesting to my subconscious that I missed something. Well done.
- varbhat 5y agoCorrected Now.
- pdimitar 5y agoNeovide looks amazing, thanks for linking it!
- Normille 5y agoVimR [0] is a nice OSX GUI for Neovim. FireNvim [1] is a browser plugin which embeds a Neovim editor window in HTML textareas [0] https://github.com/qvacua/vimr https://github.com/qvacua/vimr [1] https://github.com/glacambre/firenvim https://github.com/glacambre/firenvim
- dorian-graph 5y ago> But, getting into optimal setup in neovim/vim involves lot of configuration. I haven't found this to be true. I've basically copied the configs from READMEs and have everything working.
- throwaway894345 5y agoI’m with the parent. I have to copy and paste all of these different little snippets (in the arcane viml language, although now maybe I can configure with kia?) and annotate what they do, and sometimes they compose poorly and other times they don’t work at all. Many plugins are only available via some of the package managers do you have to use several package managers with their own conventions. Honestly the thing I like best about vim are the keybindings, and while many other editors try to reproduce them, they rarely get it right. The only one I’ve found that comes close enough is vs code and it doesn’t search properly (case insensitive) and it uses a sane regex language instead of whatever regex language vim uses. I specifically dislike the vim philosophy that defaults should be insane and the user should have to configure things to their liking with all of the expertise that entails. VS code does a much better job in this regard (though it has its own quirks).
- lacksconfidence 5y agoI think the vim philosophy is slightly different. The vim philosophy is if it worked yesterday, it works today. This means, for the most part but not exclusively, not making breaking changes. This means, by proxy, that the defaults were set a long time ago and are unlikely to change. It's a difference in who they consider the most important users, the ones already using it or the new users that might use it in the future.
- throwaway894345 5y agoI think those of us who have been vim users for a while can still appreciate intuitive design. :) Moreover, this could be entirely backwards compatible--you could have a single boolean "sane-defaults" flag which defaults to false (for our dear legacy users) but which new users can override.
- ibraheemdev 5y agoIt is awesome, but I have been running into bugs with it. Memory out of bounds errors, freezing when my project is misconfigured, it doesn't feel stable yet. Is that just me?
- mjlbach 5y agoHave you filed your issues on our issue tracker (neovim/neovim, not neovim/nvim-lspconfig)? If not, please do! I haven't run into these issue myself, but if you can provide a minimal repro happy to take a look.
- revscat 5y agoI think it may just be you. I’ve been using nightly builds for months now, and haven’t seen what you describe even once.
- rajin444 5y agoI tried out the native LSP support few months ago and the docs + features for it seemed poor. I went back to coc.vim
- skohan 5y agoI had the same experience maybe 6 months ago, hopefully having a "blessed" implementation will help/has helped this situation. I actually was surprised to see the state of the LSP docs in general. Maybe I was missing it, but all the docs I could find only had C# examples of the various objects. I was surprised I couldn't find an exhaustive list of the JSON documents and JSON-RPC endpoints which make up the standard.
- ibraheemdev 5y agoThe features are all there, and I found the documentation was pretty good. There were cases where I had to dig through help pages and github issues to configure things a certain way.
- YorickPeterse 5y agoThe documentation is there, but it's a bit lacking/confusing here and there. It's also mostly foundational work, and you still need to cobble things together (either manually or using a plugin). With that said, you can build things quite nicely with it. For example, I have a custom linter setup, custom loclist/quickfix list formatting and populating from LSP data, and a bunch of other things; all using the foundational work coming in NeoVim 0.5. If anybody is curious, you can find my NeoVim configuration here: https://gitlab.com/yorickpeterse/dotfiles/-/tree/master/dotfiles/.config/nvim https://gitlab.com/yorickpeterse/dotfiles/-/tree/master/dotf... p.s. In case anybody wonders "why Lua?", for me this mostly comes down to this: I hate Lua, but I hate Vimscript even more.
- mjlbach 5y agoHave you checked it out recently? I overhauled the documentation twice since January. Most recently, I dramatically simplified the documentation based on user feedback, expanded the wiki pages, and created an "advanced" readme for power users.
- mjlbach 5y agoI don't agree that it requires a lot of configuration. Here is the "starter" configuration (~280 lines) that I made for helping debug user issues with the built-in language server client: https://github.com/mjlbach/defaults.nvim https://github.com/mjlbach/defaults.nvim
- comma_at 5y agoYou think 280loc as a starter is not much?
- mjlbach 5y agoSure, although this is fairly "batteries included". Very rough numbers: - 34 lines to set up plugin manager/install plugins - 43 for keybinds - 35 for documentation - 50 for autocompletion - 20 for customizing one language server for plugin development (sumneko) It adds up for sure, and neovim/vim/emacs are not ever likely going to be as plug & play as vscode/intellij, but I would argue the target user for vim/neovim/emacs is someone who wants more customization, which is almost always going to mean the configuration is more verbose. If you have concrete suggestions on cutting down this config in particular, you can file an issue/PR. The main reason I created this, was because we (core neovim team) get a lot of "I just want something that works" type feedback (which to many includes autocompletion and default keybinds, which are almost 1/3 of the config)
- threatofrain 5y agoVSC has tons of customizations available, perhaps even beating Vim in the number of exposed configurations. The problem with Vim configurations is that a lot of them feel obvious, and the ergonomics of dealing with configs is painful and frequently calls you to reference outside material.
- mjlbach 5y agoI'm not sure I'd say that it beats vim/neovim, but I agree with your point about ergonomics. I would say the vim manual is a fantastic resource, I've never felt the need to reference outside material. Neovim has already integrated many of the "obvious defaults" (see :help nvim-defaults), but if you're a user and feel that something is missed you should file an issue. I personally don't mind that the defaults may not be what I'd like, as once they are set, I spend very little time modifying my system configuration. I realize this can be a barrier to new users though.
- todd8 5y agoThanks for making your configuration available, I want to try out Neovim because it's an exciting project and having carefully constructed configurations available as a starting point will make it easier. Your configuration doesn't look too long to me, my own Emacs configurations are much, much longer and not at all stable--every so often I declare Emacs bankruptcy and start over. Now, some off-topic musings: I switched to Emacs from vi in the 80's, and I put up with it for the many powerful packages it has. Lisp as a configuration language has served Emacs well for decades, but I've always been aware that it narrows the number of contributors to those that are comfortable with Lisp. Progress towards modernizing the Emacs extension language has been slow...and it will still be a Lisp like language (Scheme). I'm rooting for Neovim and I'd like to see a project like this for Emacs that would modernize it's UI, UX and underlying extension language. This will likely never happen while I'm still programming. Imagine the difficulty of recreating just the org-mode package!
- ccakes 5y agoIf you’re interested in projects working on “modernising” Emacs check out https://github.com/emacs-ng/emacs-ng https://github.com/emacs-ng/emacs-ng No affiliation and haven’t even used it - but it seems to have legs.
- todd8 5y agoI don’t know how I missed that project. While very ambitious, I feel that it’s direction is the most practical proposal I’ve heard to modernize Emacs.
- davidkunz 5y ago... and here is a playlist demoing my config, including how-to: https://youtube.com/playlist?list=PLu-ydI-PCl0OEG0ZEqLRRuCrMJGAAI0tW https://youtube.com/playlist?list=PLu-ydI-PCl0OEG0ZEqLRRuCrM...
- naltun 5y agoNice config. I'll use it to help me enhance my own nvim setup. Thanks for the share.
- CalChris 5y agoneovim 0.5 is not quite out (but it's real close). https://github.com/neovim/neovim/milestone/19 https://github.com/neovim/neovim/milestone/19 I've been using a neovim nightly along with VSC and Alexey Svetliakov's Neo Vim extension. His extension requires 0.5.
- faho 5y agoDoes anyone know of a nice git interface for Neovim? I would love to get off of emacs, but it's hard to beat Magit. At the very least something that lets me view the repo status and stage selections would be good.
- frayesto 5y agovim-fugitive is my goto
- deleted 5y ago[deleted]
- pflock 5y agoHaven't used Magit w/ emacs but have been using a library inspired by in for the last year or so: https://github.com/jreybert/vimagit https://github.com/jreybert/vimagit not sure how it compares feature wise but I've found it extremely helpful.
- varbhat 5y agoI would recommend you to try lazygit[0] but it's independent terminal tool not tied to neovim For Neovim Git Plugins ,see [1] [0]:https://github.com/jesseduffield/lazygit https://github.com/jesseduffield/lazygit [1]:https://github.com/rockerBOO/awesome-neovim#git https://github.com/rockerBOO/awesome-neovim#git
- nine_k 5y agoWhy quit emacs when evil-mode exists? Fast startup times are solved by never quitting emacs :) Really, emacsclient starts nearly instantly, and all the heavy stuff like language servers and emacs proper just run in server mode. (Disclaimer: I know enough vi and often use it.)
- faho 5y agoI use emacs with evil-mode, and I don't have a problem with startup time (and that's without emacsclient, which I always found too annoying to deal with). My issue is I don't really like emacs' mode of operating, and even with evil-mode it still seeps through. I also don't like lisp.
- becquerel 5y agoAs a novice to vim, I found neovim really nice. You can download it and it Just Works, pretty much, with windowed version and sensible defaults. If you're interested in vim but found it hard to get into, I recommend it.
- pratio 5y agoI've been using Neovim for a while now and it's amazing. I love the effort and thought that has gone into the project. The plugin manager is such a treat to use. Anyone who used to use vim or found it lacking or difficult to setup, I urge to give Neovim a try. Thanks to everyone involved in the project.
- yewenjie 5y agoAFAIK Neovim 0.5 uses tree-sitter. Is there any effort to integrate tree-sitter with Emacs in an easy way?
- ywei3410 5y agoSort of. The integration needs to be done per-language, though helper packages like emacs-tree-sitter [1] exist. Afaik, C# mode currently uses it [2] though I'm not sure whether any other languages use it yet. [1] https://github.com/ubolonton/emacs-tree-sitter https://github.com/ubolonton/emacs-tree-sitter [2] https://github.com/emacs-csharp/csharp-mode/blob/master/csharp-tree-sitter.el https://github.com/emacs-csharp/csharp-mode/blob/master/csha...
- fmakunbound 5y agoEmacs already has Semantic https://www.gnu.org/software/emacs/manual/html_mono/semantic.html https://www.gnu.org/software/emacs/manual/html_mono/semantic... which seems similar in functionality. It’s been around for ages but more recently it has become part of Emacs proper.
- b3morales 5y agoSemantic is pretty cool. The advantage that Treesitter has (shared with LSP servers) is that it's client-agnostic. So while no one besides fellow Emacs users are going to hack on the Semantic parser for a given language, Treesitter can potentially draw help from users of any editor, or even people doing other things like building analysis tools.
- cjohansson 5y agoSemantic is used less and less I would say, there is not enough people involved in keeping it and it's grammars updated, it also suffers lack of asychronicity. Tree-sitter and LSP has the advantage of re-using code for multiple editors
- SPBS 5y agoI use nvim in the terminal and gvim/macvim on the desktop. I don't like how the nvim community seems to be throwing themselves wholeheartedly into lua and lua-only plugins (vimscript plugins are better because they work with both vim and neovim). Switching to init.lua also means losing all compatibility with vim, and I cannot fathom why people would want to do that considering that there is nothing that init.vim cannot already do. I also don't like how there looks to be an upcoming split in the plugin community when Vimscript 9 releases and the neovim community will ignore it while plugin authors in the vim camp (e.g tpope) may start moving their plugins over to it. That said, the built-in LSP for nvim is very good thing and I plan to migrate away from the node-dependent coc.nvim once nvim 0.5 releases.
- oblio 5y agoThe thing is, Vimscript sucks. Using a more mainstream language would be great for a modern advanced editor. Vim has a ton of Vimscript plugins but I wonder how long it will take the Neovim community to replicate most of their functionality in Lua. I'd guess that not that long.
- the_jeremy 5y agoI spent 10 hours learning enough vimscript to make a command to check if a line is commented, comment it if not, or uncomment if it is, be able to handle multiple filetype and comment chars, and be able to handle proper indentation and multi-line selection. I have to imagine it would be simpler in other languages. Vimscript is hard.
- psalminen 5y agoOut of curiosity, does your's have any benefits over NERDCommenter?
- the_jeremy 5y agoI'm sure mine's strictly worse. It was written when I was working in an environment where it was easier to spend 10 hours on something than it was to get permission / access to download vim plugins from the internet.
- agumonkey 5y agoKudos for the project, impressive trajectory. -- m-x sent-from-my-emacs
- jvanderbot 5y agoThe positive transformation of Microsoft is most apparent when they are pulling forward old dreadnoughts of Linux/Unix like [Neo]Vim. Here, LSP and VSCode set the bar pretty high. I'm glad to see a healthy ecosystem thriving when Windows, WSL, Linux, and various tools start mixing and sharing.
- powmli 5y agoThe real killer feature of Neovim is Firenvim ( https://github.com/glacambre/firenvim https://github.com/glacambre/firenvim ). I'm still waiting for somebody to do the same thing with GTK inputs and the shell (yeah, I know that bash and zsh support a vim mode, but it sucks).
- rjldev 5y agocontrol + x followed by control + e will drop you into $EDITOR from your shell - might do what you want
- dcow 5y agoNeovim is awesome. I really hope it becomes a real successor to vi[m] to the point where it's integrated into server distros so it can be effectively the default.
- coliveira 5y agoTreesitter is not Neovim specific, any programable editor can access treesitter to do this, including vim. But it is nice to see it being tried on vi clones.
- nahuel0x 5y agoEmacs and VSCode should follow Neovim and also use tree-sitter as their parsing engine, instead of manually crafting fragile regexes.
- weeboid 5y agoUse what is in the standard distro. Don’t go too far downstream. MacVim/gVim
- joemi 5y agoMacVim which you mention isn't part of any standard distro. But also: why should it matter really? If someone is a Neovim user, they'll have very little difficulty using vi/vim when that's all that's available. Basic no-plugins Vim is pretty indistinguishable from basic no-plugins Neovim, for the user.
- markandrewj 5y agoWatching ThePrimeagen and tjdevries has also given me some good insights into neovim. Tjdevries has put a lot of work nvim-treesiter, and it shows. I have stuck with regular vim for a while because I have everything configured the way I want, but I am setting up a new build now, and I will probably move to neovim.
- tjdevries 5y agoWow thanks! btw I'm tj :]
- haolez 5y agoNowadays, I'm more tempted to use something more mouse focused for my geek itches. Like Acme, for example. Neovim looks cool, but I've long realized that I spend a lot more time reading than writing code. The automations and flexibility of the multi modal mode do not matter much for my use case.
- xwdv 5y agoIronic, because vim and neovim are specifically designed for programmers that spend more time reading than writing code. You can get to damn near any line in a massive project with just a couple key strokes.
- haolez 5y agoI understand that and I'm a heavy emacs user, but I feel that just browsing with the mouse and clicking symbols as if they were links to navigate leaves me with less cognitive overhead overall.
- tjdevries 5y agoIt always feels really nice knowing that people are getting excited by your work. Thanks for the shoutout! (I'm tjdevries) Happy to answer any nvim questions while I'm here.
- dvk13 5y agoThank you for the nice work!
- tjdevries 5y agoMy pleasure :)
- yanis_t 5y agoWhen is it going to get released?
- tjdevries 5y agohttps://twitter.com/TeejDeVries/status/1396881477263036417 https://twitter.com/TeejDeVries/status/1396881477263036417 ;) (I hope you are in on the meme, otherwise I am sorry for posting our "inside joke" response)
- joemi 5y agoJokes (and especially inside jokes) don't really go over well here on HN.
- kzrdude 5y agoThere's a milestone and date here https://github.com/neovim/neovim/milestone/19 https://github.com/neovim/neovim/milestone/19 But the meme probably is just as accurate
- modernerd 5y agoIs anyone in the nvim community working on unifying UI widgets (popovers and pickers) for eventual inclusion in nvim itself? Consistent UI for users and great UI APIs for plugin devs would be a nice perk. I have a couple of nvim plugins in flight and building the UI has been the hardest part so far. (A couple of examples: https://imgur.com/a/RZV2eYJ https://imgur.com/a/RZV2eYJ )
- skrtskrt 5y agoI switched from vim to neovim because I thought I needed to to use coc.nvim - turns out I didn't need to, coc.nvim works in vim 8+ As a neovim user who is just having neovim load my vimrc - nothing neovim specific -, I don't see a huge difference. Are there features I am missing out on? I do like the idea of having everything in my vimrc so I could still use it with vim on a server if needed.
- gorjusborg 5y agoI reluctantly tried neovim at first. I didn't like it as much as vim at the time, mostly due to plugin compatibility and some bugs (this was a while ago). I permanently moved to neovim because of the forward looking vision and community around it.
- typon 5y agoIn general, nvim has better defaults than vim. You can simulate an out of the box nvim experience by adding a few lines to your .vimrc. Besides that, I think the only big difference I've noticed is the nvim exclusive plugins.
- kzrdude 5y agonvim should find a way to commit to "good defaults" in a way that updates those defaults in the future, when nvim develops. So that it's not stuck in the hole that Vim is in, only a bit further along.
- pl-94 5y agoI am an nvim user. I still have everything on my vimrc but I installed nvim on all of my servers. Some plugins do not work on vim8+ (telescope.vim e.g.)
- simias 5y agoI found that nvim had generally better performance. That was my main draw originally, despite not using many plugins I often found Vim chugging on large files with things like syntax highlighting. FZF is also significantly snappier on nvim in my experience, or at least it was when I made the switch.
- sriram_sun 5y agoC++ folks, do you see any big improvement in cscope type navigation? I've tried ycm and a couple of others. Now settled on ripgrep. However, I do need a decent plugin that helps with finding references to a symbol and navigation back and forth in C++. Not finding it in nvim after several attempts. Coc+clangd has only added to the headache. Coc is pretty good for js and python though.
- mellery451 5y agoyes - I use coc + clangd and there is no comparison with cscope. The level of accuracy you get with clangd is significantly better than tags/cscope. The main thing you need to make clangd work properly is an accurate compile DB. Yes, you can general/coarse compile settings, but the accuracy drops off for a project of any size. I also suggesting staying reasonably up-to date with clangd releases since they are adding important features/fixes with each release.
- harryvederci 5y agoBig fan of Neovim 0.5! It's not released yet, but I'm already using it as my Clojure "IDE" at work, and all my nvim configs are written in Fennel, a lispy language that compiles to Lua. I guess it's time for me to start donating to Olical, Technomancy, and the Neovim crew, they do some amazing work! If you want to learn (Neo)Vim and don't mind a dose of hyperactive video learning, I recommend watching ThePrimeagen his youtube videos. I've been using Vim for years, but still learned new things over there: https://www.youtube.com/c/ThePrimeagen/videos?view=0&sort=da https://www.youtube.com/c/ThePrimeagen/videos?view=0&sort=da Oh, also: I kinda instigated this thing, sorry TJ: https://clips.twitch.tv/PrettyAgreeableMagePanicVis-4IhDSOhrof0fX2XS https://clips.twitch.tv/PrettyAgreeableMagePanicVis-4IhDSOhr...
- tjdevries 5y agounacceptable ;)
- duped 5y ago> Give Neovim 0.5 a try, you will find that it is not difficult to make it as powerful as VSCode Does Neovim support webviews in extensions? Can it? There are a lot of useful visualization tools that VS Code allows that require them. It's one of the most powerful features of the editor, imo.
- agambrahma 5y agoOTOH, Neovim can work in a remote SSH session, fully featured within a terminal. (Yes, I know people don't do a lot of SSH-ing and coding these days)
- brianvli 5y ago+1 to this. Having nvim as my daily driver allowed me to NOT upgrade my 4 year old macbook with the next top-of-the-line macbook, saving me an arm and a leg. Instead I just got a gaming PC with way higher specs for less than half the price and I just ssh into it now. It's also neat to be able to code from an iPad by SSH'ing with Termius :)
- gen220 5y agoIt also allows you to go the other direction, and purchase a $200, nearly ten year old thinkpad, since it meets all your requirements for being productive.
- duped 5y agoYou can do this in vscode too.
- anaganisk 5y agoI have an honest question, the real advantage of Vi is its installed everywhere, and just works over ssh. What is the benefit of a terminal IDE like neovim or vim with tens of something plugins? Vscode or other powerful IDEs do the work much better.
- Macha 5y agoHonestly, I don't have any system I can access where "vi" is not actually vim any more.
- gorjusborg 5y agoFrom my experience, plugins add 'nice to haves', while the main benefit of vim is the core (modal editing, fast navigation, etc.). If I get on a linux machine other than my workstation, I'll generally not install any plugins and still be able to get the job done without getting frustrated.
- becquerel 5y agoFor me, vim is appealing because of the composable keyboard commands that let you navigate through text in a very powerful way. When you get good with it, it's way quicker than using a mouse. It also makes you feel cool, which is most important of all.
- shmageggy 5y agoAll modern IDEs have vim bindings.
- kzrdude 5y agoMy experience is that many of them are shoddy experiences. Some might be really good though.
- troyvit 5y agoExactly. They all emulate up to a point, and that point seems different with every emulator. Then slipping out of vi mode to do something specific to that editor/environment ruins the flow.
- curriculum 5y agoI'm most excited for the treesitter integration and its potential to amplify Vim's "killer feature": text editing as a language. Vim's editing language feels most powerful when I'm using its text objects: "ciw" means "change in word", "cis" means "change in sentence", and so on. But Vim's built-in text objects are not always a perfect match for the code you're editing. Suppose you want to change the first argument of a function, for example; there's no built-in "first-argument" text object. But Treesitter integration makes it easy to create text objects that understand the AST. Without much effort, users will be able to make mappings like `cia1` to "change in argument 1", and these mappings will work across all languages with Treesitter support.
- SavantIdiot 5y agoAren't these features are subject to external configuration to behave properly? For example, C/C++ and #defines. The user has to configure yet another file for this to work properly. If the build system/tree is so complicated that I can't figure out what the final #defs are (like building MBED programs with literally a thousand #defs), I end up shutting off this feature entirely. This kills me with VSCode & Sublime, but Eclipse derivatives are usually more tightly coupled. What about neovim?
- Asooka 5y agoYou make your build system emit a compile-definitions.json file that has all the compiler flags for every file you compile and feed it to a language server (rtags or clangd usually, either standalone or part of another plugin like YouCompleteMe). CMake has a flag to do that as part of its configuration step (and remembers it), for other build systems you can use something like bear: https://github.com/rizsotto/Bear https://github.com/rizsotto/Bear .
- samus 5y agoFor future reference, as I found this information to be difficult to find: the flag for CMake is `CMAKE_EXPORT_COMPILE_COMMANDS=YES`. In out-of-source builds, the output file will be in the build directory, therefore one has to create a symlink to ensure the language server finds it in the project root.
- pdimitar 5y agoNeoVIM seems like a big upgrade over a lot of editors. As a very casual Emacs user who never got excited enough for the "self-documenting and programmable editor" idea, VIM gets more appealing by the day for me. I am also using Spacemacs for a year or so and it's definitely better than normal Emacs. Haven't tried Doom Emacs and I doubt that I will, regardless of a lot of positive feedback. I mean, Emacs is alright but I am just not in the club of the people who'll use 25% of their workday chasing an Elisp error and maybe fix a plugin in the process. Always hated the heavy IDEs like Eclipse and IDEA so this led me to Emacs but I still prefer stuff to come semi-configured out of the box. I know that NeoVIM will require some love for that but I'm prepared to do it because it looks like much less work than Emacs. I'll try Emacs' `native-comp` branch for supposed quicker Elisp operation but I don't have much hope that it will help my grievances. Sadly, my 19 years of casual Emacs usage are coming to an end soon. I'm looking forward to trying NeoVIM.
- gosukiwi 5y agoFor me, Spacemacs with evil mode and Vim are quite similar, but I always end up going back to Vim because it's just a) way faster for me, and b) it integrates into my workflow better. For example, I don't want an extension to take care of git for me (magit), it's easier for me to just alt tab or bring a terminal in vim and do it there. I find Emacs users prefer to do everything in the editor, while I'd rather have one tool do one job. Of course what job exactly should a tool do is subjective, and varies from user to user :) Vim surely tales some "learning tax", new users are encouraged not to add every plugin they can find, instead, try to do things "the vim way". But that is also subjective. My experience with Vim was just make it more friendly first (installing things like NerdTREE and making it behave more like other editors I was used to), then slowly learn how to do what those plugins do with just vanilla vim, and see if I can either remove them or replace them with a more "barebones" and "vim-compatible" plugin. For example, I now use vim-dirvish which is like a better `netrw` (Vim's default file browser). I am biased of course, but I think Vim/Neovim is just great, and always worth checking out.
- iLemming 5y ago> I am just not in the club of the people who'll use 25% of their workday chasing an Elisp error Yes, experienced Emacs users do write some emacs-lisp all the time. But despite the popular belief, it's not about chasing and fixing Elisp errors. I, for example, write emacs-lisp functions just because I can. Here are some typical examples: - I have a GitHub link to an issue or a pull-request, I want to download the description of it and make it a proper Org-mode link. - I want to automatically make a git branch name based on a ticket number (it retrieves the title and shortens it up) - I want to turn a piece of EDN to JSON and vice-versa - I want to diff two last pieces I copied into clipboard (side-by-side or otherwise) - I want to grab a specific value for a Heroku app (based on the context I'm in) And much more. Of course, one can use any scripting language to do all that, but it won't be integrated with your IDE.
- timwaagh 5y agoThe problem with neovim is that it's often not available on corporate environments whereas vim usually is. But nice work anyways
- tharne 5y agoYou can pretty easily get around this by downloading the neovim appimage to your home directory and either putting it somewhere in your path or just creating a simple alias.
- criddell 5y agoOfftopic, but I wish the author would add a bit of whitespace on the left and right sides. In my browser (Firefox) the text touches the outside edges and gives the impression that I need to horizontally scroll.
- crispgm 5y agoJust found my post on HN. Thanks for the feedback. And i think i need a review my responsive codes.
- kzrdude 5y agoIt probably wasn't tested with such a narrow viewport, then.
- criddell 5y agoIt behaves oddly. If I make my window very wide, the text takes up a reasonable width in the center. Then as I drag the window edge to make it smaller, the column suddenly gets wider. As I continue to make the window narrower, it gets to the point where there's no whitespace until it gets very narrow, then a small amount of whitespace (but enough) is introduced on the sides.
- PestoDiRucola 5y agoI don't want to be flamed or start a debate about the values of one or the other, but why should someone in 2021 go through the hassle of setting up (neo)vim or any other terminal or barebones editor (looking at you emacs) when there's perfect solutions out there that work out of the box with a lot of features that neovim has. For example VSCode uses LSP "natively" and even has an excellent vi emulator you can install as an extension.
- b3morales 5y agoPersonally I find that for every feature that works out of the box there's two others that don't do what I want the way I want it. So I like my tools to be hackable. This does take time, and I admit I'm not always on the right side of the time savings chart[0]. ;) But I also generally find it satisfying -- tastes will differ on this point. [0]:https://xkcd.com/1205/ https://xkcd.com/1205/
- lvass 5y agoI agree and that's why I use Emacs. It's perfect out of the box for me. I may not even use external packages if eglot gets merged in.
- fmakunbound 5y ago> VSCode uses LSP "natively“ What do you mean by this? Is it some kind of same address space thing rather than LSP servers over sockets?
- da39a3ee 5y agoI thought they meant as opposed to, say, emacs where the LSP client has to be installed as a 3rd-party package (eglot or lsp-mode). As you say, the server is in a different process by definition of LSP. I don't know vim but from skimming the article it sounded like, until neovim 0.5, for vim one also had to install the LSP client as a plugin. In VSCode in contrast, the LSP client is native in the sense that it is built into VSCode. That makes a big difference from Emacs at least, because the LSP clients (eglot at least) are still under heavy development.
- 5y ago
- djoldman 5y agoI'm very excited for 0.5. For those in the know, when is it reasonably expected to be released? I can't be alone in only wanting to port my init file to lua ONCE.
- cusx 5y agoDoes anyone have a setup for Typescript/React that works/feels similar to VSCode?
- ug02fast 5y agoSpent hours over days trying to get this to work with vim/coc-vim. VSCode works better when working with TypeScript.
- meagher 5y agoYup! https://github.com/tmm/dotfiles https://github.com/tmm/dotfiles Happy to answer questions: tom@meagher.co or Twitter DM (@awkweb)
- ybbond 5y agousing coc.nvim, with its extensions coc-typescript, coc-eslint, coc-prettier works great to me. even though there's an expected minor performance hit, it still faster than vscode
- davidkunz 5y agoHi, please have a look here: https://youtu.be/CcgO_CV3iDo?list=PLu-ydI-PCl0OEG0ZEqLRRuCrMJGAAI0tW https://youtu.be/CcgO_CV3iDo?list=PLu-ydI-PCl0OEG0ZEqLRRuCrM...
- nautilus12 5y agoI've wasted SO much time trying to get vim set up to be roughly as productive as intellij. if there was some way I could get this out of the box i would be happy, but until then just using ideavim in intellij, pycharm will be my go to.
- ho_schi 5y agoI've migrated from Neovim 0.4.x to upcoming Neovim 0.5.x last week, together with neovim-plug. Then I installed nvim-lsp and nvim-comp, as LSP-Server I used CLANGD (sadly there is no nothing similiar from GCC available) for C and C++. And it is awesome :) I'm was actuall missing short and clear guide. It's actually easy. What I've struggled with are the ERROR and WARNING markers, they use default colors which doesn't match well the used theme (peachbuff). Change it if required: hi LspDiagnosticsVirtualTextError ctermfg=Red ctermbg=White hi LspDiagnosticsVirtualTextWarning ctermfg=DarkYellow ctermbg=White I recommend that all your projects setup use a specific C or C++ Version. Why? Because GCC 11 uses by default C++17 but CLANG 11 uses C++14 by default. e.g. with Meson: project('project_name', 'cpp', version : '0.99', default_options : ['cpp_std=c++17'])
- skohan 5y agoWith LSP support now coming "out of the box" with neovim and SublimeText 4 I'm hopeful that it can escape the microsoft ecosystem and truly become an open standard. I tried implementing an LSP several months ago without using VSCode as a test bench, and the tooling and documentation weren't there - but with more default implementations out there, hopefully it can change
- npmaile 5y agoI just got lsp native set up last night, and I think it's great. It replaces a few manual steps and plugins that were necessary, and it seems to be pretty well integrated. I'm not sure about the performance or resource usage, but it feels pretty snappy.
- p2hari 5y agoFrom this knowledgeable crowd I would like to know how does this compare with spaceVim. For somebody coming new into vim, what would be the right one.
- aneutron 5y agoIt's fast. Mind-blowingly fast. I used it since beta (heck, even alpha) on a 2014 Pentium laptop, and I built many, many engineering school projects on it. VS Code used to take up the 1.8GB left from my measly 4GB.
- tomerbd 5y agoI'm using vim happy no plugins no config just edit files do I need neovim?
- joemi 5y agoNo. There's no real benefit in this case. For the most part, the main practical advantage of Neovim over Vim (from a user perspective) is that there are some plugins that are only supported by Neovim and there are some types of plugins that might work better on Neovim. So if you're not using plugins this won't affect you. There are some ideological advantages of Neovim over Vim, too, but those are relatively minor; neither is evil software, and it can be argued that Vim has some ideological advantages over Neovim, too. For a plugin dev or vim/neovim dev, there may be other practical advantages one way or the other.
- luxurytent 5y agoI've been on neovim nightly for about 6 months now, coding in it full time. Can't recommend it enough! Use all the plugins highlighted here except telescope, which I've been holding off on from fears of slowness, but maybe I'll take the plunge this weekend and test it on some of the larger repos I work in :)
- davidkunz 5y agoIf someone is interested in a video showcasing the power of Neovim: https://youtu.be/CcgO_CV3iDo?list=PLu-ydI-PCl0OEG0ZEqLRRuCrMJGAAI0tW https://youtu.be/CcgO_CV3iDo?list=PLu-ydI-PCl0OEG0ZEqLRRuCrM...
- tombh 5y agoI'm in the curiously rare position of being a long time Neo/vim user who doesn't use its modal features. Namely I have all my keybindings setup like a "normal" editor, CTRL+S to save etc. I say it's curious because I've always been surprised that Neo/vim is mainly celebrated as "that modal editor". Whereas for me I celebrate it as the most feature-packed and lightweight terminal editor. Neo/vim is sooo much more than merely its modal editing. With this new release of Neovim maybe there's renewed interest in what Vim is beyond the stereotypes. I wrote a plugin a few years ago that intelligently disables Neo/vim's NORMAL mode [1]. It always seemed such an obvious idea when the majority of editors have their own plugins to intelligently enable Vim-style modality. 1. https://github.com/tombh/novim-mode https://github.com/tombh/novim-mode
- tooltower 5y agoIs this any different from vim's easy mode? I remember that being available as an extra shortcut by default when I tried gvim on windows (> 15 years ago). Easy mode, aka 'evim': https://vonheikemen.github.io/devlog/tools/vim-easy-mode/ https://vonheikemen.github.io/devlog/tools/vim-easy-mode/
- tombh 5y agoIt's in the same spirit certainly, but it's just not complete. For example its interaction with other plugins means you get thrown back into normal mode a lot. Also I just think the name "easy" betrays its real intention as some sort of training wheels for newbies. I'm more interested in making non-modal editing a first class citizen.
- j-james 5y agoVim's "easy mode" also appears to be cut from Neovim (or not accessible by the -y flag, at least)
- majkinetor 5y agoYou just didn't dig it. For example, name me another editor where you can jump in less then a second to any letter of the text ? You always have to click. Contrary to that, editing in vim is like programming since you have editing DSL. All editors provide shortcuts to just some of the editing capabilities (duplicate/delete line, next word, prev word etc.) but not ALL of the imaginable and unimaginable scenarios like vim does, in a way that is instantly programmable to your liking without messing with configuration.
- ccchapman 5y agoHave used Neovim 0.5 for quite some time now. It has been an incredible experience and I cannot see myself moving away. Prior to this I was using coc.nvim. Over the last many months, the Neovim community has certainly lowered the barrier to entry configuring LSP. There were a few times I spent way too many hours attempting to get everything playing well together. The installation process has become much more streamlined and beginner friendly.
- kzrdude 5y agoWhy has it been incredible?
- ccchapman 5y agoThe native LSP support is solid (auto-completion, diagnostic feedback) and there are a wide variety of plugin options to improve the experience e.g. trouble.nvim. Also, Treesitter syntax highlighting makes a notable difference in my experience. The further possibilities with TS are outlined in this thread. Plus the community has shown that Lua support is helping building a solid ecosystem surrounding the new native features. It's really on a different level from YCM, coc, ALE..
- dangom 5y agoDoes neovim, or vim for that matter, offer any out of the box support for remote work like Emacs has with tramp-mode? Asking because maybe it's time to try NeoVim out, but it'd be a limitation for my work if I had to go through extra hops for editing remote files and running remote jupyter kernels. I suppose it does, so I'd be grateful if vimmers out there would share their favorite solutions.
- Scarbutt 5y agoOpen Vim or Emacs on the remote server. A strength about those two is they work from the terminal.
- dangom 5y agoI like to mix and match local and remote files in the same Emacs frame. I know they work remotely, but that'd require me to configure them in the remote - and sometimes that's a pain because Emacs versions differ, or because the keybindings I press in the terminal sometimes coincide with Emacs commands.
- e12e 5y ago> Does neovim, or vim for that matter, offer any out of the box support for remote work like Emacs has with tramp-mode? Not really like tramp mode (doesn't magically (s)ftp files around), but there's headless and tcp connect support, like: https://github.com/Kethku/neovide#remote-tcp-support https://github.com/Kethku/neovide#remote-tcp-support https://neovim.io/doc/user/remote.html https://neovim.io/doc/user/remote.html However - this looks closer? "Seamlessly editing remote files in (Neo)Vim with Netrw and scp" https://gist.github.com/RRethy/ad8a9a3b1112a48226ec3336fa981224#seamlessly-editing-remote-files-in-neovim-with-netrw-and-scp https://gist.github.com/RRethy/ad8a9a3b1112a48226ec3336fa981...
- qu4z-2 5y agoNetrw, as a sibling comment mentions, does this for a number of common protocols (and is built-in). So you just open an file with a URL starting with sftp or whatever. https://www.vim.org/scripts/script.php?script_id=1075 https://www.vim.org/scripts/script.php?script_id=1075
- jgb1984 5y agoI'm a long time (20+ years) vim user, and neovim doesn't fit my use case. I've tried it, most recently today, to have a look at LSP and treesitter. Treesitter added different syntax colors, but the result wasn't necessarily better than vanilla vim. More like an overly decorated christmas tree. LSP and other "make it into an IDE" I usually turn off after a few minutes, it's more of a hindrance than a help. I mainly code in python and don't care for intellisense. Other than that, there's 3 real showstoppers for me: - the obsession with Lua (I personally don't like Lua much, and even to configure treesitter I have to inject little snippets of lua code into my .vimrc). You've got people even trying to rewrite their entire .vimrc in lua, which results in an enormously verbose mess if you ask me. Lua is also what drives the vim and neovim communities further apart. - they removed gvim (which is what I use in most cases). There is no comparable third party GUI like gvim available. They're all either abandoned, unstable or simply very different with lots of bling and gimmicks. - neovim feels less stable than vim. It just crashed on me a few minutes ago when I was trying to configure treesitter. I copy pasted the necessary snippet in my .vimrc and neovim crashes until I take it out. In the 20 years I use vim, I don't think I've ever had it crash on me. Neovim seems more of a "move fast & break things" development model, but I write code for a living so I prefer the rock solid stability of vim. So I'll stay firmly in the vim camp. I appreciate neovim for what it did (kickstart the vim development, which was stagnating at a certain point) but I wished they had re-merged soon after that initial goal was met. Now the communities have split and are drifting ever farther apart. Soon with vimscript9 plugins on one side and lua plugins on the other, the spaghetti will be even harder to untangle.
- tjdevries 5y agoI'll ignore the other parts I disagree with in this post, since it's cool to have different views but I just wanted to post that it may someday be possible to run vim9script plugins in neovim :) I'm working on a project that might allow at least 90% or higher compat here: https://github.com/tjdevries/vim9jit https://github.com/tjdevries/vim9jit Of course, vim9script isn't complete yet, so the spec isn't all the way done, but it may someday be possible to run them in neovim. Additionally, if someone actually just wanted to port all the C code to run or has some other way to make vim9script run, neovim is not opposed to making that happen.
- lefrenchy 5y agoI see a lot of hate on Lua here. Anecdotal but I never wrote any plugins in vimscript. Since moving to Lua a week ago i’ve already written one, and will continue to where I find a use case. Vimscript sucks, using Lua will make it easier for people to contribute I think.
- tjdevries 5y agoThat's great to hear :) As you write more plugins, make sure to submit ideas to Neovim core about how to make Lua even easier and/or more integrated!
- isatty 5y agoPeople generally dislike change. I don’t think it’s about _lua_, anything new would receive the same treatment.
- hajile 5y agoI agree that vim script needs replacement, but I don't know that Lua was the correct answer. It's not a super-popular language and makes some things harder than necessary. Base 1 arrays means you are almost certain to bake in bugs accidentally. Meta tables are even worse though. They result in many subtly different object systems. Maybe that's not as bad in a unified project, but it's the path to a fractured ecosystem. The builtin string library is very barebones which isn't a great place to be in a text editor. Finally, the "regex" match function is hyper limited. I'd argue that either Python or JavaScript would be better.
- jmiskovic 5y ago1-based indexing is boring subject, you just get used to it like you did with 0-based indexing. FORTRAN and Matlab also use it and Julia apparently supports both. The OOP through meta tables is bit more interesting discussion. Meta tables also enable other dispatching mechanisms, if you want to get fancy. In my case I find it makes me reach for OOP less often, which in turn reduces code complexity. I agree that it's frustrating when different libs are each using own OOP implementation. It doesn't matter too much because all those implementations are light and don't pollute the code base. Fractured ecosystem is both good and bad thing. The string handling is kind of a pain point, especially if you are spoiled by Python. I have no idea how Neovim + Lua handle Unicode text? Python is huge & complex language, as well as 10x slower than Lua. JS has more rough edges due to historical baggage, also a fast VM would be much much harder to integrate than Lua. I'd say they would both be worse choices for maintainability and Neovim usability.
- martin1975 5y agoI just came to see how many search hits for "emacs" I will see in the comments, excluding mine, it's 65 :).
- iLemming 5y agoPeople compare them like they have relative differences. I'd argue that they are two incomparable categories. I'm a die-hard Vimmer who uses Emacs, and it's now clear to me that when talking about Vim and Emacs, one has to emphasize their foundational values, ideas at the root. Vim is an amazing, incredible idea. It's the most satisfying and productive way to navigate around any kind of text. And as long as we have keyboard input and keyboards, Vim will stay relevant. And Emacs is based on another fantastic idea. Arguably - the greatest idea in Computer Science to this day. Lisp. And understanding Lisp is a prerequisite required to appreciate the power of Emacs. From my personal experience, when people try to compare one to another - there's usually one-sided incomprehension. They either don't have sufficient experience using Vim, or they lack understanding Lisp.
- salmo 5y agoI started using neovim when it had async and vim would hang. I think vim maybe caught up here, but I found I lost nothing in the move and the snappiness hooked me. I just haven't switched back. The items here are really exciting. VSCode is fine. I use IntelliJ sometimes for larger shared projects. Both I setup with their vim plugins for keybindings because I think in 'vi', but it's not 1:1. I usually can't do things like '!!sh' I have habits for. I have a smattering of plugins that cover most of my language needs, but it would nice to have that more on-par with an IDE or whatever weird space VSCode sits in between an IDE and a text-editor.
- qwerty456127 5y ago> Language Server Protocol is created by Microsoft, RedHat and Codenvy, which provides language features (e.g. completion, navigation, formatting, and so on) through JSON-based RPC protocol... I'm missing out on this. Is it on par (at least potentially - in terms of what it enables you to implement) with JetBrains IDEs and ReSharper already?
- e3bc54b2 5y agoI haven't used LSPs too much, but I'll say they work to a good degree. IDEA is hyper optimized for their target languages, from what I know Intellij builds custom engines for every language, so at least in some aspects (large scale refactoring) and at least for now, IDEA and its siblings are a step ahead. But for 90%ile tasks, LSP is good enough.
- qwerty456127 5y ago> custom engines for every language Isn't a language server an engine custom built for a particular language? > at least for now, IDEA and its siblings are a step ahead. For the languages they supported back then, they have been [almost] as good 10 years ago as they are today. The step seem really huge if there still is nothing nearly catching up.
- e3bc54b2 5y agoIDEA has wicked refactoring abilities. If I rename a class, it will find all the functions whith input param of this class and ask to rename them as well. It can identify class references from plain strings. This is useful at least in Java where xmls reference classes or testdata comes from another variable. The last one may be personal subjective bias, but auto complete options are always spot on, heavily affected by context and recent selection, while LSP auto complete suggestions while good, are a rough estimate of what I want.
- kap7 5y agoI've been a using vim for well over a decade. I switched over to neovim for the native LSP support. I spend most of my time programming in neovim but I also have goland installed which I use for high level refactorings such as "extract method" or "change signature". Once I can do these high level refactors with nvim+gopls then I can finally leave goland. Can't say I really care about more syntax highlighting or lua. Less config is better.
- neycoda 5y agoStill no tab display space saving for indents... why even try
- taf2 5y agoMaybe it’s MacOS or just working in generally larger files but for me vim seems to be lagging more recently… I think it might just my computer but I really find it annoying when typing on my local machine can sometimes lag as if I’m sshed into a remote machine… anyways still way faster editing in vim then not… neovim sounds neat and worth trying
- vladharbuz 5y agoI had this problem in iTerm. Switched to alacritty and it's buttery smooth. Might be worth trying.
- taf2 5y agoah cool thanks i will give it a go...
- mekster 5y agoAre there any inherent reasons that I should switch to neovim from vim? Everytime I try to do that, I don't see immediate benefits and vim kind of catches up or plugins start to support vim and I just go back to vim as all my script keeps working there.
- BadassFractal 5y agoWhat's the recommended way to run nvim on macOS these days? Just run it within Terminal? I recall that unlike on Ubuntu, there was some scrolling lag to it that might have required some tweaking. Not sure if that's the case anymore.
- greyhair 5y agoAs long as I a can keep my fingers on the keyboard, and never touch the mouse, I may give it a try. BTW: unlearning and editor is almost harder than learning a new one. I started with 'ed' in 1984, then 'vi' and plain text terminals (HP-2621) until the mid 1990s, when I get my first actual XTerminal. Then VIM from the mid 1990s until now. The command aspect is highly underrated by people that don't know the commands. The ability to :>% a full block. Things like that. I think that is why most long term Vim users sound like they are insane to other people. Note: In the early 2000s, I worked with a guy that only ever programmed on Windows with Visual Studio. We were coediting (side by side) a large file during some architectural changes, discussing it as we went, and I did one of those :g/this_old_thing/s//new_thing/gp changes on the file and he just yelled "stop". I though I had broken something. He just said what did you just do and how did you do that? So I undid, and slowly retyped the line explaining what each step did, and hit enter. He went out and got a vim book that night. I have to apologize for the mental damage that might have caused him (lol). He picked it up quickly, I showed him a couple plugin I use. (I don't use many, mostly plain stock Vim). I have messed with VSCode a little. I may take a look at Neovim. I looked at it about four years ago, and I guess it just wasn't really ready yet.