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

LSP Error: _changetracking.lua:305: attempt to index local 'buf_state' #28987

Closed
gepbird opened this issue May 24, 2024 · 9 comments
Closed

LSP Error: _changetracking.lua:305: attempt to index local 'buf_state' #28987

gepbird opened this issue May 24, 2024 · 9 comments
Labels
bug issues reporting wrong behavior closed:duplicate issues that are closed as duplicates of other issues lsp

Comments

@gepbird
Copy link

gepbird commented May 24, 2024

Problem

This error comes up on every change to the buffer when it is in a "broken state". Doing :e fixes this issue.

Error executing lua callback: ....10.0/share/nvim/runtime/lua/vim/lsp/_changetracking.lua:305: attempt to index local 'buf_state' (a nil value)   
stack traceback:                                                                                                                                  
        ....10.0/share/nvim/runtime/lua/vim/lsp/_changetracking.lua:305: in function 'send_changes_for_group'                                     
        ....10.0/share/nvim/runtime/lua/vim/lsp/_changetracking.lua:348: in function 'send_changes'                                               
        ...ovim-unwrapped-0.10.0/share/nvim/runtime/lua/vim/lsp.lua:553: in function <...ovim-unwrapped-0.10.0/share/nvim/runtime/lua/vim/lsp.lua:
548>  

Steps to reproduce

Most likely after doing file operations with git (fugitive), opening a previously opened file will put the buffer in a "broken state". At least this is what seems to cause it, I'll try to make it consistently reproducible later.

Expected behavior

No error

Neovim version (nvim -v)

NVIM v0.10.0

Vim (not Nvim) behaves the same?

Most likely not

Operating system/version

NixOS

Terminal name/version

xfce4-terminal

$TERM environment variable

xterm-256color

Installation

nixpkgs/nixos-unstable

@gepbird gepbird added the bug issues reporting wrong behavior label May 24, 2024
@github-actions github-actions bot added the lsp label May 24, 2024
@icholy
Copy link
Contributor

icholy commented May 24, 2024

This is fixed on master. Commit: 2908f71

@gepbird
Copy link
Author

gepbird commented May 24, 2024

@icholy Thanks! I'll try it.

@gepbird gepbird closed this as completed May 24, 2024
@icholy
Copy link
Contributor

icholy commented May 24, 2024

FYI @mfussenegger your refactor had some type of behaviour change which fixed this 2908f71 so it should be backported

@wookayin wookayin added the closed:duplicate issues that are closed as duplicates of other issues label May 26, 2024
@dylan-chong
Copy link

is this fix going to be released any time soon?

@icholy
Copy link
Contributor

icholy commented May 29, 2024

@dylan-chong the fix will be included in 0.10.1 here's the milestone https://github.com/neovim/neovim/milestones/0.10.1

@caarlos0
Copy link
Sponsor Contributor

any workarounds besides using nightly?

@jaspertandy
Copy link

any workarounds besides using nightly?

@caarlos0 0.10.1 just dropped for me in homebrew, but I haven't been able to confirm if the issue persists.

@chrisgrieser
Copy link

chrisgrieser commented Aug 5, 2024

I am on 0.10.1 and the issue still occurs for me. It occurs only in gitcommit files (COMMIT_EDITMSG), where the typos-lsp is attached.

@icholy
Copy link
Contributor

icholy commented Aug 5, 2024

@chrisgrieser can you reproduce this consistently?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issues reporting wrong behavior closed:duplicate issues that are closed as duplicates of other issues lsp
Projects
None yet
Development

No branches or pull requests

7 participants