From c5f6c430747a2ef9ecba1eb05fec7445c95d8afa Mon Sep 17 00:00:00 2001 From: shelken Date: Sat, 3 Aug 2024 21:37:09 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20dont=20import=20gcc=20on=20darwi?= =?UTF-8?q?n=20for=20rust?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- home/apps/dev/core.nix | 1 + home/apps/neovim/packages.nix | 147 ++++++++++++++++++---------------- 2 files changed, 77 insertions(+), 71 deletions(-) diff --git a/home/apps/dev/core.nix b/home/apps/dev/core.nix index c51b540..df7db53 100644 --- a/home/apps/dev/core.nix +++ b/home/apps/dev/core.nix @@ -17,6 +17,7 @@ #-- rust cargo + rustc rust-analyzer rustfmt diff --git a/home/apps/neovim/packages.nix b/home/apps/neovim/packages.nix index b1e8b98..77c0b14 100644 --- a/home/apps/neovim/packages.nix +++ b/home/apps/neovim/packages.nix @@ -1,82 +1,87 @@ {pkgs, ...}: { - home.packages = with pkgs; [ - # c - gcc # 插件需要 - # c/c++ tools with clang-tools, the unwrapped version won't - # add alias like `cc` and `c++`, so that it won't conflict with gcc - # llvmPackages.clang-unwrapped - clang-tools - gnumake - # 查询文件内容使用 - ripgrep + home.packages = with pkgs; + [ + # c + # gcc # 插件需要 + # c/c++ tools with clang-tools, the unwrapped version won't + # add alias like `cc` and `c++`, so that it won't conflict with gcc + # llvmPackages.clang-unwrapped + # clang-tools + gnumake + # 查询文件内容使用 + ripgrep - #-- python - nodePackages.pyright - (python311.withPackages ( - ps: - with ps; [ - pip - ruff-lsp - black # python formatter - ] - )) + #-- python + nodePackages.pyright + (python311.withPackages ( + ps: + with ps; [ + pip + ruff-lsp + black # python formatter + ] + )) - #-- nix - nil - # rnix-lsp # has been remove - statix # Lints and suggestions for the nix programming language - deadnix # Find and remove unused code in .nix source files - alejandra # Nix Code Formatter + #-- nix + nil + # rnix-lsp # has been remove + statix # Lints and suggestions for the nix programming language + deadnix # Find and remove unused code in .nix source files + alejandra # Nix Code Formatter - #-- go - 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 + #-- go + 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 - #-- lua - stylua - lua-language-server + #-- lua + stylua + lua-language-server - #-- rust - rust-analyzer - cargo # rust package manager - rustfmt + #-- rust + rust-analyzer + cargo # rust package manager + rustfmt - #-- misc - marksman # lsp for markdown - markdown-oxide # lsp for markdown - glow # markdown preview - taplo # TOML language server / formatter / validator - nodePackages.yaml-language-server - # sqlfluff # SQL linter - actionlint # GitHub Actions linter - buf-language-server # bufls - tree-sitter # common language parser/highlighter - nodePackages.prettier # common code formatter - lazygit + #-- misc + marksman # lsp for markdown + markdown-oxide # lsp for markdown + glow # markdown preview + taplo # TOML language server / formatter / validator + nodePackages.yaml-language-server + # sqlfluff # SQL linter + actionlint # GitHub Actions linter + buf-language-server # bufls + tree-sitter # common language parser/highlighter + nodePackages.prettier # common code formatter + lazygit - #-- Cloud - nodePackages.dockerfile-language-server-nodejs - # terraform # install via brew on macOS - terraform-ls - hadolint # Dockerfile linter - helm-ls # helm lsp + #-- Cloud + nodePackages.dockerfile-language-server-nodejs + # terraform # install via brew on macOS + terraform-ls + hadolint # Dockerfile linter + helm-ls # helm lsp - #-- frontend - #javascript/typescript --# - nodePackages.nodejs - nodePackages.typescript - nodePackages.typescript-language-server - # html/css lsp - nodePackages.vscode-langservers-extracted + #-- frontend + #javascript/typescript --# + nodePackages.nodejs + nodePackages.typescript + nodePackages.typescript-language-server + # html/css lsp + nodePackages.vscode-langservers-extracted - #-- bash - nodePackages.bash-language-server - shellcheck - shfmt - ]; + #-- bash + nodePackages.bash-language-server + shellcheck + shfmt + ] + ++ lib.optional (!stdenv.isDarwin) [ + gcc + clang-tools + ]; }