nix-community / nixvim

Configure Neovim with Nix! [maintainer=@GaetanLepage, @traxys, @mattsturgeon, @khaneliman]

Home Page:https://nix-community.github.io/nixvim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] vim.diagnostic.config broken on v0.10.0 - neo-tree plugin on neovim v0.10.0 fails to render diagnostic information

HPRIOR opened this issue · comments

Field Description
Plugin neo-tree
Nixpkgs unstable
Home Manager unstable

Description

The neo-tree plugin gives shows a warning whenever neotree is open, and one of the selected source files contains an error:

Error rendering component diagnostics: ...neo-tree.nvim/lua/neo-tree/sources/common/components.lua:84: attempt to call field 'config' (a table value)

It looks as though the offending code in neo-tree guards against using vim.diagnostic.config().signs if neovim version 0.10.0 isn't being used. However, this is the version I have installed, and my nix store does not contain any other versions.

I am posting this here as I've checked the issues of both neovim and neo-tree, and could not find a related issue. Searching for vim.diagnostic.config in neovim issues does not contain any relevant open issues - there are also open issues related to the command, which do not mention it being completely broken.

Minimal, Reproducible Example (MRE)

programs.nixvim = {
  enable = true;
  type = "lua";
  plugins = {
    lsp = {
       enable = true;
       servers = {
               lua-ls.enable = true;
       };
     };
     neo-tree.enable = true;
};

Open neo-tree with a file containing an error

This command also fails:

:lua vim.diagnostic.config()

Are you seeing this error still? I'm unable to reproduce.

I am not seeing this error anymore. It may have been due to a mismatch in the nixvim/nixpkgs versions

I am not seeing this error anymore. It may have been due to a mismatch in the nixvim/nixpkgs versions

Alright, that's kinda what I was hoping. Thanks for reporting back!