Skip to content

Instantly share code, notes, and snippets.

@tehmachine
Last active February 16, 2024 19:35
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tehmachine/962639982bed614f1965d0fe405ae5f5 to your computer and use it in GitHub Desktop.
Save tehmachine/962639982bed614f1965d0fe405ae5f5 to your computer and use it in GitHub Desktop.
Compile Vim with Lua

Original issue: Shougo/neocomplete.vim#31

@JohanTan From my experience, this is how it will work (only tested on Ubuntu):

sudo apt-get install liblua5.1-dev
sudo cp -r /usr/include/lua5.1/* /usr/include/lua5.1/include/
sudo ln -s /usr/lib/x86_64-linux-gnu/liblua5.1.so /usr/local/lib/liblua.so

Go to vim source folder:

./configure --with-features=huge \
            --enable-cscope \
            --enable-pythoninterp=yes \
            --with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu \
            --enable-multibyte \
            --enable-fontset \
            --disable-gui \
            --disable-netbeans \
            --enable-luainterp=yes \
            --with-lua-prefix=/usr/include/lua5.1 \
            --enable-largefile
make
sudo make install
@markoshorro
Copy link

Two years later, still having to do the same hack...

@tehmachine
Copy link
Author

Loool tell me about it. I actually switched to Debian and had to deal with more bs. I hope this helps though, I've tried documenting stuff that worked for me.

@markoshorro
Copy link

Definitely it worked, just had to change --enable-pythoninterp=yesto --enablepython3interp=yes, otherwise some recent plugins do not work at all!

@iamlauriano
Copy link

good, very good
some code in python with vim ?

@gonzaru
Copy link

gonzaru commented Feb 18, 2023

Hello,

You don't need to do this hack/workaround.

sudo apt-get install liblua5.1-dev
sudo cp -r /usr/include/lua5.1/* /usr/include/lua5.1/include/
sudo ln -s /usr/lib/x86_64-linux-gnu/liblua5.1.so /usr/local/lib/liblua.so

--with-lua-prefix=/usr/include/lua5.1 \

Only are necessary the lua and lua-dev packages:

sudo apt-get install lua5.1 liblua5.1-dev

and

--enable-luainterp=yes \

You need to install the lua package too, not only the dev files.

Regards! :)

@gonzaru
Copy link

gonzaru commented Feb 18, 2023

Two years later, still having to do the same hack...

Hello, please see my comment below.

Regards,

@inkpark
Copy link

inkpark commented Apr 14, 2023

thx for sharing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment