LuaSnip
LuaSnip copied to clipboard
Failed to Install L3MON4D3/LuaSnip
-- LSP
use({
"VonHeikemen/lsp-zero.nvim",
branch = "v2.x",
requires = {
{ "neovim/nvim-lspconfig" },
{ "williamboman/mason.nvim" },
{ "williamboman/mason-lspconfig.nvim" },
-- Autocompletion
{ "hrsh7th/nvim-cmp" }, -- Required
{ "hrsh7th/cmp-buffer" }, -- buffer completions
{ "hrsh7th/cmp-path" },
{ "saadparwaiz1/cmp_luasnip" },
{ "hrsh7th/cmp-nvim-lsp" },
{ "hrsh7th/cmp-nvim-lua" },
-- Snippets
{ "L3MON4D3/LuaSnip", run = "make install_jsregexp" }, -- Required
{ "rafamadriz/friendly-snippets" },
{ "jose-elias-alvarez/null-ls.nvim" },
{ "jose-elias-alvarez/typescript.nvim" },
},
})
whenever i try to run with 'make install_jsregexp' it fails btu when i remove it, it installs and snippets do work, but the problem is the auto capitalization fails when jsregexp doesn't get installed.
this works fine on my mac but on PopOS it keeps throwing this error, any fix for fix?
I'm guessing neovims luajit is not installed system-wide, you'll have to figure out which package provides it, and install that package
i tried uninstalling and installing again with luajit installed, it still says error when installing
You'll need libluajit-5.1.so, or something similar, could you look for that?
it says its already installed
Ah, okay, then you'll have to modify the -l we use, manually call make LUA_LDLIBS=-lluajit5.1-2 install_jsregexp in luasnips directory
still doesnt work, i tried
make LUA_LDLIBS=-lluajit5.1-2 install_jsregexp and make LUA_LDLIBS=-llibluajit5.1-2 install_jsregexp both.
the directory is /home/sarun/.local/share/nvim/site/pack/packer/start/LuaSnip right?
Ah, omit the lib in -llibluajit5.1-2, -l always prepends it when searching for the actual file
Yeah, that looks like the correct directory :+1:
yep it doesnt work either, the second command i ran is that, and next i added `lib' which also didnt work, any other solutions?
Oh, my bad, ofc
Can you list the files provided by the libluajit5.1-2-package? I guess the .so-file is called something different
~~Hi, just encountered this same issue and I found libluajit-5.1.so in /usr/lib/x86_64-linux-gnu. How can I tell the compiler to use this path?~~
Never mind, I had installed the libluajit-5.1-dev package a few minutes before posting this and I think this is what solved the problem, didn't need to edit any paths.
Niceππ
Perhaps this could be added to the README for any people who might encounter this issue in the future?
I'll pin this issue for now, we should switch to providing the static library from the get-go (@leiserfg you were right :sweat_smile:)
The LDLIBS variable should be empty because we don't actually need to link against libluajit (or liblua5.1) when building the module. Only the headers from either luajit or lua5.1 are needed.
Edit: clarification
Oh dammit :facepalm:
But why not? How is luaL_newlib resolved?
I'll pin this issue for now, we should switch to providing the static library from the get-go (@leiserfg you were right sweat_smile)
This would be so helpful.
By the way, I distro hopped to Arch to get this feature working π
@L3MON4D3
The nvim binary is compiled so that all symbols (including those from shared libraries, i.e. libluajit) are exported. luaL_newlib resolves to whatever library nvim is linked against (which could also be lua5.1). See also man ld and search for export-dynamic.
Unsetting LDLIBS will probably break the MacOS build again. I had to see and check how luarocks does it.
Ahh okay, that's pretty cool Thank you! I'll upload some patches and ask the MacOS-users in the other thread to test it :D