From cbd5b66b89fba2ad23a9da7372cf916305efad1f Mon Sep 17 00:00:00 2001 From: Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> Date: Tue, 17 Sep 2024 10:12:18 +0530 Subject: Initial commit. --- nvim/default.nix | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 nvim/default.nix (limited to 'nvim/default.nix') diff --git a/nvim/default.nix b/nvim/default.nix new file mode 100644 index 0000000..f2589ae --- /dev/null +++ b/nvim/default.nix @@ -0,0 +1,37 @@ +{ pkgs, config, ... }: + +{ + programs.neovim = + let + toLua = str: "lua << EOF\n${str}\nEOF\n"; + toLuaFile = file: "lua << EOF\n${builtins.readFile file}\nEOF\n"; + in { + enable = true; + viAlias = true; + vimAlias = true; + vimdiffAlias = true; + + extraLuaConfig = '' +${import ./colorscheme.nix config} +${builtins.readFile ./options.lua} +${builtins.readFile ./keybindings.lua} +''; + plugins = with pkgs.vimPlugins; [ + { + plugin = comment-nvim; + config = toLuaFile ./plugins/comment.lua; + } + + { + plugin = lualine-nvim; + config = toLua (import ./plugins/lualine/default.nix config); + } + + nvim-web-devicons + { + plugin = nvim-tree-lua; + config = toLuaFile ./plugins/nvim-tree.lua; + } + ]; + }; +} -- cgit v1.2.3