summaryrefslogtreecommitdiff
path: root/home/neovim/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'home/neovim/default.nix')
-rw-r--r--home/neovim/default.nix74
1 files changed, 74 insertions, 0 deletions
diff --git a/home/neovim/default.nix b/home/neovim/default.nix
new file mode 100644
index 0000000..c1ed000
--- /dev/null
+++ b/home/neovim/default.nix
@@ -0,0 +1,74 @@
+{
+ inputs,
+ config,
+ lib,
+ pkgs,
+ ...
+}: let
+ lua_cfg = import ./config.nix {inherit config inputs;};
+ lua = builtins.readFile ./init.lua;
+in {
+ environment.variables.EDITOR = "nvim";
+
+ home-manager.users.${config.user} = {
+ programs.neovim = {
+ enable = true;
+ viAlias = true;
+ vimAlias = true;
+
+ extraLuaConfig = ''
+ local config = ${lua_cfg}
+
+ ${lua}
+ '';
+
+ plugins = with pkgs.vimPlugins; [
+ # Dependencies
+ vim-devicons
+ nvim-web-devicons
+ plenary-nvim
+ # Colorscheme
+ base16-nvim
+ # Mode line
+ lualine-nvim
+ # Buffer line
+ bufferline-nvim
+ # File browser
+ nvim-tree-lua
+ # Undo tree
+ undotree
+ # Trouble (error menu)
+ trouble-nvim
+ # Telescope (buffers/find/grep/help)
+ telescope-nvim
+ # Snippets
+ vim-vsnip
+ vim-vsnip-integ
+ friendly-snippets
+ # Completion
+ cmp-buffer
+ cmp-nvim-lsp
+ cmp-vsnip
+ nvim-cmp
+ # Sourround delimiters
+ nvim-surround
+ # Comment functions
+ nerdcommenter
+ # Treesitter
+ nvim-treesitter.withAllGrammars
+ # Syntax hilighting
+ vim-illuminate
+ # Todo comments
+ todo-comments-nvim
+ # Lsp server
+ nvim-lspconfig
+ # Notifications
+ fidget-nvim
+ # Auto indentation
+ indent-o-matic
+ # 80 column width
+ virt-column-nvim
+ ];
+ };
+ };
+}