1
0
Fork 0

nvim: Lightspeed

This commit is contained in:
Daniel Kempkens 2022-02-14 15:22:40 +01:00
parent 2b052e7e05
commit 42d4706613
8 changed files with 180 additions and 247 deletions

View file

@ -0,0 +1 @@
require('lightspeed').setup({})

View file

@ -28,6 +28,7 @@ require('nifoc.config.cursorline')
-- Keybindings -- Keybindings
require('nifoc.config.whichkey') require('nifoc.config.whichkey')
require('nifoc.config.yoink') require('nifoc.config.yoink')
require('nifoc.config.lightspeed')
-- Syntax -- Syntax
require('nifoc.config.treesitter') require('nifoc.config.treesitter')
@ -56,7 +57,6 @@ require('nifoc.config.matchup')
require('nifoc.config.comments') require('nifoc.config.comments')
-- Textobjects -- Textobjects
require('surround').setup({})
-- UI -- UI
require('nifoc.config.lualine') require('nifoc.config.lualine')

View file

@ -75,6 +75,7 @@ in
{ plugin = vim-yoink; optional = true; } { plugin = vim-yoink; optional = true; }
{ plugin = vim-cutlass; optional = true; } { plugin = vim-cutlass; optional = true; }
{ plugin = vim-subversive; optional = true; } { plugin = vim-subversive; optional = true; }
lightspeed-nvim
# Themes # Themes
dracula-nvim dracula-nvim
@ -121,7 +122,7 @@ in
# Textobjects # Textobjects
nvim-treesitter-textobjects nvim-treesitter-textobjects
surround-nvim vim-surround
# UI # UI
undotree undotree

View file

@ -1,169 +0,0 @@
[
{
"src": "lewis6991/impatient.nvim"
},
{
"src": "antoinemadec/FixCursorHold.nvim"
},
{
"src": "delphinus/vim-auto-cursorline"
},
{
"src": "folke/which-key.nvim"
},
{
"src": "svermeulen/vim-yoink"
},
{
"src": "svermeulen/vim-cutlass"
},
{
"src": "svermeulen/vim-subversive"
},
{
"src": "Mofiqul/dracula.nvim"
},
{
"src": "nvim-treesitter/nvim-treesitter"
},
{
"src": "nvim-treesitter/playground"
},
{
"src": "martinda/Jenkinsfile-vim-syntax"
},
{
"src": "nvim-lua/popup.nvim"
},
{
"src": "nvim-lua/plenary.nvim"
},
{
"src": "nvim-telescope/telescope.nvim"
},
{
"src": "natecraddock/telescope-zf-native.nvim",
"nativeBuildInputs": [
"just",
"zigpkgs.\"0.9.0\""
],
"buildPhase": "just clean\nXDG_CACHE_HOME=./xdg_cache just build\nmv lib/libzf.so lib/libzf-osx-arm64.so\nrm -rf ./xdg_cache"
},
{
"src": "ahmedkhalf/project.nvim"
},
{
"src": "neovim/nvim-lspconfig"
},
{
"src": "jose-elias-alvarez/null-ls.nvim"
},
{
"src": "kyazdani42/nvim-web-devicons"
},
{
"src": "folke/trouble.nvim"
},
{
"src": "onsails/lspkind-nvim"
},
{
"src": "nvim-lua/lsp-status.nvim"
},
{
"src": "hrsh7th/nvim-cmp"
},
{
"src": "hrsh7th/cmp-nvim-lsp"
},
{
"src": "hrsh7th/cmp-nvim-lsp-signature-help"
},
{
"src": "L3MON4D3/LuaSnip"
},
{
"src": "saadparwaiz1/cmp_luasnip"
},
{
"src": "hrsh7th/cmp-nvim-lua"
},
{
"src": "hrsh7th/cmp-path"
},
{
"src": "hrsh7th/cmp-buffer"
},
{
"src": "ray-x/cmp-treesitter"
},
{
"src": "hrsh7th/cmp-cmdline"
},
{
"src": "hrsh7th/cmp-nvim-lsp-document-symbol"
},
{
"src": "windwp/nvim-autopairs"
},
{
"src": "windwp/nvim-ts-autotag"
},
{
"src": "numToStr/Comment.nvim"
},
{
"src": "nvim-treesitter/nvim-treesitter-textobjects"
},
{
"src": "blackCauldron7/surround.nvim"
},
{
"src": "andymass/vim-matchup"
},
{
"src": "mbbill/undotree"
},
{
"src": "nvim-lualine/lualine.nvim"
},
{
"src": "akinsho/bufferline.nvim"
},
{
"src": "kyazdani42/nvim-tree.lua"
},
{
"src": "lukas-reineke/indent-blankline.nvim"
},
{
"src": "lukas-reineke/virt-column.nvim"
},
{
"src": "norcalli/nvim-colorizer.lua"
},
{
"src": "lewis6991/gitsigns.nvim"
},
{
"src": "lewis6991/spellsitter.nvim"
},
{
"src": "rcarriga/nvim-notify"
},
{
"src": "LumaKernel/nvim-visual-eof.lua"
},
{
"src": "RRethy/vim-illuminate"
},
{
"src": "numToStr/FTerm.nvim"
},
{
"src": "folke/todo-comments.nvim"
},
{
"src": "editorconfig/editorconfig-vim"
}
]

