Skip to content
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

BUG: fails silently in absence of LuaJIT #431

Open
subnut opened this issue Jan 31, 2024 · 1 comment
Open

BUG: fails silently in absence of LuaJIT #431

subnut opened this issue Jan 31, 2024 · 1 comment

Comments

@subnut
Copy link

subnut commented Jan 31, 2024

EDIT: I just tried the exact same combination on the flatpak version (which has LuaJIT), and (unsurprisingly) it works.

Original issue follows -


None of the functions do anything. Literally. There's zero feedback. There is no error, nor is there any change being made in the buffer.

commentstring is set correctly. (i checked)

nvim -v

NVIM v0.9.5
Build type: RelWithDebInfo
Lua 5.1
Compilation: /usr/lib/ccache/bin/clang -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wvla -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -Wimplicit-fallthrough -fdiagnostics-color=always -fstack-protector-strong -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_VENDOR_BIT -I/usr/include/lua5.1 -I/usr/include -I/usr/include -I/builddir/neovim-0.9.5/build/src/nvim/auto -I/builddir/neovim-0.9.5/build/include -I/builddir/neovim-0.9.5/build/cmake.config -I/builddir/neovim-0.9.5/src -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

Note the absence of LuaJIT.

minimal_init.lua

-- bootstrap packer
local ensure_packer = function()
  local fn = vim.fn
  local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
  if fn.empty(fn.glob(install_path)) > 0 then
    fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
    vim.cmd [[packadd packer.nvim]]
    return true
  end
  return false
end

local packer_bootstrap = ensure_packer()
return require('packer').startup(function(use)
  use 'wbthomason/packer.nvim'
  -- your plugins here
  use {
    'numToStr/Comment.nvim',
    config = function()
      require('Comment').setup()
    end
  }
  if packer_bootstrap then
    require('packer').sync()
  end
end)
@subnut subnut changed the title BUG: does nothing. BUG: fails silently in absence of LuaJIT Jan 31, 2024
@subnut
Copy link
Author

subnut commented Feb 1, 2024

EDIT: See neovim/neovim#27289

I've tracked it down to

U.catch(Op.opfunc, nil, cfg or Config:get(), mode, type)

If we replace U.catch with pcall or xpcall then everything works correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant