Set up nix shell, aniseed
This commit is contained in:
parent
6db31714b5
commit
1f6f0c40e8
|
@ -3,3 +3,7 @@ test.sh
|
||||||
.luarc.json
|
.luarc.json
|
||||||
nvim
|
nvim
|
||||||
plugin/packer_compiled.lua
|
plugin/packer_compiled.lua
|
||||||
|
|
||||||
|
.direnv/
|
||||||
|
.envrc
|
||||||
|
result
|
||||||
|
|
1
Makefile
1
Makefile
|
@ -1,4 +1,5 @@
|
||||||
format:
|
format:
|
||||||
|
alejandra --quiet .
|
||||||
lua-format --in-place init.lua
|
lua-format --in-place init.lua
|
||||||
|
|
||||||
.PHONY: format
|
.PHONY: format
|
||||||
|
|
30
README.md
30
README.md
|
@ -1,3 +1,29 @@
|
||||||
|
### Motivation
|
||||||
|
|
||||||
|
This repository is a bit of a meme. The meme is that my neovim is configured by
|
||||||
|
a Lisp, similar to emacs. The Lisp used is [fennel][Fennel] which transpiles
|
||||||
|
directly to Lua. I am using a tool called [aniseed][Aniseed] to automatically
|
||||||
|
convert Fennel to Lua. Lastly, I use [nix][Nix] to bootstrap Aniseed.
|
||||||
|
|
||||||
|
The configuration itself is rather close to the original
|
||||||
|
[kickstart][kickstart.nvim] repository. I added some utility from my original
|
||||||
|
neovim configuration and added my LSP configuration.
|
||||||
|
|
||||||
|
### Installation
|
||||||
|
|
||||||
|
```
|
||||||
|
nix build # builds `init.vim`
|
||||||
|
ln -s result/init.vim # reads fnl/ converts to lua/
|
||||||
|
vim -s ":PackerInstall" # bootstrap packer
|
||||||
|
vim -s ":PackerInstall" # install plugins
|
||||||
|
```
|
||||||
|
|
||||||
|
### TODO:
|
||||||
|
|
||||||
|
- [ ] Finish converting `init.lua` to Fennel
|
||||||
|
|
||||||
|
**EVERYTHING BELOW THIS LINE WAS ORIGINAL DOCUMENTATION**
|
||||||
|
|
||||||
### Introduction
|
### Introduction
|
||||||
|
|
||||||
A starting point for Neovim that is:
|
A starting point for Neovim that is:
|
||||||
|
@ -82,3 +108,7 @@ Each PR, especially those which increase the line count, should have a descripti
|
||||||
* You should back it up, then delete all files associated with it.
|
* You should back it up, then delete all files associated with it.
|
||||||
* This includes your existing init.lua and the neovim files in `.local` which can be deleted with `rm -rf ~/.local/share/nvim/`
|
* This includes your existing init.lua and the neovim files in `.local` which can be deleted with `rm -rf ~/.local/share/nvim/`
|
||||||
|
|
||||||
|
[nix]: https://nixos.org/download.html
|
||||||
|
[fennel]: https://fennel-lang.org
|
||||||
|
[aniseed]: https://github.com/Olical/aniseed
|
||||||
|
[kickstart]: https://github.com/nvim-lua/kickstart.nvim
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"flake-utils": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1667395993,
|
||||||
|
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1674807565,
|
||||||
|
"narHash": "sha256-zOLE1YXf2RhYhtNv4n8C0xPaSjduchLlCxZaAeoAvxU=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "f80ac848e3d6f0c12c52758c0f25c10c97ca3b62",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "nixpkgs",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
{
|
||||||
|
description = "Setup aniseed";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "nixpkgs/nixpkgs-unstable";
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = {
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
flake-utils,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
flake-utils.lib.eachSystem ["x86_64-linux"] (system: let
|
||||||
|
pkgs = import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
# config.allowBroken = true;
|
||||||
|
};
|
||||||
|
aniseed = pkgs.callPackage ./nix/aniseed.nix {};
|
||||||
|
in {
|
||||||
|
devShell = import ./nix/shell.nix {
|
||||||
|
inherit pkgs;
|
||||||
|
};
|
||||||
|
defaultPackage = aniseed;
|
||||||
|
packages = flake-utils.lib.flattenTree {
|
||||||
|
inherit aniseed;
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
{pkgs, ...}: let
|
||||||
|
aniseed = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||||
|
pname = "aniseed";
|
||||||
|
version = "v3.32.0";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "Olical";
|
||||||
|
repo = "aniseed";
|
||||||
|
rev = "a7445c340fb7a0529f3c413eb99d3f8d29f50ba2";
|
||||||
|
sha256 = "sha256-KTNImPjifuoj0/ahuYcqMtutGgOR4XnYruv/JVjyrTk=";
|
||||||
|
};
|
||||||
|
meta.homepage = "https://github.com/Olical/aniseed";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
pkgs.stdenv.mkDerivation {
|
||||||
|
name = "init.vim";
|
||||||
|
phases = ["installPhase" "fixupPhase"];
|
||||||
|
installPhase = ''
|
||||||
|
mkdir $out
|
||||||
|
cat << EOF > $out/init.vim
|
||||||
|
set runtimepath+=${aniseed}
|
||||||
|
let g:aniseed#env = v:true
|
||||||
|
EOF
|
||||||
|
'';
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
{pkgs, ...}:
|
||||||
|
pkgs.mkShell {
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
fennel
|
||||||
|
fnlfmt
|
||||||
|
alejandra
|
||||||
|
];
|
||||||
|
}
|
Loading…
Reference in New Issue