GithubHelp home page GithubHelp logo

huangyangcong / lazy-neovim-flake Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mykolasuprun/lazy-neovim-flake

0.0 0.0 0.0 17.68 MB

Nix flake for Neovim based on LazyVim

License: MIT License

Nix 100.00%

lazy-neovim-flake's Introduction

neovim-flake

Nix flake for neovim that closely follows the LazyVim configuration.

It is usable as a nixpkgs overlay, a home-manager module, or as a stand-alone nix flake. This is a bit of an experiment as a personal project. I am unlikely to fix any issues, beyond ones that affect me personally.

screenshot-1

Credits

Mostly based on Gabriel Volpe's neovim-flake. Which was based on Jordan Isaacs' neovim-flake, which was based on Wil Taylor's neovim-flake.

All 3 of these are great references to see how to use a flake to build your flavor of Neovim. The vim configuration is largely based on the oustanding LazyVim.

Documentation

try it out

nix run github:cwfryer/neovim-flake .#default

By default, this includes all the LazyVim keybinds, autocmds, and settings. It also includes LSP support for Lua, Nix, and Rust (via rust-tools).

nixpkgs overlay

This flake outputs an overlay that replaces the nix-community/neovim-nightly-overlay with this neovim package. To use it in your flake config:

{
  inputs = {
    #... other inputs here...
    neovim-nightly = {
      url = "github:nix-community/neovim-nightly-overlay";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    neovim-flake = {
        url = github:cwfryer/neovim-flake;
        inputs.nixpkgs.follows = "nixpkgs";
    };
  };
  outputs = {
    nixosConfigurations = {
      "<your_hostname"> = nixpkgs.lib.nixosSystem {
        nixpkgs = {
          overlays = [
            inputs.neovim-flake.overlays.default
            #... your other overlays ...
          ];
        };
        #... more nix config ...
        environment.systemPackages = with pkgs; [
          #... your packages ...
          neovim-nightly
        ];
      }
    };
  };
}

You can also overlay nixpkgs in your home-manager configuration. It works basically the same as above. But... you should just the home-manager module below.

home-manager module (recommended)

The best option is to use the home-manager module. Add the input flake:

{
  neovim-flake = {
    url = github:cwfryer/neovim-flake;
    inputs.nixpkgs.follows = "nixpkgs";
  };
}

Import the home-manager module:

{
  imports = [ neovim-flake.nixosModules."<your_system>".hm ];
}

Add the module to your home-manager config:

{
  programs.neovim-ide = {
    enable = true;
    settings = {
      #... your options ...
    };
  }
}

lazy-neovim-flake's People

Contributors

gvolpe avatar jordanisaacs avatar

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.