-
-
Notifications
You must be signed in to change notification settings - Fork 247
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(jsregexp): fix install_jsregexp on Windows #1252
Conversation
Failed with
|
I am not sure if the failing test was due to timeout or snippet file not being saved before running the test case. Those failed snippets work on my local machine. |
|
Hey, thanks for this PR, I don't have Windows currently, so that's a great help :) |
Oh, I forgot that my origin master was too old. Thanks for pointing that out. |
2edd3b9
to
e3350be
Compare
@L3MON4D3 tests passed after rebasing. |
e3350be
to
2e30453
Compare
These changes look really good ( If you could satisfy my curiosity regarding the |
I took the
Initially, I thought this is a I believe it's better to use |
50fb1cf
to
6b70c83
Compare
Ahh gotcha, I didn't catch that these are supposed to catch specific errors, your explaination helped :) |
@xudyang1 I don't know why my windows machine still builds fail. I installed
My Lazy config {
"L3MON4D3/LuaSnip",
dependencies = "rafamadriz/friendly-snippets",
build = vim.g.os == "Windows" and "make install_jsregexp CC=gcc.exe SHELL=sh.exe .SHELLFLAGS=-c"
or "make install_jsregexp",
} |
LazyNvim support luarocks and jsregexp is installed via luarocks. I guess we can config like this (just guessing...) {
"L3MON4D3/LuaSnip",
dependencies = {
"rafamadriz/friendly-snippets",
"kmarius/jsregexp",
},
} |
@KevinNitroG It did not work for me, LuaSnip still complains that jsregexp is not installed, even though lazy installed jsregexp successfully. |
I don't know how to check have LuaSnip recognized jsregexp installed... How can we do that? |
@KevinNitroG just execute :checkhealth in neovim and go to luaSnip. |
@xudyang1 sh.exe (git) doesn't recognize uname command when the build happens. |
@mez0ru now it's fine on my win machine with this setup {
"L3MON4D3/LuaSnip",
dependencies = {
"rafamadriz/friendly-snippets",
},
build = vim.g.os == "Windows" and "make install_jsregexp CC=gcc.exe SHELL=sh.exe .SHELLFLAGS=-c"
or "make install_jsregexp",
} vim.g.os is my custom detection |
Users on Windows may install neovim by many means:
scoop install neovim
:which nvim
shows~/scoop/shims/nvim
winget install neovim
or manually download Windows installer and set env:which nvim
showsC:/Program Files/Neovim/bin/nvim
Either way, we can use
lua51.dll
in the originalnvim
directory ($(scoop prefix neovim)/bin
orC:/Program Files/Neovim/bin/
)Care must be taken when path contains spaces. Quotes are needed to let gcc understand
-L"C:/Program Files/..."
such directories.Note
Users may also need to set:
SHELL=C:/path/to/Git/usr/bin/sh.exe # if git sh.exe is not in PATH
.SHELLFLAGS=-c # if git sh.exe is not in PATH
CC=gcc # if default cc is not set to any compiler
NEOVIM_BIN_PATH=C:/path/to/Neovim/bin # if Neovim/bin is not detected by the Makefile
Related: #759 #986 #1130 #1190 #1220