this post was submitted on 23 Jan 2024
27 points (90.9% liked)

Linux

48372 readers
1496 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
27
submitted 10 months ago* (last edited 10 months ago) by wwwgem@lemmy.ml to c/linux@lemmy.ml
 

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.

you are viewing a single comment's thread
view the rest of the comments
[–] flashgnash@lemm.ee 4 points 10 months ago (6 children)

Have tried this myself and never had much luck trying to install nvim plugins via nix.

I've found the best way is to just use the plugin managers built for neovim, I'm not sure if this applies to all of them but lazy.nvim seems to be fairly declarative anyway, have home-manager map a directory to .config/nvim/ and away you go

As a side note though I think it is rather silly just how many different neovim package managers there are, which at the end of the day all do the same thing in very similar ways

[–] wwwgem@lemmy.ml 1 points 10 months ago* (last edited 10 months ago) (3 children)

Thanks for the feedback. I'm used to packer but it's not maintained anymore so may be a good time to switch to lazy.
I'll see if I can have it work in NixOS.

[–] wwwgem@lemmy.ml 1 points 10 months ago (2 children)

It worked. Thanks! Just a question though: why is there instructions and all the packages in NixOS if it's not yet reliable?

[–] flashgnash@lemm.ee 2 points 10 months ago

I have no idea, from what I gather there aren't all the packages

I'm not sure what if anything installing them via nix does I've just come to the realisation it's already declarative so why would people bother getting it working under nix

load more comments (1 replies)
load more comments (1 replies)
load more comments (3 replies)