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

fix: use pcall for setting up project.nvim #2762

Merged
merged 1 commit into from Jul 31, 2022
Merged

fix: use pcall for setting up project.nvim #2762

merged 1 commit into from Jul 31, 2022

Conversation

lytex
Copy link
Contributor

@lytex lytex commented Jun 25, 2022

I set lvim.builtin.project.active = false in my configuration and caused a lot of errors because project_nvim was being called nonetheless

@rebuilt
Copy link
Collaborator

rebuilt commented Jul 20, 2022

Setting the 'active' configuration option to false doesn't actually uninstall a plugin. Anything in the start folder will automatically be loaded. This is the normal behavior of vim and neovim. To actually uninstall a plugin, you must run a packer command like :PackerSync. This will remove the plugin files from the start folder and the plugin won't run.

Can you list the error message you were seeing so I can understand how this change fixed those errors?

@lytex
Copy link
Contributor Author

lytex commented Jul 21, 2022

I didn't know it was necessary to call :PackerSync

Feel free to close this PR, I assumed every package was meant to be called using a protected call and somehow project_nvim was missing thus causing an error.

@kylo252 kylo252 changed the title fix: Call project_nvim using a protected call fix: use pcall for setting up project.nvim Jul 31, 2022
Copy link
Collaborator

@kylo252 kylo252 left a comment

Choose a reason for hiding this comment

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

I think this is a good practice in general, considering how flaky packer can be. Thanks!

@kylo252 kylo252 merged commit d7da056 into LunarVim:rolling Jul 31, 2022
tomazursic pushed a commit to tomazursic/LunarVim that referenced this pull request Aug 21, 2022
* upstream/rolling: (30 commits)
  chore: bump plugins version (LunarVim#2895)
  feat(installer): handle INSTALL_PREFIX not on PATH (LunarVim#2912)
  docs: fix automatic_servers_installation example (LunarVim#2918)
  docs: fix some typos and enhance readability (LunarVim#2917)
  fix(statusline): display null-ls linters properly (LunarVim#2921)
  docs(windows): update example config (LunarVim#2919)
  refactor(keymaps)!: don't hijack H/L by default (LunarVim#2874)
  chore: bump plugins version (LunarVim#2893)
  fix(lsp): return the actual resolved mason-config (LunarVim#2889)
  docs(windows): update example config for nvim-tree (LunarVim#2766)
  fix(installer): create profile.ps1 if nonexistent (LunarVim#2810)
  fix(lualine): set icon color according to the status of treesitter (LunarVim#2754)
  feat(lvim/lsp): enable tailwindcss by default (LunarVim#2870)
  fix: handle deprecated telescope.builtin.internal (LunarVim#2885)
  refactor!: migrate to mason.nvim (LunarVim#2880)
  feat(whichkey): add default keybindings to cycle to next buffer (LunarVim#2873)
  fix(installer) comment causes antivirus false positives (LunarVim#2818)
  fix(nvimtree): remove `indent_markers` icons trailing space (LunarVim#2854)
  fix: use pcall for setting up project.nvim (LunarVim#2762)
  fix(lvim/lsp/manager): make client_is_configured more reliable (LunarVim#2851)
  ...
tomazursic pushed a commit to tomazursic/LunarVim that referenced this pull request Aug 21, 2022
* upstream/master: (21 commits)
  chore: update changelog
  fix(installer) comment causes antivirus false positives (LunarVim#2818)
  fix(nvimtree): remove `indent_markers` icons trailing space (LunarVim#2854)
  fix: use pcall for setting up project.nvim (LunarVim#2762)
  fix(lvim/lsp/manager): make client_is_configured more reliable (LunarVim#2851)
  perf(cmp): remove redundant check for emmet-ls (LunarVim#2830)
  chore: update changelog
  feat(lsp): bind formatexpr and omnifunc by default (LunarVim#2865)
  chore: bump plugins version (LunarVim#2723)
  fix(packer): add max_jobs = 40 (LunarVim#2781)
  Update general-issue-form.yaml
  refactor(whichkey): use vim.keymap.set directly (LunarVim#2786)
  fix(core.comment): fix default extra mappings (LunarVim#2768)
  fix: typo in utils/installer/install.sh (LunarVim#2776)
  fix(lsp): update format filter for nightly (LunarVim#2773)
  feat: add commands to open/edit lvim logs (LunarVim#2709)
  fix dap-install (LunarVim#2772)
  feat(lsp): add option to override nlsp-settings (LunarVim#2769)
  feat(lsp): add option to override default `nvim-lsp-installer` settings (LunarVim#2698)
  fix(installer): always use check shallow clones (LunarVim#2763)
  ...
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.

None yet

3 participants