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

null-ls format panic when apply path PR#983 #986

Closed
3Xpl0it3r opened this issue Apr 17, 2024 · 3 comments
Closed

null-ls format panic when apply path PR#983 #986

3Xpl0it3r opened this issue Apr 17, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@3Xpl0it3r
Copy link

Description

when I upgrade gitsigns to the latest version, then formatter supplied by none-ls was broken

Neovim version

NVIM v0.9.5 Build type: Release LuaJIT 2.1.1703358377

Operating system and version

macos 14.2.1 (23C71)

Expected behavior

No response

Actual behavior

image

Minimal config

for name, url in pairs{
  gitsigns = 'https://github.com/lewis6991/gitsigns.nvim',
  -- ADD OTHER PLUGINS _NECESSARY_ TO REPRODUCE THE ISSUE
} 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
  -- ADD GITSIGNS CONFIG THAT IS _NECESSARY_ FOR REPRODUCING THE ISSUE
}

-- ADD INIT.LUA SETTINGS THAT IS _NECESSARY_ FOR REPRODUCING THE ISSUE

Steps to reproduce

  1. nvim --clean -u minimal.lua
  2. ...

Gitsigns debug messages

No response

@3Xpl0it3r 3Xpl0it3r added the bug Something isn't working label Apr 17, 2024
@josuetorr
Copy link

got the same issue

@sinkr
Copy link

sinkr commented Apr 17, 2024

Same issue here.

Dropping back to this commit fixes the issue.

Full error in text:

   Error  21:37:57 msg_show.lua_error Error detected while processing OptionSet Autocommands for "fileformat":
21:37:57 msg_show Error executing lua callback: ...al/share/nvim/lazy/gitsigns.nvim/lua/gitsigns/attach.lua:168: attempt to index a nil value
stack traceback:
	...al/share/nvim/lazy/gitsigns.nvim/lua/gitsigns/attach.lua:168: in function <...al/share/nvim/lazy/gitsigns.nvim/lua/gitsigns/attach.lua:166>
	[C]: in function 'nvim_buf_set_option'
	.../share/nvim/lazy/none-ls.nvim/lua/null-ls/formatting.lua:33: in function 'handler'
	.../.local/share/nvim/lazy/none-ls.nvim/lua/null-ls/rpc.lua:94: in function 'handle'
	.../.local/share/nvim/lazy/none-ls.nvim/lua/null-ls/rpc.lua:109: in function 'request'
	/usr/local/share/nvim/runtime/lua/vim/lsp/client.lua:685: in function '_request'
	/usr/local/share/nvim/runtime/lua/vim/lsp/client.lua:759: in function 'request_sync'
	.../share/nvim/lazy/conform.nvim/lua/conform/lsp_format.lua:145: in function 'format'
	....local/share/nvim/lazy/conform.nvim/lua/conform/init.lua:456: in function 'format'
	.../.local/share/nvim/lazy/LazyVim/lua/lazyvim/util/lsp.lua:122: in function <.../.local/share/nvim/lazy/LazyVim/lua/lazyvim/util/lsp.lua:109>
	[C]: in function 'xpcall'
	.../.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/util.lua:113: in function 'try'
	...ocal/share/nvim/lazy/LazyVim/lua/lazyvim/util/format.lua:121: in function 'format'
	...l/share/nvim/lazy/LazyVim/lua/lazyvim/config/keymaps.lua:90: in function <...l/share/nvim/lazy/LazyVim/lua/lazyvim/config/keymaps.lua:89>

@meronogbai
Copy link

dropping back to that commit fixed it for me too

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

4 participants