Git Product home page Git Product logo

nixvim-config's Introduction

NixVim config

PERSONAL configuration for Neovim using Nixvim. Heavily inspired by AstroNvim.

Note

This project uses the flake system and is not intended to be used without Flakes.

The flake exports two packages:

  • default: Nixvim package built from the configuration files
  • lite: Same as above, without the LSP stuff

Warning

🚧 This is a work in progress 🚧

📥 Installation

{
  inputs.nixvim-config.url = "github:nicolas-goudry/nixvim-config";

  outputs = { nixvim-config, ... }: {
    overlays.additions = final: _prev: {
      nixvim = nixvim-config.packages.${_prev.system}.default;

      # Or use the lite version
      # nixvim = nixvim-config.packages.${_prev.system}.lite;
    }
  }
}

🍱 Structure

The config is mainly split in two directories:

  • plugins: Nixvim plugins configuration, using a custom load mechanism
  • config: nvim configuration (like options, global keymaps, etc)

Other configuration attributes may be found in default.nix if they don’t justify being in a separate file.

🥣 Configuration

The configuration is split in multiple files organized by “topic” in the config directory. These are auto-imported in the main default.nix file.

🥢 Plugins

The plugins are not explicitly declared as Nixvim plugins.<plugin> attributes. Instead, they are looked up in and loaded from the plugins directory.

In short, a lambda will read the files in the directory and use the filename to assign a plugin to the right attribute. Example: telescope.nix will be loaded in config.plugins.telescope. Custom plugins are also supported, read further.

Each plugin file must export a lambda, which is called with an attribute set containing the nixpkgs's library as lib. Plugins may or may not use it. It must return an attribute set which can contain the following attributes:

  • opts: plugin options as expected by Nixvim
  • rootOpts: extra options for the root Nixvim config attribute
    • this allows to further configure the plugin if it doesn’t expose a given option
  • extra: custom plugin not supported by Nixvim
    • extra.packages: list of packages to be added as extraPlugins (ie. vimPlugins.<plugin>)
    • extra.config: plugin configuration in lua

nixvim-config's People

Contributors

nicolas-goudry avatar v3ntus 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.