nix-config/modules/editor.nix
Donovan Glover b95cc4184a
nix: Update editor.nix
Was trying out some neovim plugins with Nix. Pretty cool that I don't
have to worry about using *another* package manager like packer.nvim.
2023-05-09 14:08:46 -04:00

88 lines
2.1 KiB
Nix

{ config, lib, nixpkgs, home-manager, ... }: {
imports = [ home-manager.nixosModule ];
home-manager.users.user = { pkgs, ... }: {
programs.neovim = {
enable = true;
plugins = with pkgs.vimPlugins; [
{
plugin = nvim-tree-lua;
type = "lua";
config = ''
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
require("nvim-tree").setup()
'';
}
{
plugin = indent-blankline-nvim;
type = "lua";
config = ''
require("indent_blankline").setup()
'';
}
{
plugin = barbar-nvim;
type = "lua";
}
{
plugin = gitsigns-nvim;
type = "lua";
config = ''
require('gitsigns').setup()
'';
}
{
plugin = nvim-web-devicons;
type = "lua";
}
{
plugin = autoclose-nvim;
type = "lua";
config = ''require("autoclose").setup()'';
}
{
plugin = nvim-scrollbar;
type = "lua";
config = ''require("scrollbar").setup()'';
}
{
plugin = nvim-base16;
type = "lua";
config = "vim.cmd('colorscheme base16-gruvbox-dark-soft')";
}
{
plugin = lualine-nvim;
type = "lua";
config = "require('lualine').setup()";
}
];
};
editorconfig = {
enable = true;
settings = {
"*" = {
charset = "utf-8";
end_of_line = "lf";
insert_final_newline = true;
indent_size = 2;
indent_style = "space";
trim_trailing_whitespace = true;
};
"*.md" = { indent_style = "tab"; };
"Makefile" = {
indent_style = "tab";
indent_size = 4;
};
"*.html" = {
indent_style = "tab";
indent_size = 4;
};
"*.go" = {
indent_style = "tab";
indent_size = 4;
};
};
};
};
}