Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

[resolved] setting up without an plugin manager #38

Closed
thchha opened this issue Apr 22, 2020 · 1 comment
Closed

[resolved] setting up without an plugin manager #38

thchha opened this issue Apr 22, 2020 · 1 comment

Comments

@thchha
Copy link

thchha commented Apr 22, 2020

Since I do not use any plugin manager I did the default procedure for installing a plugin with the build in plugin loader capabilities provided by neovim.

When neovim does the initial loading of the packages, even though they are correct on the path as it appears to me, it can not resolve the modules.
So only after neovim has completed its startup the modules can correctly be resolved.
This implies a warning each time starting nvim.

To resole this, I did the following steps - I am creating an issue instead of a pull request, since it appears to me that this is an issue of either neovim itself nor of the lsp-config's but your plugin.
be an issue of neovim, already reported:

neovim/neovim#11409
Lua: search 'packpath' from require() without :packloadall

Anyway, here I document my steps:

additonal steps (no plugin manager)

  • Before setting up nvim-lsp in your init.vim: Prepare the runtimepath with :packloadall as described as an (probably temporarily) workaround in the mentioned issue above. Thats it.
  • When setting up without a plugin manager nvim will not find the module on
    first load. So you need to prepare the package.path for making all lua-files accessible:
    local tmp = package.path
    local git_plug_path = '/.local/share/nvim/site/pack/git-plugins/start'
    package.path = vim.loop.os_homedir() .. git_plug_path .. '/completion-nvim/lua/?.lua'
    local completion = require 'completion'
    package.path = tmp

Same thing is required for diagnostic-nvim. Note that you need semicolons for multiple paths. It works on the end of the string aswell '/completion-nvim/lua/?.lua;'

@haorenW1025
Copy link
Collaborator

Thanks for the detailed information! I create a link from wiki to here in case if anyone need it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants