bscan / RakuNavigator

Raku language support and language server
MIT License
50 stars 3 forks source link

How to configure the Raku paths (for execution) #9

Closed antononcube closed 2 years ago

antononcube commented 2 years ago

First -- thank you for working on this project!


After installing the extension I cannot run Raku scripts with it.

I made a few changes in the corresponding "settings.json" as suggested in the README. I still cannot run scripts.

I assume I am configuring the paths in the wrong way.

From README is not clear (exactly) where and how to place these configurations:

raku.rakuPath specifies the location of your raku install. Defaults to "raku" raku.includePaths adds locations to the path via a -I command line switch

bscan commented 2 years ago

Hi @antononcube, thanks for filing an issue. The rakuPath only applies to the executable used for syntax checking and parsing the file, while running Raku scripts is a different issue. You can either edit the settings.json directly, or use the settings editor for setting it (see image below). If you update this setting, you may need to go make a change to your script (or press ctrl+s to re-trigger a save action) to verify that syntax errors and warnings show up in a file. image

As for actually running raku scripts, this extension does not currently include that feature. Many people either create "Run and Debug" settings, use the popular "Code Runner" extension, or simply run in the embedded terminal. Personally, I have the "Code Runner" extension with the following settings:

"code-runner.executorMap": {
        "raku": "/home/bscan/.rakubrew/versions/moar-2022.04/bin/raku"
    },
antononcube commented 2 years ago

Thank you! I followed your advice in GitHub issue I filed a week ago -- it works.