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

OptionSet Autocommand for "fileformat" results in an attempt to yield across C-call boundary #1123

Open
rnmmnen opened this issue Sep 20, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@rnmmnen
Copy link

rnmmnen commented Sep 20, 2024

Description

Changing the 'fileformat' option results in the following error message:

Error detected while processing OptionSet Autocommands for "fileformat":
Error executing lua callback: ...ns_issue/gitsigns_issue/gitsigns//lua/gitsigns/async.lua:152: attempt to yield across C-call boundary
stack traceback:
        [C]: in function 'yield'
        ...ns_issue/gitsigns_issue/gitsigns//lua/gitsigns/async.lua:152: in function 'scheduler'
        ..._issue/gitsigns_issue/gitsigns//lua/gitsigns/manager.lua:425: in function 'schedule'
        ..._issue/gitsigns_issue/gitsigns//lua/gitsigns/manager.lua:447: in function 'fn'
        ...issue/gitsigns_issue/gitsigns//lua/gitsigns/debounce.lua:68: in function 'update'
        ...s_issue/gitsigns_issue/gitsigns//lua/gitsigns/attach.lua:178: in function <...s_issue/gitsigns_issue/gitsigns//lua/gitsigns/attach.lua:171

Neovim version

NVIM v0.10.1

Operating system and version

MacOS 14.6.1

Expected behavior

No response

Actual behavior

When setting the option for the first time, an error is shown.

Minimal config

for name, url in pairs{
  gitsigns = 'https://github.com/lewis6991/gitsigns.nvim',
} do
local install_path = vim.fn.fnamemodify('gitsigns_issue/'..name, ':p')
if vim.fn.isdirectory(install_path) == 0 then
vim.fn.system { 'git', 'clone', '--depth=1', url, install_path }
end
vim.opt.runtimepath:append(install_path)
end

require('gitsigns').setup{
  debug_mode = true, -- You must add this to enable debug messages
}

Steps to reproduce

  1. mkdir gitsigns_issue
  2. cd gitsigns_issue
  3. git init
  4. touch file
  5. git add file
  6. git commit -m 'initial commit'
  7. nvim --clean -u minimal.lua file
  8. :set fileformat=dos

Gitsigns debug messages

No response

Gitsigns cache

No response

@rnmmnen rnmmnen added the bug Something isn't working label Sep 20, 2024
@lewis6991
Copy link
Owner

Can you confirm your Nvim build has LuaJIT?

@rnmmnen
Copy link
Author

rnmmnen commented Sep 25, 2024

NVIM v0.10.1
Build type: Release
LuaJIT 2.1.1725453128

@bitozoid
Copy link

It also happens to me on Linux. I just need a modeline at the end of the file like:

# vim: ff=unix:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants