116 lines
2.4 KiB
Nix
116 lines
2.4 KiB
Nix
# ref: https://github.com/vimjoyer/nvim-nix-video/blob/main/home.nix
|
|
{
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}: {
|
|
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 = ''
|
|
${builtins.readFile ./init.lua}
|
|
'';
|
|
|
|
extraPackages = with pkgs; [
|
|
lua-language-server
|
|
# rnix-lsp
|
|
|
|
xclip
|
|
wl-clipboard
|
|
ripgrep
|
|
fd
|
|
lua-language-server
|
|
rust-analyzer-unwrapped
|
|
black
|
|
nodejs_22
|
|
# gh
|
|
];
|
|
|
|
plugins = with pkgs.vimPlugins; [
|
|
vim-nix
|
|
vim-airline-themes
|
|
plenary-nvim
|
|
nvim-web-devicons
|
|
# coc-nvim
|
|
{
|
|
plugin = goyo-vim;
|
|
config = toLuaFile ./plugins/goyo.lua;
|
|
}
|
|
{
|
|
plugin = tokyonight-nvim;
|
|
config = toLuaFile ./plugins/tokyonight.lua;
|
|
}
|
|
{
|
|
plugin = nerdcommenter;
|
|
config = toLuaFile ./plugins/nerdcommenter.lua;
|
|
}
|
|
{
|
|
plugin = nvim-tree-lua;
|
|
config = toLuaFile ./plugins/nvimtree.lua;
|
|
}
|
|
# {
|
|
# plugin = vim-airline;
|
|
# config = toLuaFile ./plugins/airline.lua;
|
|
# }
|
|
{
|
|
plugin = barbar-nvim;
|
|
config = toLuaFile ./plugins/barbar.lua;
|
|
}
|
|
{
|
|
# the most helpful thing is this guy: https://ejmastnak.com/tutorials/vim-latex/luasnip/
|
|
plugin = luasnip;
|
|
config = toLuaFile ./luasnip/luasnip.lua;
|
|
}
|
|
{
|
|
plugin = lualine-nvim;
|
|
config = toLuaFile ./plugins/lualine.lua;
|
|
}
|
|
{
|
|
plugin = nvim-treesitter.withPlugins (p: [
|
|
# p.tree-sitter-nix
|
|
# p.tree-sitter-vim
|
|
# p.tree-sitter-bash
|
|
# p.tree-sitter-lua
|
|
# p.tree-sitter-python
|
|
# p.tree-sitter-json
|
|
p.bash
|
|
p.comment
|
|
p.css
|
|
p.dockerfile
|
|
p.fish
|
|
p.gitattributes
|
|
p.gitignore
|
|
p.go
|
|
p.gomod
|
|
p.gowork
|
|
p.hcl
|
|
p.javascript
|
|
p.jq
|
|
p.json5
|
|
p.json
|
|
p.lua
|
|
p.make
|
|
p.markdown
|
|
p.nix
|
|
p.python
|
|
p.rust
|
|
p.toml
|
|
p.typescript
|
|
p.yaml
|
|
p.agda
|
|
]);
|
|
config = toLuaFile ./plugins/treesitter.lua;
|
|
}
|
|
];
|
|
|
|
# extraConfig = lib.fileContents ./init.vim;
|
|
};
|
|
}
|