From 70be05057b1c05c3936754f54e8a9c93f8ffc15e Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Thu, 4 Apr 2024 20:44:12 +0200 Subject: [PATCH] Add neovim --- home/programs/terminal/default.nix | 1 + home/programs/terminal/editors/default.nix | 6 ++++ .../terminal/editors/neovim/default.nix | 34 +++++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 home/programs/terminal/editors/default.nix create mode 100644 home/programs/terminal/editors/neovim/default.nix diff --git a/home/programs/terminal/default.nix b/home/programs/terminal/default.nix index 5615862..e6ce98e 100644 --- a/home/programs/terminal/default.nix +++ b/home/programs/terminal/default.nix @@ -2,5 +2,6 @@ _: { imports = [ ./shell ./tools + ./editors ]; } diff --git a/home/programs/terminal/editors/default.nix b/home/programs/terminal/editors/default.nix new file mode 100644 index 0000000..48dfee4 --- /dev/null +++ b/home/programs/terminal/editors/default.nix @@ -0,0 +1,6 @@ +_: { + imports = [ + ./neovim + ]; +} + diff --git a/home/programs/terminal/editors/neovim/default.nix b/home/programs/terminal/editors/neovim/default.nix new file mode 100644 index 0000000..1a1a168 --- /dev/null +++ b/home/programs/terminal/editors/neovim/default.nix @@ -0,0 +1,34 @@ +{pkgs, ...}: { + # TODO: Consider switching to nixvim, this is a temporary solution + + programs.neovim = { + enable = true; + viAlias = true; + vimAlias = true; + + # Packages required for: + # - Mason to build various language servers / linters / formatters from source + # - Runtime dependencies of plugins / lang servers / ... + withNodeJs = true; + withPython3 = true; + extraPackages = with pkgs; [ + go + python3 + rustc + cargo + gcc + ]; + }; + + # Running `nvim --headless +q` is recommended + # before opening neovim for the first time + home.file."./.config/nvim" = { + source = pkgs.fetchFromGitHub { + owner = "ItsDrike"; + repo = "AstroNvimUser"; + rev = "v0.1.0"; + sha256 = "sha256-2o25+2CHoDS90kDk5ixiQDE4MHybgvVLL7jr7AHWhqU="; + }; + recursive = true; + }; +}