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

Add doc about usage with vim-plug #52

Open
edi9999 opened this issue Nov 10, 2022 · 4 comments
Open

Add doc about usage with vim-plug #52

edi9999 opened this issue Nov 10, 2022 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@edi9999
Copy link

edi9999 commented Nov 10, 2022

When I try the following :

call plug#begin('~/.config/nvim/plugged')
Plug 'kevinhwang91/nvim-hlslens'
call plug#end()
lua require('hlslens').setup()

I get following error :

line  260:
E5108: Error executing lua [string ":lua"]:1: module 'hlslens' not found:
        no field package.preload['hlslens']
        no file './hlslens.lua'
        no file '/usr/share/luajit-2.1.0-beta3/hlslens.lua'
        no file '/usr/local/share/lua/5.1/hlslens.lua'
        no file '/usr/local/share/lua/5.1/hlslens/init.lua'
        no file '/usr/share/lua/5.1/hlslens.lua'
        no file '/usr/share/lua/5.1/hlslens/init.lua'
        no file './hlslens.so'
        no file '/usr/local/lib/lua/5.1/hlslens.so'
        no file '/usr/lib/x86_64-linux-gnu/lua/5.1/hlslens.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
        [C]: in function 'require'
        [string ":lua"]:1: in main chunk

It worked well a few months ago (can't tell when exactly it stopped working).

It would be great to add installation instruction for vim-plug.

Also, I'm not much used to using lua in my .vimrc, it would be great to tell more about where you are putting the following :

require('hlslens').setup()
local kopts = {noremap = true, silent = true}
....
...

(source : https://github.com/kevinhwang91/nvim-hlslens#minimal-configuration)

@kevinhwang91
Copy link
Owner

I haven't used vim-plug for a long time. It will hack rtp. I think we should make hlslens work fine with built-in package, h 'packpath'. packer.nvim is a wrapper for built-in package. If you want hlslens work with vim-plug, PR is welcome.

@kevinhwang91 kevinhwang91 added the help wanted Extra attention is needed label Nov 10, 2022
@ngdangdat
Copy link

Hi @kevinhwang91,

I'm currently working on this issue. May I know why we have to use vim.schedule in this case to call the setup function?

I can see the function called in setup file but in the guideline, we have to call it again (with different parameters though).

Thanks in advance!

@kevinhwang91
Copy link
Owner

May I know why we have to use vim.schedule in this case to call the setup function?

Because the initial sequence of plugins may make nvim abnormal. User should initialize hlslens explicitly.

I can see the function called in setup file but in the guideline, we have to call it again (with different parameters though).

Just to warn user invoke setup

@ngdangdat
Copy link

I've created the PR: #62. Kindly help to check. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants