From f69f4e542578b30365028450d435a1b0fbf90eb1 Mon Sep 17 00:00:00 2001 From: Anish L Date: Thu, 23 Jun 2022 20:47:50 +1000 Subject: [PATCH] add tidalcycles.nix and remove / fix other annoying nvim bugs --- flake.lock | 129 +++++++++++++++++++++++++++++++- flake.nix | 4 + users/profiles/nvim/default.nix | 36 ++------- 3 files changed, 137 insertions(+), 32 deletions(-) diff --git a/flake.lock b/flake.lock index 5c1cf578..d0cf5130 100644 --- a/flake.lock +++ b/flake.lock @@ -131,6 +131,23 @@ "type": "github" } }, + "dirt-samples-src": { + "flake": false, + "locked": { + "lastModified": 1588278411, + "narHash": "sha256-h8vQxRym6QzNLOTZU7A43VCHuG0H77l+BFwXnC0L1CE=", + "owner": "tidalcycles", + "repo": "dirt-samples", + "rev": "66d432418c9a7d82cf049d9246adfa62f46df2a6", + "type": "github" + }, + "original": { + "owner": "tidalcycles", + "ref": "master", + "repo": "dirt-samples", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -517,7 +534,68 @@ "nixos-hardware": "nixos-hardware", "nur": "nur", "nvfetcher": "nvfetcher", - "poonam": "poonam" + "poonam": "poonam", + "tidalcycles": "tidalcycles" + } + }, + "superdirt-src": { + "flake": false, + "locked": { + "lastModified": 1611740180, + "narHash": "sha256-GtnqZeMFqFkVhgx2Exu0wY687cHa7mNnVCgjQd6fiIA=", + "owner": "musikinformatik", + "repo": "superdirt", + "rev": "7abb62e89649daa1232b9cbd6427241868abd30e", + "type": "github" + }, + "original": { + "owner": "musikinformatik", + "ref": "master", + "repo": "superdirt", + "type": "github" + } + }, + "tidal-src": { + "flake": false, + "locked": { + "lastModified": 1654350756, + "narHash": "sha256-tONM5SYYBca0orTLH1EUOilSC1FCluWrFt8AetUx+YQ=", + "owner": "tidalcycles", + "repo": "tidal", + "rev": "fda9c1ecb3722698935245e5409ef8ccdfca16c8", + "type": "github" + }, + "original": { + "owner": "tidalcycles", + "ref": "main", + "repo": "tidal", + "type": "github" + } + }, + "tidalcycles": { + "inputs": { + "dirt-samples-src": "dirt-samples-src", + "nixpkgs": [ + "latest" + ], + "superdirt-src": "superdirt-src", + "tidal-src": "tidal-src", + "utils": "utils_2", + "vim-tidal-src": "vim-tidal-src", + "vowel-src": "vowel-src" + }, + "locked": { + "lastModified": 1655718611, + "narHash": "sha256-nFa7UmyzbqWhjDE44D/9nyj828pWqs78fGmvmILEdmg=", + "owner": "mitchmindtree", + "repo": "tidalcycles.nix", + "rev": "544f57dc037d52be0694569dbee17a47012ef454", + "type": "github" + }, + "original": { + "owner": "mitchmindtree", + "repo": "tidalcycles.nix", + "type": "github" } }, "utils": { @@ -534,6 +612,55 @@ "repo": "flake-utils", "type": "github" } + }, + "utils_2": { + "locked": { + "lastModified": 1653893745, + "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "vim-tidal-src": { + "flake": false, + "locked": { + "lastModified": 1655623220, + "narHash": "sha256-A9NimlO6bdqTkt4UsWs2TaEngF8n+a7HeZ/kRh3YLos=", + "owner": "mitchmindtree", + "repo": "vim-tidal", + "rev": "4a98788f54ed62f39c160404fe3e58986dab958c", + "type": "github" + }, + "original": { + "owner": "mitchmindtree", + "ref": "flupe-vim8-terminal-rebased", + "repo": "vim-tidal", + "type": "github" + } + }, + "vowel-src": { + "flake": false, + "locked": { + "lastModified": 1641306144, + "narHash": "sha256-zfF6cvAGDNYWYsE8dOIo38b+dIymd17Pexg0HiPFbxM=", + "owner": "supercollider-quarks", + "repo": "vowel", + "rev": "ab59caa870201ecf2604b3efdd2196e21a8b5446", + "type": "github" + }, + "original": { + "owner": "supercollider-quarks", + "ref": "master", + "repo": "vowel", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 6a8c894e..59984408 100644 --- a/flake.nix +++ b/flake.nix @@ -36,6 +36,8 @@ basant.inputs.poonam.follows = "poonam"; grasp.url = "git+ssh://gitea@git.sealight.xyz/aynish/grasp.git?ref=main"; grasp.inputs.nixpkgs.follows = "nixos"; + tidalcycles.url = "github:mitchmindtree/tidalcycles.nix"; + tidalcycles.inputs.nixpkgs.follows = "latest"; }; outputs = @@ -50,6 +52,7 @@ , deploy , basant , grasp + , tidalcycles , ... } @ inputs: digga.lib.mkFlake @@ -70,6 +73,7 @@ nvfetcher.overlay deploy.overlay ./pkgs/default.nix + tidalcycles.overlays.default ]; }; latest = { }; diff --git a/users/profiles/nvim/default.nix b/users/profiles/nvim/default.nix index ea0262cd..7718a37e 100644 --- a/users/profiles/nvim/default.nix +++ b/users/profiles/nvim/default.nix @@ -28,30 +28,6 @@ let sha256 = "1fzKmknfVlEYwqeXgbKITbb2/PJ023iJyMz6vak3qh4="; #TODO }; }; - vim-tidal = pkgs.vimUtils.buildVimPluginFrom2Nix { - name = "vim-tidal"; - src = pkgs.fetchgit { - url = "https://github.com/tidalcycles/vim-tidal"; - # version 1.4.6 - rev = "52134979252757a5736ae09cb9fc6ae3cc04daef"; - sha256 = "c12v9+s/JspQ9Am291RFI7eg0UAeXGDvJ5lK+7ukOb0="; - }; - dependencies = [ ]; - }; - tidal = pkgs.stdenv.mkDerivation { - name = "tidal"; - src = pkgs.fetchgit { - url = "https://github.com/tidalcycles/vim-tidal"; - # version 1.4.6 - rev = "52134979252757a5736ae09cb9fc6ae3cc04daef"; - sha256 = "c12v9+s/JspQ9Am291RFI7eg0UAeXGDvJ5lK+7ukOb0="; - }; - preConfigure = '' - mkdir -p $out/bin - substituteInPlace Makefile \ - --replace '/usr/local' "$out" \ - ''; - }; }; my-python-packages = python-packages: with python-packages; [ @@ -168,7 +144,7 @@ in :tnoremap " Sexp in Conjure (since it's fennel) - let g:sexp_filetypes = "fennel" + let g:sexp_filetypes = "clojure,scheme,lisp,janet,fennel" let g:conjure#filetype#fennel = "conjure.client.fennel.stdio" let g:rainbow_active = 0 @@ -296,7 +272,6 @@ in nmap ss :SessionSave nmap sl :SessionLoad nnoremap fh :DashboardFindHistory - nnoremap ff :DashboardFindFile nnoremap fm :DashboardJumpMark nnoremap cn :DashboardNewFile autocmd FileType dashboard set showtabline=0 | autocmd WinLeave set showtabline=2 @@ -367,7 +342,6 @@ in format = lspkind.cmp_format({ mode = 'symbol_text', maxwidth = 50, - end -- old format -- format = function(entry, vim_item) -- -- fancy icons and a name of kind @@ -523,7 +497,7 @@ in -- f_term local map = vim.api.nvim_set_keymap local opts = { noremap = true, silent = true } - map('n', '', 'lua require("FTerm").toggle()', opts) + map('n', '', 'lua require("FTerm").toggle()', opts) map('t', '', 'lua require("FTerm").toggle()', opts) -- Custom functions @@ -539,6 +513,8 @@ in auto_session_suppress_dirs = {'~/'} } vim.o.sessionoptions="blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal" + + require("which-key").setup{} EOF ''; @@ -564,7 +540,7 @@ in ]; plugins = with pkgs.vimPlugins // customPlugins; [ # ui - vim-which-key + which-key-nvim fzf-vim nerdtree neovim-ayu @@ -581,12 +557,10 @@ in nvim-gps nvim-treesitter nvim-treesitter-context - dashboard-nvim FTerm-nvim barbar-nvim auto-session marks-nvim - lightspeed-nvim # language vim-nix