Migrating from Packer.nvim to Lazy.nvim

Поделиться
HTML-код
  • Опубликовано: 27 окт 2024

Комментарии • 121

  • @ElijahManor
    @ElijahManor  Год назад +1

    If you liked this video, please like and subscribe for further content.
    You can also join as a member of this channel for special perks youtube.com/@elijahmanor/join
    If you'd like to connect on social media, you can find me on Twitter twitter.com/elijahmanor and Mastodon hachyderm.io/@elijahmanor

  • @rlifts
    @rlifts 7 месяцев назад +1

    Thanks for the video, I've been under a rock using my huge config for many years lol. Good to know how far neovim has come.

  • @RichardONeil
    @RichardONeil Год назад +7

    I started using Lazy a couple of weeks ago and dropped my startup time by well over half. I like the way you are configuring the plugins here. I think I am going to rework mine again this way.

    • @ElijahManor
      @ElijahManor  Год назад

      Thanks for watching! Yeah, I've really enjoyed it too since I've converted (both personal and work laptops)

  • @johanpalaciose
    @johanpalaciose Год назад +9

    Great video bro, i improved my startup time of 300ms to 36ms :D

    • @ElijahManor
      @ElijahManor  Год назад +1

      Nice work! And wow, that is a great improvement!

  • @vitormelo22
    @vitormelo22 Год назад +3

    Thank you very much for developing this plugin, before migrating to neovim I never had a problem with the Plug. But when using the packer it took me a long time to make it usable.
    With Lazy I configure in minutes without error. Thanks.

    • @ElijahManor
      @ElijahManor  Год назад

      That is great to hear! Glad it has been a good experience. Thanks for watching and supporting the channel.

  • @drewad0
    @drewad0 Год назад +2

    Awesome, easy to digest breakdown. Thank you so much for this!

  • @warrenhenning8064
    @warrenhenning8064 Год назад +2

    I hadn't heard of hyperfine before. Thanks for making this video!

    • @ElijahManor
      @ElijahManor  Год назад

      It's a great tool. Glad you found that interesting

  • @Andrei_Calazans
    @Andrei_Calazans Год назад +1

    Elijah, your video is so good, loved this quick narrative style.

    • @ElijahManor
      @ElijahManor  Год назад

      Thanks so much! I try to keep it snappy

  • @alexandersix_
    @alexandersix_ Год назад +2

    Wow, incredible video! Earned yourself a sub-Lazy looks incredible! I'm planning on rebuilding my Neovim configuration to slim it down a bit, and this seems like a great way to do just that!

    • @ElijahManor
      @ElijahManor  Год назад +2

      Thanks for watching and the sub! If you are starting from scratch you might consider github.com/LazyVim/LazyVim which was VERY recently made and built upon lazy.nvim (created by the same person). It's very flexible like kickstart.nvim. I'll probably give it a try pretty soon and kick the tires.

  • @mainendra
    @mainendra Год назад +5

    Already switched to Lazy. It's awesome 👍

    • @ElijahManor
      @ElijahManor  Год назад +3

      It really is! And it's an active project, so that is great too! So active, that one of the things I talked about is different already ha ha. You can't pass a table to config anymore, there is a new `opts` property instead

  • @bagwaa9948
    @bagwaa9948 Год назад +1

    such a good video, got so much value from so many of your videos, even little things like hyperfine! thanks!!

    • @ElijahManor
      @ElijahManor  Год назад

      Yay, glad you found value from it. And yes, hyperfine is pretty awesome. Handy when something like that is needed

  • @LeviNotik
    @LeviNotik 9 месяцев назад

    Great video. Thank you for this. Finally migrated to lazy from packer.

  • @saucedbenny
    @saucedbenny 3 месяца назад

    great video but can we just get a round of applause for the vim skills? this guy's a wizard

  • @HuntedByAFreak72
    @HuntedByAFreak72 Год назад

    Thank you for introducing hyperfine in this video. I might migrate my neovim setup from packer to lazy some day.

    • @ElijahManor
      @ElijahManor  Год назад

      Yeah, I've found it useful for other things. I've been enjoying lazy.nvim, hope you like it too. If you'd like to try something from scratch LazyVim is interesting as well that builds on top of lazy.nvim. I have a playlist that I'm building on it ruclips.net/video/N93cTbtLCIM/видео.html

  • @fernandotta
    @fernandotta Год назад +1

    Thanks! This saved me a bunch of time!

    • @ElijahManor
      @ElijahManor  Год назад

      You're welcome and thank you so much for the awesome support! I have more content started and plenty more in the backlog. Have an awesome day!

  • @anasouardini
    @anasouardini Год назад +1

    I just gave it a try. and thank god I baked up my old setup.
    spent two hours trying to figure out why lazy can't find mason and lsp-saga

    • @ElijahManor
      @ElijahManor  Год назад

      Oh wow, I'm so glad you were able to recover as well. What ended up being the problem , how did you fix it, and what operating system are you using?

  • @wata1991
    @wata1991 Год назад +3

    also the search / replace and macro stuff is something I don't leverage at all, would love to learn more about it!

    • @ElijahManor
      @ElijahManor  Год назад +5

      Great recommendation! I could see those as great future videos. I can add them to the list, but I have a lot of ideas floating around so not sure when that would be. Thanks for watching and commenting!

  • @IkraamDev
    @IkraamDev Год назад +4

    Wow, there's always a new and better way to organise your Neovim config.

    • @ElijahManor
      @ElijahManor  Год назад +2

      Indeed! I'm starting on material for a new video to show yet another way ha ha ha. Stay tuned

  • @kcinszokor
    @kcinszokor Год назад

    Great video-subscribed! I hope you continue with the Neovim videos.

    • @ElijahManor
      @ElijahManor  Год назад +1

      Thanks for the sub! And yes, my next video will be Neovim related. Then I hope to have tmux parts 2 & 3 that will build upon my initial tmux intro ruclips.net/video/o-fwkpOy4j8/видео.html

  • @AmirHosseinHonardust
    @AmirHosseinHonardust Год назад

    I started loving configuring my neovim again!

    • @ElijahManor
      @ElijahManor  Год назад

      Oh yes, I agree. lazy.nvim is such a nice tool. I feel it simples a lot of concerns, is very fast out of the box, and provides a lot of niceties. Thanks for watching, much appreciated

  • @SVENY
    @SVENY Год назад +4

    Wow, watching you maneuver nvim like it's your native language is an art. Also, Arc browser, nice! I'd use it more but it kills my battery quicker than any other application.

    • @ElijahManor
      @ElijahManor  Год назад

      Thanks, I am much more aware of what I'm doing when I record :) And yes Arc is amazing. It does use a lot of memory for me (which may also be a battery killer). I know they actively try to address that so hopefully it'll get better over time

  • @darknetworld
    @darknetworld Год назад

    Oh great features and good information to learn better way to sort packages.

    • @ElijahManor
      @ElijahManor  Год назад

      Glad it was helpful! Thanks for watching and leaving a comment. Hope you have a great rest of the day

  • @CZiNTrPT
    @CZiNTrPT Год назад +1

    Nice. Spent the weekend doing the same, should have watched this first 🤠

    • @ElijahManor
      @ElijahManor  Год назад +1

      You are a go getter! I've been pleased with the results. Hope you enjoy it

    • @CZiNTrPT
      @CZiNTrPT Год назад

      @@ElijahManor ah there is always still more tinkering Todo. Also converting all .vim files takes a while. But it's needed `checkhealth which_key` simply crashes currently 😢😂

    • @ElijahManor
      @ElijahManor  Год назад

      Ohh... you figure out why it crashes? I've not see that

    • @CZiNTrPT
      @CZiNTrPT Год назад

      @@ElijahManor no, I'm currently trying to slim down LazyVim by forking it, but it's tricky because it's hardcoded to go back to the LazyVim/LazyVim repo. I guess it's because I'm a) overriding a lot from LazyVim and b) have a lot of keymaps still in .vim files

    • @ElijahManor
      @ElijahManor  Год назад

      @czintrpt5585 Instead of forking, you could disable a lot of what it does internally... like { "folke/trouble.nvim", enabled = false } I'll be showing an example of that in my upcoming video. hope you get yours worked out. yeah, trying to slowly migrate (some lazy, some .vim files) sound tricky. Here is a link to docs for disabling www.lazyvim.org/configuration/plugins#-disabling-plugins

  • @picklypt
    @picklypt Год назад

    This is such a great video. Thanks so much. AMAZING!

    • @ElijahManor
      @ElijahManor  Год назад

      Glad you enjoyed it! I had fun putting it together. I'm thinking of doing a video on LazyVim, which is built upon lazy.nvim. I started using it last Friday and find it very compelling. It would be fun to kick the tires and show how to get started and explain some of what it provides and how to extend it

  • @SayfSentinel
    @SayfSentinel Год назад +1

    Nice serie. Love the content

    • @ElijahManor
      @ElijahManor  Год назад +1

      Thank you so much! Thanks for watching

  • @michaelcarnevale5620
    @michaelcarnevale5620 Год назад

    rly useful video thanks!

    • @ElijahManor
      @ElijahManor  Год назад +1

      Glad you liked it! Thanks for watching and the encouragement

  • @kevinsoewondo
    @kevinsoewondo 10 месяцев назад

    Thank you so much!!

  • @ogge88
    @ogge88 Год назад

    Great video, thank you! You got a new subscriber

    • @ElijahManor
      @ElijahManor  Год назад

      Awesome, thank you! Appreciate you watching and subscribing!

  • @muchzill4
    @muchzill4 Год назад

    Thanks for making this. 👍

    • @ElijahManor
      @ElijahManor  Год назад

      Thanks! Hope it was helpful to you!

  • @devonduty
    @devonduty Год назад

    Awesome video!

    • @ElijahManor
      @ElijahManor  Год назад +1

      Thanks David! I love watching your videos. I've learned a lot from you. I appreciate your impact on the community.

    • @devonduty
      @devonduty Год назад +1

      @@ElijahManor thank you, that's very kind of you. Keep up the good work!

  • @MaxwellsLab
    @MaxwellsLab Год назад +1

    You should mentioned there are other keywords used by packer that lazy replaced. For instance I has to replace "as" with "name" to fix catppuccin.

    • @ElijahManor
      @ElijahManor  Год назад

      True, I didn't list all the differences between packer and lazy.nvim and I can see value in expanding that area a bit more. I was mostly focused on converting kickstart.nvim to lazy.nvim as an example of common things that may need to be changed. I did reference the migration guide github.com/folke/lazy.nvim#packernvaround the 3:32 mark in the video ruclips.net/video/aqlxqpHs-aQ/видео.html to hopefully let others know of other potential areas that may need changing as well. It was also a bit tricky because the project was still actively changing around when I recorded. Thank you for watching and I appreciate the comment.

  • @stoicfloor
    @stoicfloor Год назад +1

    This video is amazing! I just migrated to lazy.nvim in less than 30 min! Thank you!

    • @ElijahManor
      @ElijahManor  Год назад

      Awesome, that is great to hear and exactly the point of the video. So cool! You are very welcome. Thanks for the watch and the comment

  • @alonso0188
    @alonso0188 11 месяцев назад

    Thank you manito.

  • @greendog105
    @greendog105 Год назад +1

    I am having a hard time changing all my lua config modules into a thing that returns a table. Some are very straightforward to do, others are not. 😢

    • @ElijahManor
      @ElijahManor  Год назад

      Ah yes, the conversion may not be as straightforward as I showed in my example. However, I have very much enjoyed lazy.nvim Hope things work out for you!

  • @micmine
    @micmine Год назад

    I have just migrated 3 Days ago. So far i am very happy.

    • @ElijahManor
      @ElijahManor  Год назад

      Oh that is great! I've really enjoyed it since I migrated. Glad you are liking it too!

  • @colydeane
    @colydeane Год назад

    great video. i've switched to lazy.nvim. was using kickstart before but it was always just that, a gateway to a better config and for me lazy ticks all the right boxes for my use case.

    • @ElijahManor
      @ElijahManor  Год назад +1

      Yes, I started with a custom config for a year or so, then shifted to kickstart.nvim for a couple months as well... but now using lazy.nvim (from packer) and that is amazing! Also JUST recently started using LazyVim (which is based on lazy.nvim) made by the same author of lazy.nvim. I'm working on a video of that showing install, many features, and how to extend.

  • @lilalomoslama
    @lilalomoslama Год назад

    great video! ❤

    • @ElijahManor
      @ElijahManor  Год назад

      Thank you!! Glad you liked it! I have another one that should be come out in the next few days. Editing is taking a bit longer than I had expected.

    • @lilalomoslama
      @lilalomoslama Год назад +1

      looking forward to it!

  • @bramble-east
    @bramble-east Год назад +1

    Great, thanks for sharing! Can you please explain how do you achieve the LSP stats in the bottom right?

    • @ElijahManor
      @ElijahManor  Год назад +1

      I think you are referring to the plugin called fidget github.com/j-hui/fidget.nvim which is a standalone UI for nvim-lsp progress. It can be helpful to know what is going on from buffer to buffer. Also, thanks for watching!

    • @bramble-east
      @bramble-east Год назад

      @@ElijahManor that is it, thank you!

  • @abdellahcodes
    @abdellahcodes Год назад +1

    My config had collected dust and my nvim became bloated and unusable
    Gave it a tweak today
    Blazing fast startup time 🔥

  • @kqvanity
    @kqvanity Год назад

    I used to have a modular configuration i.e., I can have packer required up at the top, and use a function of it to load a plugin at whichever place later on.
    I guess it'd become quite limiting reverting to have it all within a single table.

    • @ElijahManor
      @ElijahManor  Год назад +1

      Depending on your setup it could be quite the refactor, but I have come to enjoy the new setup. Hope you are doing well and enjoying your weekend

    • @kqvanity
      @kqvanity Год назад

      Thanks! Hope you had a great one too.
      It's considerably way faster now. I've heard you saying that packer does offer lazy loading too, and I was thinking of giving it a try, but unfortunately my branch got merged somehow, and I'm not reverting back to previous commits :)

  • @Qazi-it9mo
    @Qazi-it9mo 4 месяца назад

    How do we know which keys to use for all the plugins?

  • @SayfSentinel
    @SayfSentinel Год назад

    Could you please make an in-dept tutorial on how to debug javascript/typescript using nvim-dap or any debugging plugins ?

    • @ElijahManor
      @ElijahManor  Год назад

      Great question! I tend to do mostly front-end web dev and when I debug it is usually in the browser (using `debugger`, break points, or `console.log`). Do you focus on front-end or back-end TypeScript/JavaScript?

  • @ebiscaia
    @ebiscaia Год назад

    Hi mate,
    Is there a place you could indicate to learn regex? I really liked that substitution you made.
    Cheers

    • @ElijahManor
      @ElijahManor  Год назад +1

      Hmm... I don't know of any great resources. I should add this to my list of future videos. You could look here learnbyexample.gitbooks.io/vim-reference/content/Regular_Expressions.html but it might be a little overwhelming.

    • @ebiscaia
      @ebiscaia Год назад

      @@ElijahManor Thanks, mate. Just having a look at it.

  • @MikeMcBride1007
    @MikeMcBride1007 Год назад

    Did you just use apt-get on macOS? How?? I thought it wasn’t compatible since macOS is based on BSD… or are you running this inside a container?

    • @ElijahManor
      @ElijahManor  Год назад +1

      Great question! Recently I've been recording my videos using a docker container running linux (specifically debian). I wanted to switch away from running directly on my mac so I could have a cleaner starting point so that I could better teach (and cover) steps that others would encounter. Earlier in my videos I was recording straight from my mac.

    • @MikeMcBride1007
      @MikeMcBride1007 Год назад

      Thanks! Makes sense :) loving the content by the way! Keep up the great work!

    • @ElijahManor
      @ElijahManor  Год назад

      Thank you so much. I've have a fun time making them. Glad some find them helpful

  • @ogge88
    @ogge88 Год назад

    A question; i have migrated from packer to lazy now but I have discovered that i sometimes get annoying errors when other packages tries to request packages that aren't loaded yet. One example could be settings for bufferline/barbar if nvim-tree/neotree is open and I lazy load the file explorer. What do you think is the best way to handle that? Is a if statement in the config a reasonable solution, like;
    if not package.loaded[package] == "nill" then: whatever
    Or is it s more elegant solution?

    • @ElijahManor
      @ElijahManor  Год назад

      Hmm, I've not experienced that. The ones that are lazy are also supposed to load when/if the point other code requires them (in addition to whatever commands, keys, etc you setup). Also, I wonder if that was a bug that was recently squashed? github.com/folke/lazy.nvim/blob/main/CHANGELOG.md

    • @ogge88
      @ogge88 Год назад +1

      @@ElijahManor It very well could have been that bug because now i don´t get an error anymore and nvim-tree gets loaded, but i´m happy i got that bug because i don´t want my file tree to load at the same time as my bufferline and i´m pretty satisfied with my solution and it should apply to more cases.
      In short, put it in a function and return it. When you need it, call the function.
      In user/barbar.lua i added:
      local M = {}
      -- Offset for filetree
      function M.nvimtree()
      if package.loaded["nvim-tree"] then
      local nvim_tree_events = require('nvim-tree.events')
      local bufferline_api = require('bufferline.api')
      local function get_tree_size()
      return require'nvim-tree.view'.View.width
      end
      nvim_tree_events.subscribe('TreeOpen', function()
      bufferline_api.set_offset(get_tree_size())
      end)
      nvim_tree_events.subscribe('Resize', function()
      bufferline_api.set_offset(get_tree_size())
      end)
      nvim_tree_events.subscribe('TreeClose', function()
      bufferline_api.set_offset(0)
      end)
      end
      end
      return M
      And then when i actually load nvim-tree i call that function.
      local barbar_ok, barbar = pcall(require, "user.barbar")
      if not barbar_ok then
      print(barbar)
      else
      barbar.nvimtree()
      end

  • @ajyn17
    @ajyn17 Год назад

    Could you do a tutorial of the vim key bindings you did for all the search and replace actions

    • @ElijahManor
      @ElijahManor  Год назад +1

      I do have in my list a video to cover searching and replacing techniques across multiple files. Are you referring to that or also the in page search/replace? I could see maybe a multi-part series covering different topics slower than what I was showing in that video. The point of this one, was more about how to convert and less exactly how I did it (the keystrokes). Thanks for the recommendation and the watch!

    • @iEatSponge
      @iEatSponge Год назад +1

      @@ElijahManor I assume he means the in-selection search and replace like at 2:43. I have no clue how to do that! Great video.

    • @ElijahManor
      @ElijahManor  Год назад +1

      Ahh for that I did `vi{` to visually select the inner content between the curly braces. Then you press `:` to enter command mode. If you have a visual selection (which we just did) it'll prepend it with '

    • @windowsrefund
      @windowsrefund Год назад +1

      @@ElijahManor The 'o' used to jump from between top and bottom has wrecked my mind.

    • @ElijahManor
      @ElijahManor  Год назад

      @@windowsrefund yeah, that is really handy when you have a visual selection

  • @Redyf
    @Redyf Год назад

    Btw what terminal font is that? Great video!

    • @ElijahManor
      @ElijahManor  Год назад

      Thanks! And I use a Nerd Font patch of JetBrainsMono

    • @mrlectus
      @mrlectus Год назад +1

      @@ElijahManor And what is the terminal color scheme? not neovim, the terminal?

    • @joshuatye1027
      @joshuatye1027 Год назад

      @@ElijahManor The best font!

    • @ElijahManor
      @ElijahManor  Год назад +1

      @@mrlectus I've been using the Catppuccin Kitty Macchiato theme for Kitty github.com/catppuccin/kitty/blob/main/macchiato.conf

  • @wata1991
    @wata1991 Год назад

    is there anywhere to see your current neovim config?

    • @ElijahManor
      @ElijahManor  Год назад +1

      Great question, I'm in process of switching a lot of things around so my published config is really out of date. For the last couple months I was using github.com/nvim-lua/kickstart.nvim as my starting point (with tweaked to extend it). I outlined what that could look like in this video ruclips.net/video/hnTXJGm8VBA/видео.html however as of super recent I'm playing with LazyVim (which is a project built on top of lazy.nvm). I'm planning on making a video on this setup, how to use it, how to extend it, etc... I'm very excited about it. Here is the repo in the meantime github.com/LazyVim/LazyVim

  • @agustinfaure8824
    @agustinfaure8824 Год назад

    What's the name of the browser you're using?

    • @ElijahManor
      @ElijahManor  Год назад +1

      The browser is called Arc arc.net/ and it has been my primary web browser for several months. It's current in invite mode only, but II regularly share 5 invites on Fridays on my Twitter and Mastodon accounts. You can learn more about the browser from Chris Coyier's post chriscoyier.net/2022/12/08/whats-good-about-the-arc-browser/ You can also try to search for "hey, here’s an invite to Arc, the browser I was telling you about!" on social media because that is the default language used when sharing invites

  • @megasuperlexa2
    @megasuperlexa2 Год назад +1

    watching at .25 speed, still do not get some movements 😂

    • @ElijahManor
      @ElijahManor  Год назад +1

      I've written my own screenkey type equivalent for macOS that is better than what I used in that video. Sorry it was hard to follow. I didn't like it either, which is why I wrote a custom program to help future videos.

  • @EuCaue1
    @EuCaue1 Год назад

    Nice video!! :)
    But for some reason, my nvim-cmp doesn't work at all. :(

    • @ElijahManor
      @ElijahManor  Год назад

      Thanks! Hmm, at what point did it stop working? The version I started from github.com/nvim-lua/kickstart.nvim still works after the conversion. I'd imagine each conversion would have it's own idiosyncrasies based on how their were initially setup. I've seen very different packer setups across repos

    • @ElijahManor
      @ElijahManor  Год назад

      I think I see your problem. Here is a gist of what might fix it gist.github.com/elijahmanor/e476a59fadef3f7f152319d13558280f

  • @rmschindler144
    @rmschindler144 Год назад +2

    I’m very light on plugins, so lazy-loading wasn’t that great a selling point. nevertheless, I tried Lazy.nvim. at length I moved to the much, much simpler (in terms of features) Paq, and I’m very happy I did. for me, Lazy.nvim had too many features to figure out. in case someone else values simplicity, I wanted to put Paq on your radar.

  • @amit12000
    @amit12000 Год назад

    great video how use lazy.nvim in very simple way

    • @ElijahManor
      @ElijahManor  Год назад

      Glad it was helpful! Thanks for the sub too

  • @Tony_Sol
    @Tony_Sol Год назад

    Well, after dumb-doing all this migrations, at first, startup time of my setup increases and nvim launched with full screen of errors, BUT! After i made all these steps thinking about WHAT i actually do and why, it became just right
    I've got boost from "1.008 s ± 0.192 s" with packer to "753.4 ms ± 45.4 ms" with lazy.nvim - still too much, but -25% is -25%
    So excited to play with lazy.nvim configs, hope will make it faster

    • @ElijahManor
      @ElijahManor  Год назад +1

      Oh good, glad it's a bit better! It's a good opportunity to look at what plugins you really need and what you actually use. Also good to look at what plugins could be lazy loaded until the last moment either by a keymapping or a command.

  • @stoicfloor
    @stoicfloor Год назад +1

    awesome video! could we have your dotfiles though? thank you!

    • @ElijahManor
      @ElijahManor  Год назад +1

      Unfortunately my docker image that had the ending point of this video was deleted, so I don't have that handy to push. However, you can look at this older version github.com/elijahmanor/dotfiles/tree/lazy/nvim/.config/nvim
      I'm working on a new setup (since this video) and I'll be making a new video to describe it. I'll make sure to push the final product of the new video somewhere and link it in the description. Thanks for the suggestion!