GithubHelp home page GithubHelp logo

mnw's Introduction

Minimal NeoVim Wrapper

This flake exists because the nixpkgs neovim wrapper is a pain

and I conceptually disagree with nixvim

About

Based off the nixpkgs wrapper but:

  • in one place
  • more error checking
  • a sane interface
  • evalModules "type" checking
  • more convenience options
  • doesn't take two functions to wrap

There are no flake inputs.

Usage

Add the flake input

mnw.url = "github:Gerg-L/mnw";

or import the base of this repo using

to use flake-compat

Then use one of the modules or mnw.lib.wrap

Wrapper function

The wrapper takes two arguments pkgs and then an attribute set of config options

let
  neovim = mnw.lib.wrap pkgs {
    #config options
  };
in {
...

then add it to environment.systemPackages or users.users.<name>.packages or anywhere you can add a package

Modules

Import {nixosModules,darwinModules,homeManagerModules}.mnw into your respective config

and use the programs.mnw options

programs.mnw = {
  enable = true;
#other config

and it'll the wrapped neovim to environment.systemPackages or home.packages

to not install by default use the .dontInstall module instead and add config.programs.mnw.finalPackage where you want

Config Options

# The neovim package to wrap
# Ensure you're using the -unwrapped variant
neovim = pkgs.neovim-unwrapped;

plugins = [
  # You can pass a directory
  # and use it just like it's
  # ~/.config/nvim
  ./myNeovimConfig
  # and you can pass vimPlugins from nixpkgs
  pkgs.vimPlugins.fzf-lua
];
# I recommend using plugins from a npins source
# to track the newest commits of a plugin
# check my config for an example

# Lsps and fzf/rg go here and get appended to PATH
extraBinPath = [ pkgs.nil ];

# Sets NVIMAPP_NAME
appName = "nvim";

# Extra arguments passed to makeWrapper
wrapperArgs = [ ];

# Whether to load ~/.config/nvim/init.lua
loadDefaultRC = false;

# Lua init files to load
luaFiles = [ ];
# Lua init string to load
initLua = "";
# VimL init files to load
vimlFiles = [ ];
# VimLinit string to load
initViml = "";

# Symlink vi/vim to nvim
viAlias = false;
vimAlias = false;

# Setup and enable providers
withRuby = true;
withNodeJs = false;
withPerl = false;
withPython3 = true;
extraPython3Packages = p: [ ];

# Extra luaPackages which may be needed by plugins
extraLuaPackages = _: [ ];

Full usage examples

Mine

NotAShelf

If you would like your example here PR it

mnw's People

Contributors

gerg-l 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.