summaryrefslogtreecommitdiff
path: root/nix/programs/neovim/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix/programs/neovim/default.nix')
-rw-r--r--nix/programs/neovim/default.nix84
1 files changed, 84 insertions, 0 deletions
diff --git a/nix/programs/neovim/default.nix b/nix/programs/neovim/default.nix
new file mode 100644
index 0000000..ffb4388
--- /dev/null
+++ b/nix/programs/neovim/default.nix
@@ -0,0 +1,84 @@
+{ config, lib, pkgs, ... }:
+
+let
+
+ colorschemeLua = ''
+ -- [[ COLORSCHEME ]] --
+
+ local colorscheme = require('base16-colorscheme')
+ colorscheme.setup({
+ base00 = '#${config.theme.colors.base00}',
+ base01 = '#${config.theme.colors.base01}',
+ base02 = '#${config.theme.colors.base02}',
+ base03 = '#${config.theme.colors.base03}',
+ base04 = '#${config.theme.colors.base04}',
+ base05 = '#${config.theme.colors.base05}',
+ base06 = '#${config.theme.colors.base06}',
+ base07 = '#${config.theme.colors.base07}',
+ base08 = '#${config.theme.colors.base08}',
+ base09 = '#${config.theme.colors.base09}',
+ base0A = '#${config.theme.colors.base0A}',
+ base0B = '#${config.theme.colors.base0B}',
+ base0C = '#${config.theme.colors.base0C}',
+ base0D = '#${config.theme.colors.base0D}',
+ base0E = '#${config.theme.colors.base0E}',
+ base0F = '#${config.theme.colors.base0F}',
+ })
+
+'';
+
+ initLua = lib.fileContents ./init.lua;
+ luaConfig = colorschemeLua + initLua;
+
+in
+{
+ environment.variables.EDITOR = "nvim";
+
+ home-manager.users.${config.user} = {
+ programs.neovim = {
+
+ enable = true;
+ viAlias = true;
+ vimAlias = true;
+ extraLuaConfig = luaConfig;
+
+ plugins = with pkgs.vimPlugins; [
+ # Deoendencies
+ vim-devicons
+ nvim-web-devicons
+ # Lua functions
+ plenary-nvim
+ # Lines
+ lualine-nvim # mode line
+ bufferline-nvim # buffer line
+ # Menus
+ nvim-tree-lua # file browser
+ undotree # undo menu
+ trouble-nvim # error menu
+ telescope-nvim # grep/find menus
+ # Snippets
+ vim-vsnip
+ vim-vsnip-integ
+ friendly-snippets
+ # Completion
+ nvim-cmp
+ cmp-buffer
+ cmp-nvim-lsp
+ cmp-vsnip
+ nvim-surround # delimiter
+ # Lsp
+ base16-nvim # colorscheme
+ nerdcommenter # comment functions
+ nvim-treesitter.withAllGrammars # hilighting
+ vim-illuminate # hilighting
+ todo-comments-nvim # todo comments
+ nvim-lspconfig # lsp server
+ fidget-nvim # notifications
+ indent-o-matic # auto indentation
+ hologram-nvim # images
+ virt-column-nvim # 80 col line
+ ];
+
+ };
+ };
+}