Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prompt color changing before completing #922

Open
Silverbullet069 opened this issue Apr 14, 2023 · 1 comment
Open

Prompt color changing before completing #922

Silverbullet069 opened this issue Apr 14, 2023 · 1 comment

Comments

@Silverbullet069
Copy link

After typing the first character:
1

After typing 2nd:
2

Full (without spacebar):
3

Full (with spacebar):
4

typeset ZSH_VERSION=5.8.1
typeset ZSH_PATCHLEVEL=ubuntu/5.8.1-1
typeset ZSH_HIGHLIGHT_REVISION=HEAD
typeset ZSH_HIGHLIGHT_VERSION=0.8.0-alpha2-dev

@sgoudham
Copy link

Hey, I'm also getting the same issue as described above. I'm running Ubuntu 22.04 with ZSH 5.9.0 using Nix Home Manager.

Were you able to figure out why this happens?

I've listed my configuration down below just in case there are any standard tools/plugins which we both have installed that may be causing this issue.

zsh = {
      enable = true;
      enableAutosuggestions = true;
      enableCompletion = true;
      # I don't know why the highlighting doesn't work properly
      enableSyntaxHighlighting = true;

      envExtra = ''
        export ZVM_INIT_MODE=sourcing
      '';
      initExtra = let
        functionsDir = "${config.home.homeDirectory}/${config.programs.zsh.dotDir}/functions";
      in ''
        for conf in "${functionsDir}"/**/*.zsh; do
          source "$conf"
        done

        # WezTerm
        if [[ "$TERM_PROGRAM" == "WezTerm" ]]; then
          TERM=wezterm
          source $HOME/.config/wezterm/wezterm.sh
        fi

        source <(konf-go shellwrapper zsh)
        source <(konf-go completion zsh)
        # open last konf on new shell session
        konf --silent set -
      '';

      dotDir = ".config/zsh";
      oh-my-zsh = {
        enable = true;
        plugins = [
          "colored-man-pages"
          "colorize"
          "docker"
          "docker-compose"
          "git"
          "kubectl"
        ];
      };
      plugins = let 
          themepkg = pkgs.fetchFromGitHub {
            owner = "catppuccin";
            repo = "zsh-syntax-highlighting";
            rev = "06d519c20798f0ebe275fc3a8101841faaeee8ea";
            sha256 = "sha256-Q7KmwUd9fblprL55W0Sf4g7lRcemnhjh4/v+TacJSfo=";
          };
        in [
        {
          name = "zsh-vi-mode";
          src = pkgs.zsh-vi-mode;
          file = "share/zsh-vi-mode/zsh-vi-mode.plugin.zsh";
        }
        {
          name = "zsh-nix-shell";
          src = pkgs.zsh-nix-shell;
          file = "share/zsh-nix-shell/nix-shell.plugin.zsh";
        }
        {
          name = "nix-zsh-completions";
          src = pkgs.nix-zsh-completions;
          file = "share/nix-zsh-completions/nix-zsh-completions.plugin.zsh";
        }
        {
          name = "ctp-zsh-syntax-highlighting";
          src = themepkg;
          file = themepkg + "/themes/catppuccin_mocha-zsh-syntax-highlighting.zsh";
        }
      ];

      history = {
        path = "${config.home.homeDirectory}/${config.programs.zsh.dotDir}/history";
      };
    };
  };

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants