Fork me on GitHub
#cursive
<
2023-04-04
>
imre16:04:58

IntelliJ question as I couldn't find an answer on google: On a mac, how do you make intellij itself (not a run configuration etc.) aware of command line tools installed via homebrew? On windows I'd add the homebrew path to the user-level PATH and restart IntelliJ.

imre16:04:38

The usecase is that in some gitattributes files I have tools set up for some file types for filter/diff/merge and the git plugin errors out on them sometimes as it cannot find the tool referenced (it's installed via brew)

imre19:04:54

Thank you, I don't think they are relevant. I don't have any problem with running the tool from the command line, even the IJ built in terminal. It's only the IJ gui app that is unable to find it.

staypufd23:04:30

OK, I misunderstood. Wonder if you put some symbolic links in your home directory /bin folder to them if they’d error out less?

imre12:04:53

Not sure, it would help first to know whether /bin is on the PATH that IJ uses...

👍 2
staypufd22:04:47

Does this stackoverflow question kinda match what your asking? How do you configure IntelliJ to use the Java, Scala, and SBT that were installed by Homebrew https://stackoverflow.com/questions/46026397/how-do-you-configure-intellij-to-use-the-java-scala-and-sbt-that-were-installe

staypufd22:04:00

I think maybe I understand your original question now. You want to make sure the commands installed by brew are known to IntelliJ in it’s terminal and other places. So since Mac OS is a UNIX, you can add the brew install path to your user path. Below is a line of code you can add to your .zshrc file that adds the things you have installed with brew to the users PATH.

export PATH=$PATH:/opt/homebrew/bin
Also, after you save that file, you need to
source ~/.zshrc
to get it to pick up that change. Or you can kill your terminal and open a new one. You can do a
echo $PATH
to see if it got added correctly.

staypufd22:04:03

Hope that helps

imre15:04:56

Cheers, I have all that set up and it's working grand from the built-in terminal in IJ. It isn't working for the git plugin however.

imre15:04:20

Or the built-in Shell Script plugin which asks me from time to time whether I want to install shellcheck - when I already have it installed via brew and use it from terminals without problems

hlship19:04:58

On my wishlist for Cursive is for the REPL window to support more ANSI terminal escape sequences, both more of the CSR codes (colors, bold, italic, etc.) but also some of the ones related to cursor movement (the stuff you need for even primitive Terminal UI functions). How much work is involved in supporting these features?

💯 2
🙏 2
staypufd23:04:13

Might be able to use some of code from: https://github.com/xsc/jansi-clj depending on license

onetom03:04:59

i also wished a few times to have the ability for some TUI 🙂 but it sounds like a major departure from what the current REPL output window is. i considered using some swing gui, but 1. it starts up slowly 2. not useful, when connected to a remote repl