wbthomason / packer.nvim

A use-package inspired plugin manager for Neovim. Uses native packages, supports Luarocks dependencies, written in Lua, allows for expressive config
MIT License
7.72k stars 263 forks source link

Execute different post-install scripts depending on OS #1223

Closed hrai closed 1 year ago

hrai commented 1 year ago

I am using lvim where I'm trying to install this extension depending on the OS but it doesn't seem to work.

  {
    'tzachar/cmp-tabnine',
    run =
    'function () if jit.os == "Linux" then os.execute("./install.sh") else os.execute("pwsh ./install.ps1") end end',
    dependencies = 'hrsh7th/nvim-cmp',
  },

What am I doing wrong?

hrai commented 1 year ago

Actually it does exec the code but my logic is incorrect.