Installing GDScript

Question:
So I wanted to try to program in some new languages such as GDScript that I haven’t tried. Is there a way to install it using Nix or something onto a Repl that I can use as a template? What kind of Repl would I use Bash? It would be helpful to walk me through the steps of adding it, if it is possible.

https://gdscript.com/

I don’t think this is possible as GDScript was made to use with Godot. You could try searching on NixOS.

2 Likes

@QwertyQwerty88 so I found some stuff on NixOS but how would I add it in my Repl? NixOS Search, I am trying to use the gdtoolkit but I don’t know how to install it.

https://replit.com/@SalladShooter/GDScript#replit.nix

1 Like

nix-env -iA nixpgs.gdtoolkit

1 Like

I entered both of them but I get this error in the Shell

~/GDScript$
nix-env -iA nixpgs.gdtoolkit
error: attribute
'nixpgs' in selection path
'nixpgs.gdtoolkit' not found
Did you mean nixpkgs?
~/GDScript$ nix-env -iA nixpkgs. gdtoolkit
error: attribute 'gdtoolkit' in selection
pa
th 'nixpkgs.gdtoolkit' not found
~/GDScript$ 

open .replit, check for the nix package version, forgot what the var is called. make it the same version as when you checked on search.nixos.org, IDk if it’ll work

@QwertyQwerty88 I did that (I changed it to 23-11) did I do it right? Here is my .replit file for reference →

run = ["bash", "main.sh"]

entrypoint = "main.sh"

[nix]
channel = "stable-23_11"

[deployment]
run = ["bash", "main.sh"]

[languages]

[languages.bash]
pattern = "**/{*.sh,*.bash}"

[languages.bash.languageServer]
start = "bash-language-server start"
deploymentTarget = "cloudrun" 
1 Like

yes, you changed channel, does it work now?

@QwertyQwerty88 no, I think I need to make it run the main.gd instead of main.sh.

@QwertyQwerty88 so I tried changing it →

run = ["gdscript", "main.gd"]

entrypoint = "main.gd"

[nix]
channel = "stable-23_11"

[deployment]
run = ["gdscript", "main.gd"]

[languages]

[languages.bash]
pattern = "**/{*.gd,*.gdscript}"

[languages.bash.languageServer]
start = "gdscript-language-server start"
deploymentTarget = "cloudrun" 

But when I run it, it says for the channel no such file or directory found.

I’ll look into it later

1 Like

Isn’t 23_11 Beta? Replit might not yet support it. Maybe search with 23_05?

2 Likes

But that’s deprecated.

1 Like

Perhaps try unstable as the channel?

1 Like

@Firepup650 it still says →

nix error: building nix env: os. Readlink() channel: readlink /home/runner/.nix-defexpr /channels/nixpkgs-unstable-23_11: no such f ile or directory 

put "unstable" instead of "unstable-23_11"

2 Likes

@NuclearPasta0 It runs without errors, but my file doesn’t run its code, or have syntax highlighting.

Have you tried gdscript from the shell?

I have had problems configuring language server, I was unable to do it for python I think. Not sure.

1 Like

How would I do that? I tried run main.gd but it said it couldn’t find the file.

I dunno, what does run do? (I don’t know GDScript)
Does gdscript main.gd work?

1 Like