64 lines
1.2 KiB
Nix
64 lines
1.2 KiB
Nix
{ config, pkgs, lib, ... }:
|
|
|
|
let
|
|
cfg = config.homeModules.vim;
|
|
in
|
|
|
|
lib.mkIf cfg.enable {
|
|
|
|
programs.neovim = {
|
|
enable = true;
|
|
viAlias = true;
|
|
vimAlias = true;
|
|
vimdiffAlias = true;
|
|
defaultEditor = true;
|
|
extraConfig = ''
|
|
lua << EOF
|
|
require('lspconfig').rust_analyzer.setup{}
|
|
EOF
|
|
'';
|
|
|
|
plugins = let
|
|
nvim-treesitter-with-plugins = pkgs.vimPlugins.nvim-treesitter.withPlugins (treesitter-plugins:
|
|
with treesitter-plugins; [
|
|
astro
|
|
bash
|
|
c
|
|
css
|
|
cpp
|
|
dockerfile
|
|
git_config
|
|
git_rebase
|
|
gitattributes
|
|
gitcommit
|
|
gitignore
|
|
html
|
|
http
|
|
javascript
|
|
json
|
|
latex
|
|
markdown
|
|
nix
|
|
python
|
|
rust
|
|
sql
|
|
sway
|
|
typescript
|
|
vim
|
|
zig
|
|
]);
|
|
in
|
|
with pkgs.vimPlugins; [
|
|
vim-colors-solarized
|
|
vim-nix
|
|
nvim-lspconfig
|
|
nvim-treesitter-with-plugins
|
|
rust-tools-nvim
|
|
nvim-cmp
|
|
cmp-nvim-lsp
|
|
nvim-treesitter.withAllGrammars
|
|
];
|
|
};
|
|
|
|
}
|