1
0
Fork 0

nvim: Update configuration

This commit is contained in:
Daniel Kempkens 2022-05-31 15:46:32 +02:00
parent 014898f41f
commit 895b19fcbf
11 changed files with 226 additions and 122 deletions

View file

@ -8,5 +8,8 @@
(fn mod.highlight-link [src dst] (fn mod.highlight-link [src dst]
`(vim.api.nvim_cmd {:cmd :highlight :args [:link ,src ,dst]} [])) `(vim.api.nvim_cmd {:cmd :highlight :args [:link ,src ,dst]} []))
(fn mod.deferred_cmd [args delay]
`(vim.defer_fn #(vim.api.nvim_cmd ,args []) ,delay))
mod) mod)

View file

@ -21,6 +21,12 @@
(fn mod.disable-for-buffer [] (fn mod.disable-for-buffer []
(set-bufvar 0 :nifoc_formatter_disabled 1)) (set-bufvar 0 :nifoc_formatter_disabled 1))
(fn mod.active? []
(if (= b.nifoc_formatter_disabled 1) false
(= b.nifoc_lsp_formatter_enabled 1) true
(not= (vim.opt_local.formatprg:get) "") true
false))
(fn mod.maybe-enable-lsp [client bufnr] (fn mod.maybe-enable-lsp [client bufnr]
(when (client.supports_method :textDocument/rangeFormatting) (when (client.supports_method :textDocument/rangeFormatting)
(api.nvim_buf_set_option bufnr :formatexpr "v:lua.vim.lsp.formatexpr()")) (api.nvim_buf_set_option bufnr :formatexpr "v:lua.vim.lsp.formatexpr()"))

View file

@ -10,6 +10,7 @@
telescope-dropdown (telescope-themes.get_dropdown) telescope-dropdown (telescope-themes.get_dropdown)
npairs (require :nvim-autopairs) npairs (require :nvim-autopairs)
gitsigns (require :gitsigns) gitsigns (require :gitsigns)
neogit (require :neogit)
repl (require :nifoc.repl) repl (require :nifoc.repl)
formatting (require :nifoc.formatting) formatting (require :nifoc.formatting)
nifoc-lsp (require :nifoc.lsp)] nifoc-lsp (require :nifoc.lsp)]
@ -49,10 +50,14 @@
#(telescope-builtin.git_branches telescope-dropdown) #(telescope-builtin.git_branches telescope-dropdown)
{:desc "List VCS Branches"}) {:desc "List VCS Branches"})
(keymap.set :n :<leader>vl gitsigns.blame_line {:desc "Blame Line"}) (keymap.set :n :<leader>vl gitsigns.blame_line {:desc "Blame Line"})
(keymap.set :n :<leader>vn :<cmd>Neogit<CR> {:desc "Open Neogit"}) (keymap.set :n :<leader>vn #(neogit.open {:kind :split})
(keymap.set :n :<leader>vc "<cmd>Neogit commit<CR>" {:desc "Neogit Commit"}) {:desc "Open Neogit"})
(keymap.set :n :<leader>vp "<cmd>Neogit pull<CR>" {:desc "Neogit Pull"}) (keymap.set :n :<leader>vc #(neogit.open {1 :commit :kind :split})
(keymap.set :n :<leader>vP "<cmd>Neogit push<CR>" {:desc "Neogit Push"}) {:desc "Neogit Commit"})
(keymap.set :n :<leader>vp #(neogit.open {1 :pull :kind :split})
{:desc "Neogit Pull"})
(keymap.set :n :<leader>vP #(neogit.open {1 :push :kind :split})
{:desc "Neogit Push"})
(keymap.set :n :<leader>lk telescope-builtin.keymaps (keymap.set :n :<leader>lk telescope-builtin.keymaps
{:desc "Show Keymappings"}) {:desc "Show Keymappings"})
(keymap.set :n :<leader>ld #(telescope-builtin.diagnostics telescope-ivy) (keymap.set :n :<leader>ld #(telescope-builtin.diagnostics telescope-ivy)

View file

@ -1,10 +1,15 @@
(import-macros {: deferred_cmd} :../macros/cmd)
(let [mod {} (let [mod {}
api vim.api api vim.api
heirline-utils (require :heirline.utils) heirline-utils (require :heirline.utils)
heirline-conditions (require :heirline.conditions) heirline-conditions (require :heirline.conditions)
web-devicons (require :nvim-web-devicons) web-devicons (require :nvim-web-devicons)
dracula (require :dracula) dracula (require :dracula)
colors (dracula.colors)] colors (dracula.colors)
formatting (require :nifoc.formatting)
nifoc-treesitter (require :nifoc.treesitter)
neogit (require :neogit)]
(fn buffer-variable-exists? [key] (fn buffer-variable-exists? [key]
(not= (. vim :b key) nil)) (not= (. vim :b key) nil))
@ -99,8 +104,7 @@
:t {:fg colors.black :t {:fg colors.black
:bg colors.purple :bg colors.purple
:bold true}}} :bold true}}}
:provider (fn [self] :provider #(.. " " (. $1 :mode-names $1.mode) " ")
(.. " " (. self :mode-names self.mode) " "))
:hl (fn [self] :hl (fn [self]
(let [short-mode (self.mode:sub 1 1)] (let [short-mode (self.mode:sub 1 1)]
(. self :mode-hl short-mode)))}) (. self :mode-hl short-mode)))})
@ -148,12 +152,11 @@
(set self.has-changes? (set self.has-changes?
(or (> self.git-added 0) (> self.git-removed 0) (or (> self.git-added 0) (> self.git-removed 0)
(> self.git-changed 0))))) (> self.git-changed 0)))))
1 {:provider (fn [self] 1 {:provider #(.. "  " $1.git-head " ")
(.. "  " self.git-head " ")) :hl {:fg colors.black :bg colors.orange :bold true}
:hl {:fg colors.black :bg colors.orange :bold true}} :on_click {:name :heirline_git_branch
2 {:condition (fn [self] :callback #(neogit.open {:kind :split})}}
self.has-changes?) 2 {:condition #$1.has-changes? :provider " "}
:provider " "}
3 {:provider (fn [self] 3 {:provider (fn [self]
(let [spacer (if (or (> self.git-removed 0) (let [spacer (if (or (> self.git-removed 0)
(> self.git-changed 0)) (> self.git-changed 0))
@ -223,19 +226,13 @@
{:static {:format {:dos "" :unix "" :mac ""}} {:static {:format {:dos "" :unix "" :mac ""}}
:hl {:fg colors.black :bg colors.orange} :hl {:fg colors.black :bg colors.orange}
1 {:provider " "} 1 {:provider " "}
2 {:provider (fn [] 2 {:condition #(buffer-variable-exists? :nifoc_lsp_enabled)
(when (buffer-variable-exists? :nifoc_lsp_enabled) :provider " "
" "))} :on_click {:name :heirline_buffer_options_lsp
3 {:provider (fn [] :callback #(deferred_cmd {:cmd :LspInfo} 200)}}
(when (or (buffer-variable-exists? :nifoc_lsp_formatter_enabled) 3 {:condition #(formatting.active?) :provider " "}
(not= (vim.opt_local.formatprg:get) "")) 4 {:condition #(nifoc-treesitter.active?) :provider " "}
" "))} 5 {:condition #vim.wo.spell :provider "暈"}
4 {:provider (fn []
(when (buffer-variable-exists? :nifoc_treesitter_enabled)
" "))}
5 {:provider (fn []
(when vim.wo.spell
"暈"))}
6 {:provider (fn [self] 6 {:provider (fn [self]
(let [f vim.bo.fileformat] (let [f vim.bo.fileformat]
(.. (. self :format f) " ")))}}) (.. (. self :format f) " ")))}})

View file

@ -0,0 +1,20 @@
(let [mod {}
treesitter (require :nvim-treesitter)
set-bufvar vim.api.nvim_buf_set_var]
(fn mod.setup []
(treesitter.define_modules {:nifoc_hooks {:enable false
:attach (lambda [bufnr]
(set-bufvar bufnr
:nifoc_treesitter_enabled
1))
:detach (lambda [bufnr]
(set-bufvar bufnr
:nifoc_treesitter_enabled
0))
:is_supported #true}}))
(fn mod.active? []
(= vim.b.nifoc_treesitter_enabled 1))
mod)

View file

@ -20,6 +20,10 @@
{:condition (fn [] {:condition (fn []
(conditions.buffer_matches {:filetype [:TelescopePrompt]})) (conditions.buffer_matches {:filetype [:TelescopePrompt]}))
1 (ns.custom-mode :Telescope :black :green)}) 1 (ns.custom-mode :Telescope :black :green)})
(local neogit-statusline
{:condition (fn []
(conditions.buffer_matches {:filetype [:NeogitStatus]}))
1 (ns.custom-mode :Neogit :black :purple)})
(local shell-statusline (local shell-statusline
{:condition (fn [] {:condition (fn []
(not= vim.b.nifoc_shell_mode nil)) (not= vim.b.nifoc_shell_mode nil))
@ -31,8 +35,9 @@
(local statuslines {:hl ns.default-hl (local statuslines {:hl ns.default-hl
:init utils.pick_child_on_condition :init utils.pick_child_on_condition
1 telescope-statusline 1 telescope-statusline
2 shell-statusline 2 neogit-statusline
3 default-statusline}) 3 shell-statusline
4 default-statusline})
;; Load Statusline ;; Load Statusline
(set vim.opt.laststatus 3) (set vim.opt.laststatus 3)
(heirline.setup statuslines)) (heirline.setup statuslines))

View file

@ -1,7 +1,7 @@
(let [treesitter (require :nvim-treesitter) (let [treesitter (require :nvim-treesitter)
treesitter-config (require :nvim-treesitter.configs) treesitter-config (require :nvim-treesitter.configs)
treesitter-parsers (require :nvim-treesitter.parsers) treesitter-parsers (require :nvim-treesitter.parsers)
set-bufvar vim.api.nvim_buf_set_var nifoc-treesitter (require :nifoc.treesitter)
install-parsers [:bash install-parsers [:bash
:comment :comment
:css :css
@ -32,16 +32,7 @@
:vim :vim
:yaml] :yaml]
rainbow-parsers [:fennel]] rainbow-parsers [:fennel]]
(treesitter.define_modules {:nifoc_hooks {:enable false (nifoc-treesitter.setup)
:attach (lambda [bufnr]
(set-bufvar bufnr
:nifoc_treesitter_enabled
1))
:detach (lambda [bufnr]
(set-bufvar bufnr
:nifoc_treesitter_enabled
0))
:is_supported #true}})
(treesitter-config.setup {:ensure_installed install-parsers (treesitter-config.setup {:ensure_installed install-parsers
:sync_install true :sync_install true
:highlight {:enable true} :highlight {:enable true}

View file

@ -64,6 +64,7 @@ in
# Utils # Utils
popup-nvim popup-nvim
plenary-nvim plenary-nvim
nvim-web-devicons
# Keybindings # Keybindings
{ {
@ -124,6 +125,14 @@ in
type = "fennel"; type = "fennel";
} }
lspkind-nvim
{
plugin = vim-illuminate;
config = builtins.readFile ../../config/nvim/plugins/illuminate.fnl;
type = "fennel";
}
# Linter # Linter
{ {
plugin = nvim-lint; plugin = nvim-lint;
@ -131,6 +140,13 @@ in
type = "fennel"; type = "fennel";
} }
# Comments
{
plugin = comment-nvim;
config = builtins.readFile ../../config/nvim/plugins/comment.fnl;
type = "fennel";
}
# Snippets # Snippets
{ {
plugin = LuaSnip; plugin = LuaSnip;
@ -138,6 +154,8 @@ in
type = "fennel"; type = "fennel";
} }
friendly-snippets
# cmp # cmp
{ {
plugin = nvim-cmp; plugin = nvim-cmp;
@ -155,6 +173,13 @@ in
cmp-cmdline cmp-cmdline
cmp-nvim-lsp-document-symbol cmp-nvim-lsp-document-symbol
# Formatting
{
plugin = neoformat;
config = builtins.readFile ../../config/nvim/plugins/neoformat.fnl;
type = "fennel";
}
# Pairs # Pairs
{ {
plugin = nvim-autopairs; plugin = nvim-autopairs;
@ -208,6 +233,12 @@ in
type = "fennel"; type = "fennel";
} }
{
plugin = toggleterm-nvim;
config = builtins.readFile ../../config/nvim/plugins/toggleterm.fnl;
type = "fennel";
}
{ {
plugin = urlview-nvim; plugin = urlview-nvim;
config = builtins.readFile ../../config/nvim/plugins/urlview.fnl; config = builtins.readFile ../../config/nvim/plugins/urlview.fnl;
@ -250,9 +281,6 @@ in
# Fixes # Fixes
FixCursorHold-nvim FixCursorHold-nvim
# Utils
nvim-web-devicons
# Telescope # Telescope
{ {
plugin = project-nvim; plugin = project-nvim;
@ -266,43 +294,11 @@ in
type = "fennel"; type = "fennel";
} }
# LSP
lspkind-nvim
{
plugin = vim-illuminate;
config = builtins.readFile ../../config/nvim/plugins/illuminate.fnl;
type = "fennel";
}
# Formatting
{
plugin = neoformat;
config = builtins.readFile ../../config/nvim/plugins/neoformat.fnl;
type = "fennel";
}
# Comments
{
plugin = comment-nvim;
config = builtins.readFile ../../config/nvim/plugins/comment.fnl;
type = "fennel";
}
# Snippets
friendly-snippets
# Textobjects # Textobjects
vim-surround vim-surround
# UI # UI
undotree undotree
{
plugin = toggleterm-nvim;
config = builtins.readFile ../../config/nvim/plugins/toggleterm.fnl;
type = "fennel";
}
]); ]);
}; };

View file

@ -34,6 +34,17 @@
fetchSubmodules = false; fetchSubmodules = false;
}; };
}; };
nvim-web-devicons = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "nvim-web-devicons";
version = "2022-05-30";
src = pkgs.fetchFromGitHub {
owner = "kyazdani42";
repo = "nvim-web-devicons";
rev = "8d2c5337f0a2d0a17de8e751876eeb192b32310e";
sha256 = "0jb25z0bw2xyix18pf59lrmbnih8yxxkb81xi9zl034k9l9cmsv3";
fetchSubmodules = false;
};
};
yanky-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix { yanky-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "yanky.nvim"; pname = "yanky.nvim";
version = "2022-05-14"; version = "2022-05-14";
@ -58,12 +69,12 @@
}; };
substitute-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix { substitute-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "substitute.nvim"; pname = "substitute.nvim";
version = "2022-05-25"; version = "2022-05-30";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "gbprod"; owner = "gbprod";
repo = "substitute.nvim"; repo = "substitute.nvim";
rev = "2dda396e8cfa6463a5c6fdb98b52635d200e3775"; rev = "400819cefa697010a7af02e3a94c1efb9b120f8b";
sha256 = "0hvjxpag3cyklnfgbxk423y5icrmi936hzapa851qirxpw9zxj18"; sha256 = "03qix89s5w31jddidky80w6byv6c5njlbq48173f4cmdvrag7m86";
fetchSubmodules = false; fetchSubmodules = false;
}; };
}; };
@ -91,23 +102,23 @@
}; };
nvim-treesitter = pkgs.vimUtils.buildVimPluginFrom2Nix { nvim-treesitter = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "nvim-treesitter"; pname = "nvim-treesitter";
version = "2022-05-25"; version = "2022-05-31";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "nvim-treesitter"; owner = "nvim-treesitter";
repo = "nvim-treesitter"; repo = "nvim-treesitter";
rev = "3dea0bbf71438d2d5a79de0145b509dfb16525a5"; rev = "5e24e8d6a7b81755b7374f04b914d1e2b867f49a";
sha256 = "08chqv4a2d3f629v78dym0pq56pmdnp8j4xp4s93wnj4mpz3qmpz"; sha256 = "13ki34ycz1xq4zz6ds68jpgyqgbdssadxnsyq9g8nzw43nrg59ch";
fetchSubmodules = false; fetchSubmodules = false;
}; };
}; };
nvim-ts-rainbow = pkgs.vimUtils.buildVimPluginFrom2Nix { nvim-ts-rainbow = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "nvim-ts-rainbow"; pname = "nvim-ts-rainbow";
version = "2022-05-09"; version = "2022-05-28";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "p00f"; owner = "p00f";
repo = "nvim-ts-rainbow"; repo = "nvim-ts-rainbow";
rev = "190f8c83abb29504877b91c84ed3ceb6009ad3bd"; rev = "18cb3a45e0ff843d48e8637a36b9cc6cd89d71b0";
sha256 = "1kq54zd1yx6q1ch886jcvhhydbxz9frky9wl60q00q62zgds8vmz"; sha256 = "0w8gzxps0rn20cr92ib5zk3xw6l2i8032081r0v34rry1xahdam6";
fetchSubmodules = false; fetchSubmodules = false;
}; };
}; };
@ -124,12 +135,12 @@
}; };
telescope-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix { telescope-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "telescope.nvim"; pname = "telescope.nvim";
version = "2022-05-25"; version = "2022-05-29";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "nvim-telescope"; owner = "nvim-telescope";
repo = "telescope.nvim"; repo = "telescope.nvim";
rev = "cd9e6aaee01624c1a5423a783e7fd5bc8fc955c5"; rev = "54be102e20ee4acaaa17e9fce8be07fb586630df";
sha256 = "1qvf0z2q0dz0nbvicz1vhd3684vx7nandxnz7246wncm2l5k26xr"; sha256 = "0w4h02xkdmjjmz5fr98h24ylcq7jdm3mg1x9hka9cqdvdsdbck1s";
fetchSubmodules = false; fetchSubmodules = false;
}; };
}; };
@ -175,34 +186,78 @@
}; };
nvim-lspconfig = pkgs.vimUtils.buildVimPluginFrom2Nix { nvim-lspconfig = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "nvim-lspconfig"; pname = "nvim-lspconfig";
version = "2022-05-22"; version = "2022-05-31";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "neovim"; owner = "neovim";
repo = "nvim-lspconfig"; repo = "nvim-lspconfig";
rev = "b86a37caf7a4e53e62ba883aef5889b590260de9"; rev = "84252b08b7f9831b0b1329f2a90ff51dd873e58f";
sha256 = "0bp1wqiwngrcl4isnnk12v3kzzrvjfbwhx79jvfzqnlqnl9q4m1p"; sha256 = "0dv2ss2xyf92d59mvjfp3wfr14k80qwm5ijda9yl0pgvj1fwrn2r";
fetchSubmodules = false;
};
};
lspkind-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "lspkind.nvim";
version = "2022-04-18";
src = pkgs.fetchFromGitHub {
owner = "onsails";
repo = "lspkind.nvim";
rev = "57e5b5dfbe991151b07d272a06e365a77cc3d0e7";
sha256 = "1c13ll09v16prhzgmv8pappck4x3ahhc5sizp6r61kb7k4mkfpfk";
fetchSubmodules = false;
};
};
vim-illuminate = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "vim-illuminate";
version = "2022-04-10";
src = pkgs.fetchFromGitHub {
owner = "RRethy";
repo = "vim-illuminate";
rev = "c82e6d04f27a41d7fdcad9be0bce5bb59fcb78e5";
sha256 = "192a6il56r4cfkqq67vh5kbdfa7vzwmh33sb8zy6zlri0a0h7dw8";
fetchSubmodules = false; fetchSubmodules = false;
}; };
}; };
nvim-lint = pkgs.vimUtils.buildVimPluginFrom2Nix { nvim-lint = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "nvim-lint"; pname = "nvim-lint";
version = "2022-05-11"; version = "2022-05-28";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "mfussenegger"; owner = "mfussenegger";
repo = "nvim-lint"; repo = "nvim-lint";
rev = "0407c340a77380e4122dc349efa10fc846c928b4"; rev = "19cc4808a6f8b4c6043f285fb2f1f996842424fc";
sha256 = "1cagndfqdk505q18iq4wgmwav3hh04vmgxj7h8924v9ffj8wr0wx"; sha256 = "1rp8ijhd4dr7359iy06lzwx2w8nxi3784rcn48k45mdmy86xic2f";
fetchSubmodules = false;
};
};
comment-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "comment.nvim";
version = "2022-05-30";
src = pkgs.fetchFromGitHub {
owner = "numtostr";
repo = "comment.nvim";
rev = "bdf9ca64dcf4cc3c411aaeee4cfba59398d02aa8";
sha256 = "138lp4qk2hj0w58mhl8b40rxn5ybihmxcaaj0sqm0xcgg2fiim05";
fetchSubmodules = false; fetchSubmodules = false;
}; };
}; };
LuaSnip = pkgs.vimUtils.buildVimPluginFrom2Nix { LuaSnip = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "LuaSnip"; pname = "LuaSnip";
version = "2022-05-23"; version = "2022-05-28";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "L3MON4D3"; owner = "L3MON4D3";
repo = "LuaSnip"; repo = "LuaSnip";
rev = "08b06c3dace531cac7cf297ce407f0f43bfd192b"; rev = "52f4aed58db32a3a03211d31d2b12c0495c45580";
sha256 = "0wvpnanymr3p5aqqkwggjs30gsyxrn14j6fihqblaw1m2dbl4zli"; sha256 = "0drc847m55xwiha1wa2ykd5cwynmvd5ik2sys9v727fb4fbqmpa0";
fetchSubmodules = false;
};
};
friendly-snippets = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "friendly-snippets";
version = "2022-05-28";
src = pkgs.fetchFromGitHub {
owner = "rafamadriz";
repo = "friendly-snippets";
rev = "974d79269a5a7f63e973db6a51b081a45750d026";
sha256 = "1yrg34k0y89nnagl1b5g50paydqs3g81f8l09v5k7gcmwy2mh71i";
fetchSubmodules = false; fetchSubmodules = false;
}; };
}; };
@ -316,14 +371,25 @@
fetchSubmodules = false; fetchSubmodules = false;
}; };
}; };
neoformat = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "neoformat";
version = "2022-05-27";
src = pkgs.fetchFromGitHub {
owner = "sbdchd";
repo = "neoformat";
rev = "c010862fa151f1d6a009d94a0acbe49514781cdc";
sha256 = "08y0srr1i5n7d15w3shp8cdj4gqhdxpb6311k879amb28am5n8zk";
fetchSubmodules = false;
};
};
nvim-autopairs = pkgs.vimUtils.buildVimPluginFrom2Nix { nvim-autopairs = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "nvim-autopairs"; pname = "nvim-autopairs";
version = "2022-05-04"; version = "2022-05-26";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "windwp"; owner = "windwp";
repo = "nvim-autopairs"; repo = "nvim-autopairs";
rev = "aea913109d30c87df329ec9b8fea9aed6ef9f52a"; rev = "b9cc0a26f3b5610ce772004e1efd452b10b36bc9";
sha256 = "0jhw4m552vfxilmn5cp67a9xz1w8jd6ixijyl2bsvp1j56qklfi6"; sha256 = "0jj8c4jzrswrpc7fbfxa7fg2jbn1djrhl0yrqjpmgrlbs1nqjwwm";
fetchSubmodules = false; fetchSubmodules = false;
}; };
}; };
@ -340,12 +406,12 @@
}; };
vim-matchup = pkgs.vimUtils.buildVimPluginFrom2Nix { vim-matchup = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "vim-matchup"; pname = "vim-matchup";
version = "2022-05-06"; version = "2022-05-29";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "andymass"; owner = "andymass";
repo = "vim-matchup"; repo = "vim-matchup";
rev = "485e71120fea7be22f0ba051a05a00675276ced0"; rev = "976ebfe61b407d0a75d87b4a507bf9ae4ffffbaa";
sha256 = "0zzn5gspi5811w1drbk362a75q4d697l0ngxgps00bcgvj9l8r6d"; sha256 = "182lzlbjfplvhzw36rsizjhjcnhkddswm0yydbqg3gjdxs7y5wdf";
fetchSubmodules = false; fetchSubmodules = false;
}; };
}; };
@ -362,34 +428,23 @@
}; };
heirline-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix { heirline-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "heirline.nvim"; pname = "heirline.nvim";
version = "2022-05-25"; version = "2022-05-31";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "rebelot"; owner = "rebelot";
repo = "heirline.nvim"; repo = "heirline.nvim";
rev = "bb7eaec8f5f8e762b23da91109b54e1b3518c7b8"; rev = "7e951f4cff83c13e3c337ee60ce3166d951e424a";
sha256 = "0hly8zaqn7fvvak7dapr2rhx9z4y4rga8sh3v3w3divk9nnqf55v"; sha256 = "0jhzbmy6cp9jv4j6nsqwq450kiv6cbrshqv6n2438gsacs2z1nxv";
fetchSubmodules = false;
};
};
lualine-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "lualine.nvim";
version = "2022-05-22";
src = pkgs.fetchFromGitHub {
owner = "nvim-lualine";
repo = "lualine.nvim";
rev = "c12b1673107c181e32ce54f2dc4c76a2a884d7ba";
sha256 = "13msrlhwm8vsnk50gfx8lzswk50qgzx7namdh6gm1aw4ckmwfsyc";
fetchSubmodules = false; fetchSubmodules = false;
}; };
}; };
bufferline-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix { bufferline-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "bufferline.nvim"; pname = "bufferline.nvim";
version = "2022-05-18"; version = "2022-05-29";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "akinsho"; owner = "akinsho";
repo = "bufferline.nvim"; repo = "bufferline.nvim";
rev = "82e3598363402cc8f0d1e1d8f55c744de8f4bb92"; rev = "e2b1e99deb077bf49f8e167d1320292e66b22477";
sha256 = "1mgbp464vl9hibjwv8ihij780dpbim185mcgwfwyrfviij92japf"; sha256 = "1m7jxmf9gfnqz3im167dbviw820clagl1yanp2x556zh94jxp4hf";
fetchSubmodules = false; fetchSubmodules = false;
}; };
}; };
@ -415,6 +470,17 @@
fetchSubmodules = false; fetchSubmodules = false;
}; };
}; };
toggleterm-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "toggleterm.nvim";
version = "2022-05-22";
src = pkgs.fetchFromGitHub {
owner = "akinsho";
repo = "toggleterm.nvim";
rev = "93c2f2ca96af74f22f470e2fbcbd5e89b1faa63d";
sha256 = "0449qbkskzfgbnn2xgr0cydjjs8gvzgcrv7x77bqki7wsr0mqgx7";
fetchSubmodules = false;
};
};
urlview-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix { urlview-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "urlview.nvim"; pname = "urlview.nvim";
version = "2022-05-07"; version = "2022-05-07";
@ -439,12 +505,12 @@
}; };
gitsigns-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix { gitsigns-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "gitsigns.nvim"; pname = "gitsigns.nvim";
version = "2022-05-24"; version = "2022-05-26";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "lewis6991"; owner = "lewis6991";
repo = "gitsigns.nvim"; repo = "gitsigns.nvim";
rev = "44372ff5dca2ca4c0cff13bb9a0d382238756c68"; rev = "27aeb2e715c32cbb99aa0b326b31739464b61644";
sha256 = "0gzgsc6abpwdmx5mx6656rific4gbfkwnmkbii5w2x5bxp98lz6z"; sha256 = "04m1767cndrx46xsa6frf77xv64hmr6w21dk2wh4s0sqjvqqm1r6";
fetchSubmodules = false; fetchSubmodules = false;
}; };
}; };

View file

@ -4,6 +4,7 @@
# Utils # Utils
- src: nvim-lua/popup.nvim - src: nvim-lua/popup.nvim
- src: nvim-lua/plenary.nvim - src: nvim-lua/plenary.nvim
- src: kyazdani42/nvim-web-devicons
# Keybindings # Keybindings
- src: gbprod/yanky.nvim - src: gbprod/yanky.nvim
@ -36,12 +37,18 @@
# LSP # LSP
- src: neovim/nvim-lspconfig - src: neovim/nvim-lspconfig
- src: onsails/lspkind.nvim
- src: RRethy/vim-illuminate
# Linter # Linter
- src: mfussenegger/nvim-lint - src: mfussenegger/nvim-lint
# Comments
- src: numtostr/comment.nvim
# Snippets # Snippets
- src: L3MON4D3/LuaSnip - src: L3MON4D3/LuaSnip
- src: rafamadriz/friendly-snippets
# cmp # cmp
- src: hrsh7th/nvim-cmp - src: hrsh7th/nvim-cmp
@ -55,6 +62,9 @@
- src: hrsh7th/cmp-cmdline - src: hrsh7th/cmp-cmdline
- src: hrsh7th/cmp-nvim-lsp-document-symbol - src: hrsh7th/cmp-nvim-lsp-document-symbol
# Formatting
- src: sbdchd/neoformat
# Pairs # Pairs
- src: windwp/nvim-autopairs - src: windwp/nvim-autopairs
- src: windwp/nvim-ts-autotag - src: windwp/nvim-ts-autotag
@ -65,10 +75,10 @@
# UI # UI
- src: rebelot/heirline.nvim - src: rebelot/heirline.nvim
- src: nvim-lualine/lualine.nvim
- src: akinsho/bufferline.nvim - src: akinsho/bufferline.nvim
- src: lukas-reineke/indent-blankline.nvim - src: lukas-reineke/indent-blankline.nvim
- src: lukas-reineke/virt-column.nvim - src: lukas-reineke/virt-column.nvim
- src: akinsho/toggleterm.nvim
- src: axieax/urlview.nvim - src: axieax/urlview.nvim
- src: TimUntersberger/neogit - src: TimUntersberger/neogit
- src: lewis6991/gitsigns.nvim - src: lewis6991/gitsigns.nvim

View file

@ -46,6 +46,11 @@ for plugin in "${plugin_array[@]}"; do
nix_prefetch_flags+=" --rev $rev" nix_prefetch_flags+=" --rev $rev"
fi fi
branch="$(echo "$plugin" | jq -r '.branch // empty')"
if [ -n "$branch" ]; then
nix_prefetch_flags+=" --branch-name $branch"
fi
src_json="$(nix-prefetch-git $nix_prefetch_flags "$clone_src")" src_json="$(nix-prefetch-git $nix_prefetch_flags "$clone_src")"
src="{ src="{
owner = \"${owner}\"; owner = \"${owner}\";