From 919527d6fc46a555714a6ab5c8a2bcc184a8a7d1 Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Mon, 8 Jan 2024 10:03:48 +0800 Subject: [PATCH] fix: nvim-treesitter --- flake.nix | 13 +++++++++---- home/base/desktop/editors/packages.nix | 7 ++++--- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/flake.nix b/flake.nix index 0954427b..a1a7ca83 100644 --- a/flake.nix +++ b/flake.nix @@ -52,11 +52,16 @@ } ); devShells = forEachSystem ( - system: { - default = nixpkgs.legacyPackages.${system}.mkShell { - packages = [ + system: + let pkgs = nixpkgs.legacyPackages.${system}; + in + { + default = pkgs.mkShell { + packages = with pkgs;[ # fix https://discourse.nixos.org/t/non-interactive-bash-errors-from-flake-nix-mkshell/33310 - nixpkgs.legacyPackages.${system}.bashInteractive + bashInteractive + # fix `cc` replaced by clang, which causes nvim-treesitter compilation error + gcc ]; name = "dots"; shellHook = '' diff --git a/home/base/desktop/editors/packages.nix b/home/base/desktop/editors/packages.nix index a351a6c9..d2daa37f 100644 --- a/home/base/desktop/editors/packages.nix +++ b/home/base/desktop/editors/packages.nix @@ -6,11 +6,12 @@ cmake-language-server gnumake checkmake - llvmPackages.clang-unwrapped # c/c++ tools with clang-tools such as clanvimPlugins.nvim-treesitter-parsers.vuegd - lldb # c/c++ compiler, required by nvim-treesitter! - # to avoid conflicts, you can comment clang-unwrapped first to compile all nvim-treesitter-parsers. 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 + lldb #-- python nodePackages.pyright # python language server