Giter Site home page Giter Site logo

nixvim's Introduction

neovim-flake Logo

Nixvim config

My Neovim config using nixvim.

nvim

More! nvim nvim

Configuring

To start configuring, just add or modify the nix files in ./config. If you add a new configuration file, remember to add it to the config/default.nix file

Current plugins

Testing your new configuration

To test your configuration simply run the following command

nix run .

If you have nix installed, you can directly run my config from anywhere

You can try running mine with:

nix run 'github:elythh/nixvim'

Installing into NixOS configuration

This nixvim flake will output a derivation that you can easily include in either home.packages for home-manager, or environment.systemPackages for NixOS. Or whatever happens with darwin?

You can add my nixvim configuration as an input to your NixOS configuration like:

{
 inputs = {
    nixvim.url = "github:elythh/nixvim";
 };
}

Direct installation

With the input added you can reference it directly.

{ inputs, system, ... }:
{
  # NixOS
  environment.systemPackages = [ inputs.nixvim.packages.${pkgs.system}.default ];
  # home-manager
  home.packages = [ inputs.nixvim.packages.${pkgs.system}.default ];
}

The binary built by nixvim is already named as nvim so you can call it just like you normally would.

Installing as an overlay

Another method is to overlay your custom build over neovim from nixpkgs.

This method is less straight-forward but allows you to install neovim like you normally would. With this method you would just install neovim in your configuration (home.packges = with pkgs; [ neovim ]), but you replace neovim in pkgs with your derivation from nixvim.

{
  pkgs = import inputs.nixpkgs {
    overlays = [
      (final: prev: {
        neovim = inputs.nixvim.packages.${pkgs.system}.default;
      })
    ];
  }
}

Bonus lazy method

You can just straight up alias something like nix run 'github:elythh/nixvim' to nvim.

Bonus extend method

If you want to extend this config is your own NixOS config, you can do so using nixvimExtend. See here for more info.

Example for overwritting the theme

{
  inputs,
  lib,
  ...
}: let
  nixvim' = inputs.nixvim.packages."x86_64-linux".default;
  nvim = nixvim'.nixvimExtend {
    config.theme = lib.mkForce "jellybeans";
  };
in {
  home.packages = [
    nvim
  ];
}

Credits

nixvim's People

Contributors

elythh avatar no-mood avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

nixvim's Issues

Unable to run

I tried running nix run 'github:elythh/nixvim' --extra-experimental-features nix-command --extra-experimental-features flakes and it gave the error:

error: builder for '/nix/store/a87z1mgqxjsz8r2mc9p6jl34s7gg6s25-lua-language-server-3.9.0.drv' failed with exit code 1;
       last 25 log lines:
       > FAILED: build/obj/source_bee/format.obj
       > clang -MMD -MT build/obj/source_bee/format.obj -MF build/obj/source_bee/format.obj.d -std=c++17 -fno-rtti -O2 -Wall -fvisibility=hidden -mmacosx-version-min=10.15 -DNDEBUG -Wunguarded-availability -o build/obj/source_bee/format.obj -c 3rd/bee.lua/3rd/fmt/format.cc
       > In file included from 3rd/bee.lua/3rd/fmt/format.cc:8:
       > 3rd/bee.lua/3rd/fmt/fmt/format-inl.h:12:12: fatal error: 'algorithm' file not found
       > #  include <algorithm>
       >            ^~~~~~~~~~~
       > 1 error generated.
       > [8/99] Compile C++ build/obj/source_bee/error.obj
       > FAILED: build/obj/source_bee/error.obj
       > clang -MMD -MT build/obj/source_bee/error.obj -MF build/obj/source_bee/error.obj.d -std=c++17 -fno-rtti -O2 -Wall -fvisibility=hidden -mmacosx-version-min=10.15 -I3rd/bee.lua -I3rd/bee.lua/3rd/lua -DNDEBUG -Wunguarded-availability -o build/obj/source_bee/error.obj -c 3rd/bee.lua/bee/error.cpp
       > In file included from 3rd/bee.lua/bee/error.cpp:1:
       > 3rd/bee.lua/bee/error.h:3:10: fatal error: 'string' file not found
       > #include <string>
       >          ^~~~~~~~
       > 1 error generated.
       > [10/99] Compile C++ build/obj/source_bee/filewatch_osx.obj
       > FAILED: build/obj/source_bee/filewatch_osx.obj
       > clang -MMD -MT build/obj/source_bee/filewatch_osx.obj -MF build/obj/source_bee/filewatch_osx.obj.d -std=c++17 -fno-rtti -O2 -Wall -fvisibility=hidden -mmacosx-version-min=10.15 -I3rd/bee.lua -I3rd/bee.lua/3rd/lua -DNDEBUG -Wunguarded-availability -o build/obj/source_bee/filewatch_osx.obj -c 3rd/bee.lua/bee/filewatch/filewatch_osx.cpp
       > In file included from 3rd/bee.lua/bee/filewatch/filewatch_osx.cpp:1:
       > 3rd/bee.lua/bee/filewatch/filewatch.h:3:10: fatal error: 'functional' file not found
       > #include <functional>
       >          ^~~~~~~~~~~~
       > 1 error generated.
       > ninja: build stopped: subcommand failed.
       > /nix/store/g224xn9nwzf16jr94f1jx4jsnlazkl2a-stdenv-darwin/setup: line 140: pop_var_context: head of shell_variables not a function context
       For full logs, run 'nix-store -l /nix/store/a87z1mgqxjsz8r2mc9p6jl34s7gg6s25-lua-language-server-3.9.0.drv'.
error: 1 dependencies of derivation '/nix/store/0z4vs1w592c4zqvlrqcxqi83iyjcj0fv-neovim-0.9.5.drv' failed to build
error: 1 dependencies of derivation '/nix/store/7f9zg1f2pi17iyn8b0m2h3zcfzpkpgnv-nixvim.drv' failed to build

I've also tried just cloning and running nix run . --extra-experimental-features nix-command --extra-experimental-features flakes which resulted with the same

I'm on a M1 Mac not running through NixOS but on MacOS. Disclaimer I'm new to nix so I'm probably just making a silly mistake somewhere. I'm confused by the errors as they suggest that I don't have c++ stuff downloaded and included but I've done a lot of c++ development and definitely have them installed and included (I've run the Xcode install command line tools thing before).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.