View file

@ -37,6 +37,42 @@
}; };
meta.homepage = "https://github.com/delphinus/vim-auto-cursorline"; meta.homepage = "https://github.com/delphinus/vim-auto-cursorline";
}; };
popup-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "popup.nvim";
version = "1637254091";
src = pkgs.fetchFromGitHub {
owner = "nvim-lua";
repo = "popup.nvim";
rev = "b7404d35d5d3548a82149238289fa71f7f6de4ac";
sha256 = "dNWz/xovUg55fDZUpVs/2kLphk3lqQyvPtc9ATwbeSQ=";
fetchSubmodules = true;
};
meta.homepage = "https://github.com/nvim-lua/popup.nvim";
};
plenary-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "plenary.nvim";
version = "1644502349";
src = pkgs.fetchFromGitHub {
owner = "nvim-lua";
repo = "plenary.nvim";
rev = "66472128c3191b786966798fc956a689705ab1be";
sha256 = "Iyp2tka563YJjygBiE5g6RDiZWC0Y58w990QAvZVo3A=";
fetchSubmodules = true;
};
meta.homepage = "https://github.com/nvim-lua/plenary.nvim";
};
nvim-web-devicons = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "nvim-web-devicons";
version = "1644145343";
src = pkgs.fetchFromGitHub {
owner = "kyazdani42";
repo = "nvim-web-devicons";
rev = "e3294f687626b40754bb40ac2d636d166098b2fb";
sha256 = "pBZ2HrgtNeQ5dF/dZ/DKRRiboplRr5fvSo74ebubUtE=";
fetchSubmodules = true;
};
meta.homepage = "https://github.com/kyazdani42/nvim-web-devicons";
};
which-key-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix { which-key-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "which-key.nvim"; pname = "which-key.nvim";
version = "1642619077"; version = "1642619077";
@ -85,6 +121,18 @@
}; };
meta.homepage = "https://github.com/svermeulen/vim-subversive"; meta.homepage = "https://github.com/svermeulen/vim-subversive";
}; };
lightspeed-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "lightspeed.nvim";
version = "1644672701";
src = pkgs.fetchFromGitHub {
owner = "ggandor";
repo = "lightspeed.nvim";
rev = "95fba868ea027332c3e12d1481c375a496449587";
sha256 = "ZbpaYvcsppvNTPvCM7xM6Op61rfhadi7Rx+ihcfyInA=";
fetchSubmodules = true;
};
meta.homepage = "https://github.com/ggandor/lightspeed.nvim";
};
dracula-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix { dracula-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "dracula.nvim"; pname = "dracula.nvim";
version = "1643281801"; version = "1643281801";
@ -99,12 +147,12 @@
}; };
nvim-treesitter = pkgs.vimUtils.buildVimPluginFrom2Nix { nvim-treesitter = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "nvim-treesitter"; pname = "nvim-treesitter";
version = "1644822547"; version = "1644837769";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "nvim-treesitter"; owner = "nvim-treesitter";
repo = "nvim-treesitter"; repo = "nvim-treesitter";
rev = "3e99302082489b36480e3b1eeceed763331e790f"; rev = "7c6014df2e46d05685fe9a6bbc1d2e399e2b2414";
sha256 = "/dzx5L7H5pEdp14AmLz/yoPOgEh2yEVw5fosezsEEHk="; sha256 = "eZyUTnpUK+qGA5bmOIksT7GtvEWjiJsn7w4q56zqUAU=";
fetchSubmodules = true; fetchSubmodules = true;
}; };
meta.homepage = "https://github.com/nvim-treesitter/nvim-treesitter"; meta.homepage = "https://github.com/nvim-treesitter/nvim-treesitter";
@ -133,30 +181,6 @@
}; };
meta.homepage = "https://github.com/martinda/Jenkinsfile-vim-syntax"; meta.homepage = "https://github.com/martinda/Jenkinsfile-vim-syntax";
}; };
popup-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "popup.nvim";
version = "1637254091";
src = pkgs.fetchFromGitHub {
owner = "nvim-lua";
repo = "popup.nvim";
rev = "b7404d35d5d3548a82149238289fa71f7f6de4ac";
sha256 = "dNWz/xovUg55fDZUpVs/2kLphk3lqQyvPtc9ATwbeSQ=";
fetchSubmodules = true;
};
meta.homepage = "https://github.com/nvim-lua/popup.nvim";
};
plenary-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "plenary.nvim";
version = "1644502349";
src = pkgs.fetchFromGitHub {
owner = "nvim-lua";
repo = "plenary.nvim";
rev = "66472128c3191b786966798fc956a689705ab1be";
sha256 = "Iyp2tka563YJjygBiE5g6RDiZWC0Y58w990QAvZVo3A=";
fetchSubmodules = true;
};
meta.homepage = "https://github.com/nvim-lua/plenary.nvim";
};
telescope-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix { telescope-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "telescope.nvim"; pname = "telescope.nvim";
version = "1644710452"; version = "1644710452";
@ -200,6 +224,18 @@
}; };
meta.homepage = "https://github.com/ahmedkhalf/project.nvim"; meta.homepage = "https://github.com/ahmedkhalf/project.nvim";
}; };
todo-comments-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "todo-comments.nvim";
version = "1642601933";
src = pkgs.fetchFromGitHub {
owner = "folke";
repo = "todo-comments.nvim";
rev = "98b1ebf198836bdc226c0562b9f906584e6c400e";
sha256 = "8uj5TxO9XZlSCB4lVRbKRc1IlUEKcBf/4bDviwuxEgs=";
fetchSubmodules = true;
};
meta.homepage = "https://github.com/folke/todo-comments.nvim";
};
nvim-lspconfig = pkgs.vimUtils.buildVimPluginFrom2Nix { nvim-lspconfig = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "nvim-lspconfig"; pname = "nvim-lspconfig";
version = "1644780846"; version = "1644780846";
@ -224,18 +260,6 @@
}; };
meta.homepage = "https://github.com/jose-elias-alvarez/null-ls.nvim"; meta.homepage = "https://github.com/jose-elias-alvarez/null-ls.nvim";
}; };
nvim-web-devicons = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "nvim-web-devicons";
version = "1644145343";
src = pkgs.fetchFromGitHub {
owner = "kyazdani42";
repo = "nvim-web-devicons";
rev = "e3294f687626b40754bb40ac2d636d166098b2fb";
sha256 = "pBZ2HrgtNeQ5dF/dZ/DKRRiboplRr5fvSo74ebubUtE=";
fetchSubmodules = true;
};
meta.homepage = "https://github.com/kyazdani42/nvim-web-devicons";
};
trouble-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix { trouble-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "trouble.nvim"; pname = "trouble.nvim";
version = "1640940059"; version = "1640940059";
@ -272,6 +296,18 @@
}; };
meta.homepage = "https://github.com/nvim-lua/lsp-status.nvim"; meta.homepage = "https://github.com/nvim-lua/lsp-status.nvim";
}; };
vim-illuminate = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "vim-illuminate";
version = "1642116587";
src = pkgs.fetchFromGitHub {
owner = "RRethy";
repo = "vim-illuminate";
rev = "db98338285574265a6ce54370b54d9f939e091bb";
sha256 = "QnrzzbWonGsnXCXhHmMLqf3LeDw67D6UtGcn9Ytu0MY=";
fetchSubmodules = true;
};
meta.homepage = "https://github.com/RRethy/vim-illuminate";
};
nvim-cmp = pkgs.vimUtils.buildVimPluginFrom2Nix { nvim-cmp = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "nvim-cmp"; pname = "nvim-cmp";
version = "1644812796"; version = "1644812796";
@ -452,17 +488,17 @@
}; };
meta.homepage = "https://github.com/nvim-treesitter/nvim-treesitter-textobjects"; meta.homepage = "https://github.com/nvim-treesitter/nvim-treesitter-textobjects";
}; };
surround-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix { vim-surround = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "surround.nvim"; pname = "vim-surround";
version = "1643684895"; version = "1643508337";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "blackCauldron7"; owner = "tpope";
repo = "surround.nvim"; repo = "vim-surround";
rev = "549045828bbd9de0746b411a762fa8c382fb10ff"; rev = "baf89ad26488f6a7665d51b986f5c7ad2d22b30b";
sha256 = "XXR/48pbeGwKifYrhtEyMsOCUxejuIla60q0fSYFgTc="; sha256 = "KLZztzV/3zh52MZ9YG0F/wQnke4EorXOB1YJ/sUL908=";
fetchSubmodules = true; fetchSubmodules = true;
}; };
meta.homepage = "https://github.com/blackCauldron7/surround.nvim"; meta.homepage = "https://github.com/tpope/vim-surround";
}; };
vim-matchup = pkgs.vimUtils.buildVimPluginFrom2Nix { vim-matchup = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "vim-matchup"; pname = "vim-matchup";
@ -608,18 +644,6 @@
}; };
meta.homepage = "https://github.com/LumaKernel/nvim-visual-eof.lua"; meta.homepage = "https://github.com/LumaKernel/nvim-visual-eof.lua";
}; };
vim-illuminate = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "vim-illuminate";
version = "1642116587";
src = pkgs.fetchFromGitHub {
owner = "RRethy";
repo = "vim-illuminate";
rev = "db98338285574265a6ce54370b54d9f939e091bb";
sha256 = "QnrzzbWonGsnXCXhHmMLqf3LeDw67D6UtGcn9Ytu0MY=";
fetchSubmodules = true;
};
meta.homepage = "https://github.com/RRethy/vim-illuminate";
};
FTerm-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix { FTerm-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "FTerm.nvim"; pname = "FTerm.nvim";
version = "1641276048"; version = "1641276048";
@ -632,18 +656,6 @@
}; };
meta.homepage = "https://github.com/numToStr/FTerm.nvim"; meta.homepage = "https://github.com/numToStr/FTerm.nvim";
}; };
todo-comments-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "todo-comments.nvim";
version = "1642601933";
src = pkgs.fetchFromGitHub {
owner = "folke";
repo = "todo-comments.nvim";
rev = "98b1ebf198836bdc226c0562b9f906584e6c400e";
sha256 = "8uj5TxO9XZlSCB4lVRbKRc1IlUEKcBf/4bDviwuxEgs=";
fetchSubmodules = true;
};
meta.homepage = "https://github.com/folke/todo-comments.nvim";
};
editorconfig-vim = pkgs.vimUtils.buildVimPluginFrom2Nix { editorconfig-vim = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "editorconfig-vim"; pname = "editorconfig-vim";
version = "1642820146"; version = "1642820146";

View file

@ -0,0 +1,86 @@
# Fixes
- src: lewis6991/impatient.nvim
- src: antoinemadec/FixCursorHold.nvim
- src: delphinus/vim-auto-cursorline
# Utils
- src: nvim-lua/popup.nvim
- src: nvim-lua/plenary.nvim
- src: kyazdani42/nvim-web-devicons
# Keybindings
- src: folke/which-key.nvim
- src: svermeulen/vim-yoink
- src: svermeulen/vim-cutlass
- src: svermeulen/vim-subversive
- src: ggandor/lightspeed.nvim
# Themes
- src: Mofiqul/dracula.nvim
# Syntax
- src: nvim-treesitter/nvim-treesitter
- src: nvim-treesitter/playground
- src: martinda/Jenkinsfile-vim-syntax
# Telescope
- src: nvim-telescope/telescope.nvim
- src: natecraddock/telescope-zf-native.nvim
nativeBuildInputs:
- just
- zigpkgs."0.9.0"
buildPhase: |-
just clean
XDG_CACHE_HOME=./xdg_cache just build
mv lib/libzf.so lib/libzf-osx-arm64.so
rm -rf ./xdg_cache
- src: ahmedkhalf/project.nvim
- src: folke/todo-comments.nvim
# # LSP
- src: neovim/nvim-lspconfig
- src: jose-elias-alvarez/null-ls.nvim
- src: folke/trouble.nvim
- src: onsails/lspkind-nvim
- src: nvim-lua/lsp-status.nvim
- src: RRethy/vim-illuminate
# cmp
- src: hrsh7th/nvim-cmp
- src: hrsh7th/cmp-nvim-lsp
- src: hrsh7th/cmp-nvim-lsp-signature-help
- src: L3MON4D3/LuaSnip
- src: saadparwaiz1/cmp_luasnip
- src: hrsh7th/cmp-nvim-lua
- src: hrsh7th/cmp-path
- src: hrsh7th/cmp-buffer
- src: ray-x/cmp-treesitter
- src: hrsh7th/cmp-cmdline
- src: hrsh7th/cmp-nvim-lsp-document-symbol
# Pairs
- src: windwp/nvim-autopairs
- src: windwp/nvim-ts-autotag
# Comments
- src: numToStr/Comment.nvim
# Textobjects
- src: nvim-treesitter/nvim-treesitter-textobjects
- src: tpope/vim-surround
# UI
- src: andymass/vim-matchup
- src: mbbill/undotree
- src: nvim-lualine/lualine.nvim
- src: akinsho/bufferline.nvim
- src: kyazdani42/nvim-tree.lua
- src: lukas-reineke/indent-blankline.nvim
- src: lukas-reineke/virt-column.nvim
- src: norcalli/nvim-colorizer.lua
- src: lewis6991/gitsigns.nvim
- src: lewis6991/spellsitter.nvim
- src: rcarriga/nvim-notify
- src: LumaKernel/nvim-visual-eof.lua
- src: numToStr/FTerm.nvim
- src: editorconfig/editorconfig-vim

View file

@ -8,7 +8,7 @@ trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG
trap 'code=$?; if [ "$code" -ne "0" ]; then echo "\"${last_command}\" command ended with exit code $code."; fi' EXIT trap 'code=$?; if [ "$code" -ne "0" ]; then echo "\"${last_command}\" command ended with exit code $code."; fi' EXIT
script_dir="$(dirname "$(realpath "$0")")" script_dir="$(dirname "$(realpath "$0")")"
plugins_json="${script_dir}/plugins.json" plugins="${script_dir}/plugins.yaml"
nix_new_file="${script_dir}/plugins_new.nix" nix_new_file="${script_dir}/plugins_new.nix"
nix_file="${script_dir}/plugins.nix" nix_file="${script_dir}/plugins.nix"
@ -19,7 +19,8 @@ if [ -z "$github_auth" ]; then
exit 1 exit 1
fi fi
readarray -t plugin_array <<<"$(jq -c '.[]' "$plugins_json")" plugins_json="$(dasel -r yaml -w json . <"$plugins")"
readarray -t plugin_array <<<"$(echo "$plugins_json" | jq -c '.[]')"
rm -f "$nix_new_file" rm -f "$nix_new_file"
echo '# This file has been auto-generated' >"$nix_new_file" echo '# This file has been auto-generated' >"$nix_new_file"
@ -27,7 +28,7 @@ echo '{ pkgs, ... }:' >>"$nix_new_file"
echo "{" >>"$nix_new_file" echo "{" >>"$nix_new_file"
for plugin in "${plugin_array[@]}"; do for plugin in "${plugin_array[@]}"; do
raw_src="$(echo "$plugin" | jq -r '.src')" raw_src="$(echo "$plugin" | dasel -r json --plain '.src')"
owner="$(echo "$raw_src" | cut -d'/' -f1)" owner="$(echo "$raw_src" | cut -d'/' -f1)"
repo="$(echo "$raw_src" | cut -d'/' -f2)" repo="$(echo "$raw_src" | cut -d'/' -f2)"
@ -44,10 +45,10 @@ for plugin in "${plugin_array[@]}"; do
rev="$(echo "$src" | grep rev | cut -d '"' -f 2)" rev="$(echo "$src" | grep rev | cut -d '"' -f 2)"
commit_info="$(curl -u "$github_auth" --silent "https://api.github.com/repos/${owner}/${repo}/commits/${rev}")" commit_info="$(curl -u "$github_auth" --silent "https://api.github.com/repos/${owner}/${repo}/commits/${rev}")"
commit_date="$(echo "$commit_info" | jq -r '.commit.committer.date')" commit_date="$(echo "$commit_info" | dasel -r json --plain '.commit.committer.date')"
if [[ "$commit_date" == "null" ]]; then if [[ "$commit_date" == "null" ]]; then
commit_date="$(echo "$commit_info" | jq -r '.commit.author.date')" commit_date="$(echo "$commit_info" | dasel -r json --plain '.commit.author.date')"
fi fi
version="$(date -d "$commit_date" "+%s")" version="$(date -d "$commit_date" "+%s")"

View file

@ -5,6 +5,7 @@ mkShell {
packages = [ packages = [
bat bat
curl curl
dasel
jq jq
nix-prefetch-github nix-prefetch-github
nixpkgs-fmt nixpkgs-fmt