2024-06-03 11:05:46 +01:00
|
|
|
{ pkgs, ... }:
|
|
|
|
{
|
|
|
|
imports = [
|
2024-06-04 11:47:56 +01:00
|
|
|
./cmp.nix
|
2024-06-03 11:05:46 +01:00
|
|
|
./colorizer.nix
|
|
|
|
./conform.nix
|
2024-06-04 11:47:56 +01:00
|
|
|
./gitsigns.nix
|
|
|
|
./harpoon.nix
|
2024-06-03 11:05:46 +01:00
|
|
|
./lsp.nix
|
2024-06-04 11:47:56 +01:00
|
|
|
./lualine.nix
|
|
|
|
./luasnip.nix
|
|
|
|
./nvim-tree.nix
|
|
|
|
./surround.nix
|
|
|
|
./telescope.nix
|
|
|
|
./treesitter.nix
|
2024-06-03 11:05:46 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
# Load Plugins that aren't provided as modules by nixvim
|
2024-06-04 12:37:26 +01:00
|
|
|
programs.nixvim.extraPlugins = [
|
|
|
|
pkgs.vimPlugins.vim-numbertoggle
|
|
|
|
pkgs.vimPlugins.vimwiki
|
|
|
|
pkgs.vimPlugins.vim-dadbod
|
|
|
|
pkgs.vimPlugins.vim-dadbod-ui
|
2024-06-05 12:36:22 +01:00
|
|
|
pkgs.vimPlugins.vim-dadbod-completion
|
2024-06-03 11:05:46 +01:00
|
|
|
|
2024-06-19 10:33:04 +01:00
|
|
|
(pkgs.vimUtils.buildVimPlugin
|
|
|
|
{
|
|
|
|
name = "precognition.nvim";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "tris203";
|
|
|
|
repo = "precognition.nvim";
|
|
|
|
rev = "v1.0.0";
|
|
|
|
sha256 = "sha256-AqWYV/59ugKyOWALOCdycWVm0bZ7qb981xnuw/mAVzM=";
|
|
|
|
};
|
|
|
|
})
|
|
|
|
|
|
|
|
# (pkgs.vimUtils.buildVimPlugin
|
|
|
|
# {
|
|
|
|
# name = "hardtime";
|
|
|
|
# src = pkgs.fetchFromGitHub {
|
|
|
|
# owner = "m4xshen";
|
|
|
|
# repo = "hardtime.nvim ";
|
|
|
|
# rev = "9a4e24f";
|
|
|
|
# #sha256 = "sha256-abe9ZGmL7U9rC+LxC3LO5/bOn8lHke1FCKO0V3TZGs0=";
|
|
|
|
# };
|
|
|
|
# })
|
|
|
|
#
|
2024-06-04 12:37:26 +01:00
|
|
|
(pkgs.vimUtils.buildVimPlugin
|
|
|
|
{
|
|
|
|
name = "buffer_manager.nvim";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "j-morano";
|
|
|
|
repo = "buffer_manager.nvim";
|
|
|
|
rev = "fd36131";
|
|
|
|
sha256 = "sha256-abe9ZGmL7U9rC+LxC3LO5/bOn8lHke1FCKO0V3TZGs0=";
|
|
|
|
};
|
|
|
|
})
|
2024-06-19 10:33:04 +01:00
|
|
|
|
|
|
|
|
|
|
|
# Keep vim-devicons as last entry
|
|
|
|
pkgs.vimPlugins.vim-devicons
|
2024-06-04 12:37:26 +01:00
|
|
|
];
|
|
|
|
programs.nixvim.extraConfigLua = ''
|
|
|
|
-- buffer_manager.nvim
|
|
|
|
local opts = {noremap = true}
|
2024-06-19 10:33:04 +01:00
|
|
|
|
|
|
|
require("precognition").setup(
|
|
|
|
{
|
|
|
|
}
|
|
|
|
)
|
2024-06-04 12:37:26 +01:00
|
|
|
|
|
|
|
require("buffer_manager").setup(
|
|
|
|
{
|
|
|
|
line_keys = "1234567890",
|
|
|
|
select_menu_item_commands = {
|
|
|
|
edit = {
|
|
|
|
key = "<CR>",
|
|
|
|
command = "edit"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
focus_alternate_buffer = true,
|
|
|
|
short_file_names = false,
|
|
|
|
short_term_names = true,
|
|
|
|
height = 15,
|
|
|
|
width = 0.8,
|
|
|
|
loop_nav = true,
|
|
|
|
highlight = "",
|
|
|
|
win_extra_options = {},
|
|
|
|
borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" },
|
|
|
|
order_buffers = "lastused",
|
|
|
|
show_indicators = "before",
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
-- Custom color for modified buffers
|
|
|
|
vim.api.nvim_set_hl(0, "BufferManagerModified", { fg = "#988100" })
|
|
|
|
|
|
|
|
local bmui = require("buffer_manager.ui")
|
|
|
|
vim.keymap.set('n', '<leader>b', bmui.toggle_quick_menu, opts)
|
|
|
|
vim.keymap.set('n', '<leader>n', bmui.nav_next, opts)
|
|
|
|
vim.keymap.set('n', '<leader>p', bmui.nav_prev, opts)
|
|
|
|
|
|
|
|
local keys="1234567890"
|
|
|
|
for i = 1, #keys do
|
|
|
|
local key = keys:sub(i,i)
|
|
|
|
vim.keymap.set('n', string.format('<leader>%s', key),
|
|
|
|
function () bmui.nav_file(i) end,
|
|
|
|
opts
|
|
|
|
)
|
|
|
|
end
|
|
|
|
'';
|
2024-06-03 11:05:46 +01:00
|
|
|
|
|
|
|
}
|
|
|
|
|