Rolv-Apneseth / starship.yazi

Starship prompt plugin for yazi
MIT License
36 stars 0 forks source link

Any way starship works only for yazi #5

Closed AnirudhG07 closed 3 months ago

AnirudhG07 commented 3 months ago

I have powerlevel10k installed for my usual terminal. But I just somehow like the fact of having starship in yazi.

Is there anyway I can have starship just for yazi??

Configs

MacOS, yazi(latest built from source, like today) iTerm, zsh

What I have done so far

I have added starship.toml with this preset in my ~/.config/starship.toml and also I have downloaded starship.yazi

Rolv-Apneseth commented 3 months ago

This plugin just calls starship directly, so it should work. Do you have starship on your $PATH? What is the output of starship --version?

AnirudhG07 commented 3 months ago

starship 1.19.0 branch: commit_hash: build_time:2024-05-15 17:06:13 +00:00 build_env:rustc 1.78.0 (9b00956e5 2024-04-29) (Homebrew),

Rolv-Apneseth commented 3 months ago

And nothing happens when you use starship.yazi? Strange. Just checking, does starship prompt actually output anything?

AnirudhG07 commented 3 months ago
image

Error comes when I run start yazi -

Error: Lua runtime failed

Caused by:
    No such file or directory (os error 2)
    stack traceback:
        [C]: in function 'require'
        [string "init.lua"]:4: in main chunk

This happens when I put below in my init.lua

require("starship"):setup()

You can see my starship dotfiles for anything particular

Rolv-Apneseth commented 3 months ago

So strange, I can't reproduce. Your yazi config works fine for me:

yazi

Maybe it's something Mac specific? I'm not even sure if the error means it happened within the plugin or just that it somehow couldn't find it. Would you mind replacing the code in starship.yazi/init.lua with some other plugins code just to verify that?

AnirudhG07 commented 3 months ago

I mean all other plugins just work fine. I'll maybe reinstall starship and start everything from scratch. Maybe that would work.

AnirudhG07 commented 3 months ago

Your suggestion actually freakin worked. But if I change the name to like starship_prompt.yazi, it still doesnt work.... I dont understand whats going on seriously. but it worked suddenly when I reopened my terminal. anyways it works. Thanks

Rolv-Apneseth commented 3 months ago

Oh so it's working now?

AnirudhG07 commented 3 months ago

yep.

Rolv-Apneseth commented 3 months ago

Nice, glad it's working for you then