NixOS - neovim plugins - eviltoast

Hello,

The NixOS community has been great in helping me with my first steps in this distro. So I’ll ask again few neovim-related issues I couldn’t figure out after 3 days of search.

First, let me tell you that I’m trying to import a working neovim setup from another distro. Then let’s see how I’ve configured neovim. I have this in my home.nix file:

programs.neovim = {
  enable = true;
  withPython3 = true;
  extraPython3Packages = (ps: with ps; [
    pynvim
    unidecode
    black
    isort
  ]);
  plugins = with pkgs.vimPlugins; [
    { plugin = *plugin_name*;
    type = "lua";
    config = builtins.readFile *config_file_path*;
    }
    ...
    ];
};

(my init.lua file is in the $HOME/.config/nvim folder)

With that most of my plugins work. Most because few are troublesome. Let’s focus on three of them:

  1. I have pkgs.vimPlugins.nvim-comment installed but neovim reports that the command CommentToggle is not an editor command

  2. I have pkgs.vimPlugins.nvim-treesitter installed but the command TSInstall markdown returns “could not create parser dir '/nix/store/…/nvim-treesitter/parser ': Vim:E739: read-only file system '”

  3. I have pkgs.vimPlugins.mason-nvim and pkgs.vimPlugins.mason-lspconfig-nvim installed but runngin checkhealth mason returns few warnings:

  • mason.nvim is not the latest version (I use the unstable channel)
  • pip: not available spawn: python3 failed with exit code 1 and signal 0. /run/current-system/sw/bin/python3: No module named pip (note that python3_host_prog and python3_host_prog pip are marked “OK”)

Thanks again for your assistance.

  • ScreaminOctopus@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    It’s also a nightmare if you want your config to work with both nix and non nix platforms. If I’m using my config on windows or at work, I’m not going to have nix and home manager to interpret the nix version of my vim config. On my systems with home manager, I’d like be able to install my nvim config as part of home manager rebuild. If I have home manager pull my configs git repo, it causes lazy to freak out whenever I try to update my plugins. It’d be nice to have some sort of integration with lazy that exists with cargo and similar tools but it doesn’t look like anyone’s been working on it.