LuaSnip icon indicating copy to clipboard operation
LuaSnip copied to clipboard

What is the next step after installing jsregexp using luarocks?

Open Jaehaks opened this issue 1 year ago • 2 comments

I am windows 10 user.

I failed to link jsregexp.so using gcc. gcc cannot recognize the libraries, -L options doesn't work

image

Anyway, For alternative method, I install jsregexp using luarocks image

Although I installed jsregexp, :checkhealth LuaSnip cannot recognize jsregexp library image

:lua =require('luasnip.util.util).jsregexp output is nil still as you said in #986

Could you notice some guide after installing jsregexp using luarocks?

Jaehaks avatar May 18 '24 05:05 Jaehaks

It's possible that jsregexp is installed for the wrong lua-version, could you check your :version, especially which lua-version it references? For me, for example it's LuaJIT. I'm sure the lua-version can be adjusted somehow for luarocks :)

L3MON4D3 avatar May 18 '24 06:05 L3MON4D3

@L3MON4D3

Ok.. I tried to install lua 5.1 version and jsregexp, but it failed. I'll check other way installing possible. Thanks

Jaehaks avatar May 25 '24 11:05 Jaehaks

Botherd me a few days, finally, I find a solution to this.

It's possible that jsregexp is installed for the wrong lua-version, could you check your :version, especially which lua-version it references? For me, for example it's LuaJIT. I'm sure the lua-version can be adjusted somehow for luarocks :)

Exactly, we should match the installed lua version to take effect. the easiest way to do this is through install DEVCOM.LuaJIT by winget:

winget install DEVCOM.LuaJIT

In which the lua used by luarocks is version 5.1, and then use luarocks to install jsregexp:

luarocks install jsregexp 0.0.5-1

finally, jsregexp will take effect on luasnip windows.🥳

Jecrevin avatar Oct 10 '24 08:10 Jecrevin

If you are still having problems with jsregexp - https://github.com/L3MON4D3/LuaSnip/issues/986#issuecomment-2425313904 or check other comments in that issue

dev4s avatar Oct 21 '24 00:10 dev4s