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

Lazy.nvim support, as it does not support rocks. #18

Closed
vsedov opened this issue Mar 17, 2023 · 6 comments
Closed

Lazy.nvim support, as it does not support rocks. #18

vsedov opened this issue Mar 17, 2023 · 6 comments

Comments

@vsedov
Copy link

vsedov commented Mar 17, 2023

As of the moment lazy.nvim does not support rocks, is there another way of installing this plugin ?

@vsedov vsedov changed the title Lazy.nvim Lazy.nvim support, as it does not support rocks. Mar 17, 2023
@jghauser
Copy link
Owner

I've been wondering about that! I was thinking about directly integrating lyaml as a git submodule, but I think that can't work, because lyaml has parts written in C that need to be compiled. I guess you could install the lyaml rock independently on your system and then fiddle with with neovim's package.path and package.cpath so that neovim recognises the rock. If you come up with something reasonable that I could do to support lazy.nvim (or that would allow me to read .yaml files without having to require a luarock), please do let me know!

@vsedov
Copy link
Author

vsedov commented Mar 17, 2023

atm my not so genius idea is bassicly doing lua rocks

luarocks --lua-version version --local install lyaml


path = "/home/name/.luarocks/lib/lua/5.1/yaml.so"
package.cpath = package.cpath .. ";" .. path
require("lyaml")

its scuffed but atm it kinda works . I need to actually properly use it first to see if this is a viable idea or not, atm its not erroring out anymore >.<

@jghauser
Copy link
Owner

That's great! Would be great if you could get back to me after testing this for a while. I'll then update the installation instructions so that lazy.nvim users can install this too (at least until we find a less clutch way of doing this). Thanks!

@vsedov
Copy link
Author

vsedov commented Mar 17, 2023

Update this works, but, adding it to package.path doesnt really work i had to do some even more scuffed work around for now .

image

where i just moved those files to my config, that being said im pretty certain there is a better way for this. Regarding the yaml.so path, that you can directly add through luarocks command xd

I have a even more scuffed idea of just copying those files from lyaml, and the yaml .so and just making another package. Mainly because


path_yaml = "/home/viv/.luarocks/share/lua/5.1/lyaml/"
package.path = package.path .. ";" .. path_yaml .. "?.lua"

This wont work or any other solution i conjured up, but the only one that does, and ive tested papis, works fine is adding it to yer config xd.

On that note, while messing around with my papers, papis seemed to work without any errors.

@jghauser
Copy link
Owner

I've just checked in my local installation how the paths are set up. This is on nixos, so things look a bit different, but maybe this is helpful for you. The relevant paths seem to be:

  • package.path /nix/store/4ky29380a282m5iwrw3ma9wslih5h407-luajit2.1-lyaml-6.2.7-1/share/lua/5.1/?.lua;/nix/store/4ky29380a282m5iwrw3ma9wslih5h407-luajit2.1-lyaml-6.2.7-1/share/lua/5.1/?/init.lua
  • package.cpath: /nix/store/4ky29380a282m5iwrw3ma9wslih5h407-luajit2.1-lyaml-6.2.7-1/lib/lua/5.1/?.so

Maybe this is helpful to avoid having to move files around.

@jghauser
Copy link
Owner

jghauser commented May 5, 2023

This is now solved by #19

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

No branches or pull requests

2 participants