Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(pack): BREAKING CHANGE, migrate to lazy.nvim as package manager. #425

Merged
merged 28 commits into from
Jan 26, 2023

Conversation

ayamir
Copy link
Owner

@ayamir ayamir commented Jan 15, 2023

No description provided.

@ayamir ayamir requested a review from Jint-lzxy January 15, 2023 09:59
@ayamir ayamir marked this pull request as draft January 15, 2023 09:59
@ayamir
Copy link
Owner Author

ayamir commented Jan 15, 2023

A weird problem:
image

@ayamir ayamir mentioned this pull request Jan 15, 2023
@ayamir ayamir marked this pull request as ready for review January 15, 2023 10:37
@ayamir ayamir linked an issue Jan 15, 2023 that may be closed by this pull request
@ayamir
Copy link
Owner Author

ayamir commented Jan 15, 2023

A weird problem: image

Also appears for main branch, so it's a upstream issue and have nothing to do with lazy.nvim.

@ayamir
Copy link
Owner Author

ayamir commented Jan 16, 2023

vim-startuptime -vimpath nvim -count 100 test result with lazy load all of plugins:

image

@ayamir ayamir self-assigned this Jan 16, 2023
@Jint-lzxy Jint-lzxy linked an issue Jan 16, 2023 that may be closed by this pull request
1 task
@Jint-lzxy
Copy link
Collaborator

🎉 Will test this PR after other changes are made. There might be some corner cases to consider.

@nullchilly
Copy link
Contributor

nullchilly commented Jan 17, 2023

A weird problem: image

nvimdev/lspsaga.nvim#720

Edit: Already been done here 6f3eddb 😅

Copy link
Owner Author

@ayamir ayamir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

colorscheme can be lazy loaded for lazy.nvim.

@Jint-lzxy
Copy link
Collaborator

colorscheme can be lazy loaded for lazy.nvim.

@ayamir I didn't set lazy load for catppuccin because it is listed as the colorscheme that would be tried to load when starting an neovim instance.

Doc from lazy.nvim:

-- try to load one of these colorschemes when starting an installation during startup
colorscheme = { "habamax" },

@Jint-lzxy
Copy link
Collaborator

The issue: #426 about plugins not being loaded when creating a new empty buffer/named file has been resolved. At the same time, the loading sequence has also been optimized to try to load as few plugins as possible before UIEnter. Except for GitHub action, which has not been written, this PR LGTM 👍

@Jint-lzxy
Copy link
Collaborator

After merging these commits, we should also remind users to remove packer-related files. rm -rf ~/.local/share/nvim/site/pack

@nullchilly
Copy link
Contributor

Suggession: Remove config.lua and use https://github.com/folke/lazy.nvim#-structuring-your-plugins, looks much cleaner and easier to maintain IMO: https://github.com/LazyVim/LazyVim/tree/main/lua/lazyvim/plugins

@CharlesChiuGit
Copy link
Collaborator

Suggestion: Remove config.lua and use folke/lazy.nvim#-structuring-your-plugins, looks much cleaner and easier to maintain IMO: LazyVim/LazyVim@main/lua/lazyvim/plugins

I use this kind of structure in my personal config too, it's indeed much easier to maintain.
However, there's one small down side. Splitting config.lua into multiple files will cause the time for sumneko_lua to process all workspace's file to increase a bit, at least when using packer. Personally, I'm willing to trade a slightly increased diagnostic time for a better structure.

@CharlesChiuGit
Copy link
Collaborator

Ok, let me see if i can reproduce it on another machine. Or maybe it's just a one-time thing.

After pulling the latest commit on this branch, that error didn't happened again. Maybe it's just a one-time error or Jint-lzxy fixed it.

@Jint-lzxy
Copy link
Collaborator

Jint-lzxy commented Jan 21, 2023

Suggestion: Remove config.lua and use folke/lazy.nvim#-structuring-your-plugins, looks much cleaner and easier to maintain IMO: LazyVim/LazyVim@main/lua/lazyvim/plugins

I use this kind of structure in my personal config too, it's indeed much easier to maintain. However, there's one small down side. Splitting config.lua into multiple files will cause the time for sumneko_lua to process all workspace's file to increase a bit, at least when using packer. Personally, I'm willing to trade a slightly increased diagnostic time for a better structure.

Sounds great! IMO the issue related to lua-language-server is trivial - ensuring that the file structure is easier to maintain should be of first priority. Changes will be pushed in a few days 👍

btw, happy Chinese New Year 🥳 新年快乐,兔年大吉!

@CharlesChiuGit
Copy link
Collaborator

Happy lunar new year!

@ayamir
Copy link
Owner Author

ayamir commented Jan 21, 2023

新年快乐!

@nullchilly
Copy link
Contributor

Happy lunar new year! (I'm from Vietnam :)

@Jint-lzxy
Copy link
Collaborator

@ayamir @CharlesChiuGit I've implemented the first draft of #425 (comment). The action log can be found here.

The following changes have been made:

  • Install script now checks and supports non-interactive installation;
  • CI file added (has write access).

CI has the following characteristics:

  • Update the lock file at 01:30 UTC (09:30 CST) every day;
  • Changes are commited by github-actions[bot];
  • Check the files before updating (see the source code for more information)
  • The lockfile is updated only when the CI is executed in the parent repository (i.e., ayamir/nvimdots) and current branch is main.

I will push these changes if there are no issues 👍

@CharlesChiuGit
Copy link
Collaborator

I don't have pc around me in a few days. Will check once i got home.

@ayamir
Copy link
Owner Author

ayamir commented Jan 25, 2023

@ayamir @CharlesChiuGit I've implemented the first draft of #425 (comment). The action log can be found here.

The following changes have been made:

  • Install script now checks and supports non-interactive installation;
  • CI file added (has write access).

CI has the following characteristics:

  • Update the lock file at 01:30 UTC (09:30 CST) every day;
  • Changes are commited by github-actions[bot];
  • Check the files before updating (see the source code for more information)
  • The lockfile is updated only when the CI is executed in the parent repository (i.e., ayamir/nvimdots) and current branch is main.

I will push these changes if there are no issues 👍

No problem, I want to merge this pr as soon as possible.

Copy link
Collaborator

@Jint-lzxy Jint-lzxy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR LGTM 🍊

Minor updates such as #425 (comment) will be pushed in the form of patches later 👍

@CharlesChiuGit
Copy link
Collaborator

CharlesChiuGit commented Jan 27, 2023

So will the config.lua split into multiple files in the future?

@Jint-lzxy
Copy link
Collaborator

So will the config.lua split into multiple files in the future?

Yes, but IMO we should first discuss how to classify these configs.

@CharlesChiuGit
Copy link
Collaborator

ok, i'll open a draft and perhaps we can discuss there.

vkingw pushed a commit to vkingw/nvimdots that referenced this pull request Feb 7, 2023
refactor(pack): BREAKING CHANGE, migrate to lazy.nvim as package manager.
YanTree pushed a commit to YanTree/nvim that referenced this pull request Apr 9, 2023
refactor(pack): BREAKING CHANGE, migrate to lazy.nvim as package manager.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lualine doesn't show after create a new file Migrate to lazy.nvim
5 participants