feat: simplify flake.nix

This commit is contained in:
Ryan Yin
2023-07-26 20:07:42 +08:00
parent eebbb9f5e6
commit 204cb03922
70 changed files with 1183 additions and 1165 deletions

View File

@@ -1,5 +1,8 @@
{ pkgs, astronvim, ... }:
{
pkgs,
astronvim,
...
}:
###############################################################################
#
# AstroNvim's configuration and all its dependencies
@@ -70,7 +73,7 @@
#
# Joining a Selection of Lines With Space: `:join`
# Joining without spaces: `:join!`
#
#
# Toggle text's case: `~`
# Convert to uppercase: `U`
# Convert to lowercase: `u`
@@ -93,7 +96,7 @@
"nvim" = {
# update AstroNvim
onChange = "${pkgs.neovim}/bin/nvim --headless +quitall";
source = astronvim;
source = astronvim;
};
# my cusotom astronvim config, astronvim will load it after base config
# https://github.com/AstroNvim/AstroNvim/blob/v3.32.0/lua/astronvim/bootstrap.lua#L15-L16
@@ -117,16 +120,15 @@
viAlias = false;
vimAlias = true;
withPython3 = true;
withNodeJs = true;
extraPackages = [];
# currently we use lazy.nvim as neovim's package manager, so comment this one.
plugins = with pkgs.vimPlugins;[
plugins = with pkgs.vimPlugins; [
# search all the plugins using https://search.nixos.org/packages
luasnip
];
};
};
@@ -144,14 +146,14 @@
#-- python
nodePackages.pyright # python language server
python311Packages.black # python formatter
python311Packages.black # python formatter
python311Packages.ruff-lsp
#-- rust
rust-analyzer
cargo # rust package manager
cargo # rust package manager
rustfmt
#-- zig
zls
@@ -159,18 +161,18 @@
nil
rnix-lsp
# nixd
statix # Lints and suggestions for the nix programming language
deadnix # Find and remove unused code in .nix source files
alejandra # Nix Code Formatter
statix # Lints and suggestions for the nix programming language
deadnix # Find and remove unused code in .nix source files
alejandra # Nix Code Formatter
#-- golang
go
gomodifytags
iferr # generate error handling code for go
impl # generate function implementation for go
gotools # contains tools like: godoc, goimports, etc.
gopls # go language server
delve # go debugger
iferr # generate error handling code for go
impl # generate function implementation for go
gotools # contains tools like: godoc, goimports, etc.
gopls # go language server
delve # go debugger
#-- lua
stylua
@@ -180,7 +182,7 @@
nodePackages.bash-language-server
shellcheck
shfmt
#-- javascript/typescript --#
nodePackages.typescript
nodePackages.typescript-language-server
@@ -194,26 +196,25 @@
terraform-ls
jsonnet
jsonnet-language-server
hadolint # Dockerfile linter
hadolint # Dockerfile linter
#-- Others
taplo # TOML language server / formatter / validator
taplo # TOML language server / formatter / validator
nodePackages.yaml-language-server
sqlfluff # SQL linter
actionlint # GitHub Actions linter
buf # protoc plugin for linting and formatting
proselint # English prose linter
sqlfluff # SQL linter
actionlint # GitHub Actions linter
buf # protoc plugin for linting and formatting
proselint # English prose linter
#-- Misc
tree-sitter # common language parser/highlighter
nodePackages.prettier # common code formatter
marksman # language server for markdown
glow # markdown previewer
tree-sitter # common language parser/highlighter
nodePackages.prettier # common code formatter
marksman # language server for markdown
glow # markdown previewer
#-- Optional Requirements:
gdu # disk usage analyzer, required by AstroNvim
ripgrep # fast search tool, required by AstroNvim's '<leader>fw'(<leader> is space key)
gdu # disk usage analyzer, required by AstroNvim
ripgrep # fast search tool, required by AstroNvim's '<leader>fw'(<leader> is space key)
];
};
}