2024-03-06 02:24:31 +01:00
|
|
|
# This overlay, when applied to nixpkgs, adds the final neovim derivation to nixpkgs.
|
|
|
|
{inputs}: final: prev:
|
|
|
|
with final.pkgs.lib; let
|
|
|
|
pkgs = final;
|
|
|
|
|
|
|
|
# Use this to create a plugin from a flake input
|
|
|
|
mkNvimPlugin = src: pname:
|
|
|
|
pkgs.vimUtils.buildVimPlugin {
|
|
|
|
inherit pname src;
|
|
|
|
version = src.lastModifiedDate;
|
|
|
|
};
|
|
|
|
|
|
|
|
# This is the helper function that builds the Neovim derivation.
|
|
|
|
mkNeovim = pkgs.callPackage ./mkNeovim.nix {};
|
|
|
|
|
|
|
|
# A plugin can either be a package or an attrset, such as
|
|
|
|
# { plugin = <plugin>; # the package, e.g. pkgs.vimPlugins.nvim-cmp
|
|
|
|
# config = <config>; # String; a config that will be loaded with the plugin
|
|
|
|
# # Boolean; Whether to automatically load the plugin as a 'start' plugin,
|
|
|
|
# # or as an 'opt' plugin, that can be loaded with `:packadd!`
|
|
|
|
# optional = <true|false>; # Default: false
|
|
|
|
# ...
|
|
|
|
# }
|
|
|
|
all-plugins = with pkgs.vimPlugins; [
|
2024-09-26 20:34:29 +02:00
|
|
|
# Debugger/task runner
|
2024-03-06 18:55:22 +01:00
|
|
|
nvim-dap # Debuggerhttps://github.com/mfussenegger/nvim-dap
|
|
|
|
nvim-dap-ui # Debugger UI https://github.com/rcarriga/nvim-dap-ui/
|
2024-09-23 23:22:44 +02:00
|
|
|
overseer-nvim # A task runner and job management plugin for Neovim | https://github.com/stevearc/overseer.nvim
|
2024-09-26 20:34:29 +02:00
|
|
|
# ^ Debugger/task runner
|
2024-03-06 18:55:22 +01:00
|
|
|
|
|
|
|
# Themes
|
2024-11-19 04:21:02 +01:00
|
|
|
catppuccin-nvim # Soothing pastel theme for (Neo)vim
|
2024-03-06 18:55:22 +01:00
|
|
|
tokyonight-nvim # https://github.com/folke/tokyonight.nvim
|
|
|
|
|
2024-03-06 02:24:31 +01:00
|
|
|
# plugins from nixpkgs go in here.
|
|
|
|
# https://search.nixos.org/packages?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=vimPlugins
|
|
|
|
nvim-treesitter.withAllGrammars
|
|
|
|
luasnip # snippets | https://github.com/l3mon4d3/luasnip/
|
2024-03-06 18:55:22 +01:00
|
|
|
|
2024-03-06 02:24:31 +01:00
|
|
|
# nvim-cmp (autocompletion) and extensions
|
|
|
|
nvim-cmp # https://github.com/hrsh7th/nvim-cmp
|
2024-09-23 03:38:02 +02:00
|
|
|
actions-preview-nvim # LSP code actions | https://github.com/aznhe21/actions-preview.nvim
|
2024-09-20 15:46:27 +02:00
|
|
|
nvim-autopairs # Automatically create closing brackets | https://github.com/windwp/nvim-autopairs
|
2024-03-06 02:24:31 +01:00
|
|
|
cmp_luasnip # snippets autocompletion extension for nvim-cmp | https://github.com/saadparwaiz1/cmp_luasnip/
|
|
|
|
lspkind-nvim # vscode-like LSP pictograms | https://github.com/onsails/lspkind.nvim/
|
|
|
|
cmp-nvim-lsp # LSP as completion source | https://github.com/hrsh7th/cmp-nvim-lsp/
|
|
|
|
cmp-nvim-lsp-signature-help # https://github.com/hrsh7th/cmp-nvim-lsp-signature-help/
|
|
|
|
cmp-buffer # current buffer as completion source | https://github.com/hrsh7th/cmp-buffer/
|
|
|
|
cmp-path # file paths as completion source | https://github.com/hrsh7th/cmp-path/
|
|
|
|
cmp-nvim-lua # neovim lua API as completion source | https://github.com/hrsh7th/cmp-nvim-lua/
|
|
|
|
cmp-cmdline # cmp command line suggestions
|
|
|
|
cmp-cmdline-history # cmp command line history suggestions
|
2024-09-18 21:55:56 +02:00
|
|
|
# copilot-lua # Github Copilot https://github.com/zbirenbaum/copilot.lua/
|
|
|
|
# copilot-cmp # Add Copilot as a cmp source # https://github.com/zbirenbaum/copilot-cmp/
|
2024-09-19 01:24:20 +02:00
|
|
|
nvim-lspconfig
|
2024-03-06 02:24:31 +01:00
|
|
|
# ^ nvim-cmp extensions
|
2024-03-06 18:55:22 +01:00
|
|
|
|
2024-03-06 02:24:31 +01:00
|
|
|
# git integration plugins
|
|
|
|
diffview-nvim # https://github.com/sindrets/diffview.nvim/
|
|
|
|
neogit # https://github.com/TimUntersberger/neogit/
|
|
|
|
gitsigns-nvim # https://github.com/lewis6991/gitsigns.nvim/
|
|
|
|
vim-fugitive # https://github.com/tpope/vim-fugitive/
|
|
|
|
# ^ git integration plugins
|
2024-03-06 18:55:22 +01:00
|
|
|
|
2024-03-06 02:24:31 +01:00
|
|
|
# telescope and extensions
|
|
|
|
telescope-nvim # https://github.com/nvim-telescope/telescope.nvim/
|
|
|
|
telescope-fzy-native-nvim # https://github.com/nvim-telescope/telescope-fzy-native.nvim
|
|
|
|
# telescope-smart-history-nvim # https://github.com/nvim-telescope/telescope-smart-history.nvim
|
|
|
|
# ^ telescope and extensions
|
2024-03-06 18:55:22 +01:00
|
|
|
|
2024-03-06 02:24:31 +01:00
|
|
|
# UI
|
|
|
|
lualine-nvim # Status line | https://github.com/nvim-lualine/lualine.nvim/
|
2024-09-24 21:42:42 +02:00
|
|
|
bufferline-nvim # A snazzy bufferline for Neovim | https://github.com/akinsho/bufferline.nvim
|
2024-09-23 17:38:17 +02:00
|
|
|
dressing-nvim # Improve the default vim.ui interfaces | https://github.com/stevearc/dressing.nvim
|
2024-03-06 02:24:31 +01:00
|
|
|
nvim-navic # Add LSP location to lualine | https://github.com/SmiteshP/nvim-navic
|
|
|
|
statuscol-nvim # Status column | https://github.com/luukvbaal/statuscol.nvim/
|
|
|
|
nvim-treesitter-context # nvim-treesitter-context
|
2024-09-23 17:38:17 +02:00
|
|
|
indent-blankline-nvim # Indent guides for Neovim | https://github.com/lukas-reineke/indent-blankline.nvim
|
|
|
|
nvim-notify # A fancy, configurable, notification manager for NeoVim | https://github.com/rcarriga/nvim-notify
|
2024-09-23 23:22:44 +02:00
|
|
|
which-key-nvim # WhichKey helps you remember your Neovim keymaps | https://github.com/folke/which-key.nvim
|
2024-03-06 02:24:31 +01:00
|
|
|
# ^ UI
|
2024-03-06 18:55:22 +01:00
|
|
|
|
2024-03-06 02:24:31 +01:00
|
|
|
# language support
|
|
|
|
# ^ language support
|
2024-03-06 18:55:22 +01:00
|
|
|
|
2024-03-06 02:24:31 +01:00
|
|
|
# navigation/editing enhancement plugins
|
|
|
|
vim-unimpaired # predefined ] and [ navigation keymaps | https://github.com/tpope/vim-unimpaired/
|
|
|
|
eyeliner-nvim # Highlights unique characters for f/F and t/T motions | https://github.com/jinh0/eyeliner.nvim
|
|
|
|
nvim-surround # https://github.com/kylechui/nvim-surround/
|
|
|
|
nvim-treesitter-textobjects # https://github.com/nvim-treesitter/nvim-treesitter-textobjects/
|
|
|
|
nvim-ts-context-commentstring # https://github.com/joosepalviste/nvim-ts-context-commentstring/
|
2024-09-23 17:38:17 +02:00
|
|
|
comment-nvim # https://github.com/numToStr/Comment.nvim
|
|
|
|
neo-tree-nvim # https://github.com/numToStr/Comment.nvim
|
|
|
|
aerial-nvim # Plugin for a code outline window | https://github.com/stevearc/aerial.nvim
|
2024-09-26 20:34:29 +02:00
|
|
|
is-vim # incremental search improved | https://github.com/haya14busa/is.vim
|
2024-03-06 02:24:31 +01:00
|
|
|
# ^ navigation/editing enhancement plugins
|
2024-03-06 18:55:22 +01:00
|
|
|
|
2024-03-06 02:24:31 +01:00
|
|
|
# Useful utilities
|
2024-09-23 17:38:17 +02:00
|
|
|
todo-comments-nvim # Highlight, list and search todo comments in your projects | https://github.com/folke/todo-comments.nvim
|
2024-03-06 02:24:31 +01:00
|
|
|
nvim-unception # Prevent nested neovim sessions | nvim-unception
|
2024-09-23 17:38:17 +02:00
|
|
|
better-escape-nvim # Map keys without delay when typing | https://github.com/max397574/better-escape.nvim
|
2024-09-23 23:22:44 +02:00
|
|
|
toggleterm-nvim # A neovim lua plugin to help easily manage multiple terminal windows | https://github.com/akinsho/toggleterm.nvim?tab=readme-ov-file
|
2024-10-01 12:55:40 +02:00
|
|
|
trouble-nvim # A pretty diagnostics list | https://github.com/folke/trouble.nvim
|
2024-03-06 02:24:31 +01:00
|
|
|
# ^ Useful utilities
|
2024-03-06 18:55:22 +01:00
|
|
|
|
2024-03-06 02:24:31 +01:00
|
|
|
# libraries that other plugins depend on
|
|
|
|
sqlite-lua
|
|
|
|
plenary-nvim
|
|
|
|
nvim-web-devicons
|
|
|
|
vim-repeat
|
2024-09-18 02:42:21 +02:00
|
|
|
nui-nvim
|
|
|
|
nvim-web-devicons
|
2024-03-06 02:24:31 +01:00
|
|
|
# ^ libraries that other plugins depend on
|
2024-03-06 18:55:22 +01:00
|
|
|
|
2024-03-06 02:24:31 +01:00
|
|
|
# bleeding-edge plugins from flake inputs
|
2024-09-18 02:42:21 +02:00
|
|
|
(mkNvimPlugin inputs.presence-nvim "presence.nvim")
|
2024-10-01 12:55:40 +02:00
|
|
|
(mkNvimPlugin inputs.workspace-diagnostics-nvim "workspace-diagnostics.nvim")
|
2024-03-06 02:24:31 +01:00
|
|
|
# (mkNvimPlugin inputs.wf-nvim "wf.nvim") # (example) keymap hints | https://github.com/Cassin01/wf.nvim
|
|
|
|
# ^ bleeding-edge plugins from flake inputs
|
|
|
|
];
|
|
|
|
|
|
|
|
extraPackages = with pkgs; [
|
2024-03-19 01:54:01 +01:00
|
|
|
# Dependencies
|
|
|
|
ripgrep
|
|
|
|
|
2024-03-06 02:24:31 +01:00
|
|
|
# language servers, etc.
|
2024-03-06 21:36:22 +01:00
|
|
|
asm-lsp # Assembly language server
|
2024-03-19 01:54:01 +01:00
|
|
|
clang-tools # C/C++ language server
|
2024-09-25 23:57:17 +02:00
|
|
|
(callPackage ./cpptools.nix {}) # C/C++ debugger from VSCode | https://github.com/microsoft/vscode-cpptools
|
2024-03-19 01:54:01 +01:00
|
|
|
nodePackages.bash-language-server # Bash language server
|
2024-03-06 02:24:31 +01:00
|
|
|
lua-language-server
|
|
|
|
nil # nix LSP
|
|
|
|
];
|
|
|
|
in {
|
|
|
|
# This is the neovim derivation
|
|
|
|
# returned by the overlay
|
|
|
|
nvim-pkg = mkNeovim {
|
|
|
|
plugins = all-plugins;
|
|
|
|
inherit extraPackages;
|
|
|
|
};
|
|
|
|
|
|
|
|
# This can be symlinked in the devShell's shellHook
|
|
|
|
nvim-luarc-json = final.mk-luarc-json {
|
|
|
|
plugins = all-plugins;
|
|
|
|
};
|
|
|
|
|
|
|
|
# You can add as many derivations as you like.
|
|
|
|
# Use `ignoreConfigRegexes` to filter out config
|
|
|
|
# files you would not like to include.
|
|
|
|
#
|
|
|
|
# For example:
|
|
|
|
#
|
|
|
|
# nvim-pkg-no-telescope = mkNeovim {
|
|
|
|
# plugins = [];
|
|
|
|
# ignoreConfigRegexes = [
|
|
|
|
# "^plugin/telescope.lua"
|
|
|
|
# "^ftplugin/.*.lua"
|
|
|
|
# ];
|
|
|
|
# inherit extraPackages;
|
|
|
|
# };
|
|
|
|
}
|