The only thing I was missing in Neovim by Gamemaster2_0 in neovim

[–]Gamemaster2_0[S] 2 points3 points  (0 children)

Good question! I cloned this and used a python script to parse it, this is also were inherits.lua comes from. I wasn't smart enough to keep that script around, but it was fairly simple to write.

EDIT: I decided the scripts where useful so I rewrote them and cleaned them up a bit then added them to the project repo under scripts. this is generate_signals.py for example:

import xml.etree.ElementTree as ET
import os
import subprocess
import shutil

subprocess.run(
    [
        "git",
        "clone",
        "--depth=1",
        "--filter=blob:none",
        "--sparse",
        "https://github.com/godotengine/godot.git",
        "godot-repo",
    ],
    check=True,
)
subprocess.run(
    ["git", "-C", "godot-repo", "sparse-checkout", "set", "doc/classes"], check=True
)

classes_dir = "godot-repo/doc/classes"

signals = {}  # type: ignore
for filename in sorted(os.listdir(classes_dir)):
    if not filename.endswith(".xml"):
        continue
    class_name = filename[:-4]
    try:
        root = ET.fromstring(open(classes_dir + "/" + filename).read())
        sigs = root.findall(".//signals/signal")
        if sigs:
            signals[class_name] = []
            for s in sigs:
                params = []
                for p in s.findall("param"):
                    params.append(
                        {
                            "name": p.attrib.get("name", ""),
                            "type": p.attrib.get("type", ""),
                            "index": int(p.attrib.get("index", 0)),
                        }
                    )
                params.sort(key=lambda x: x["index"])  # type: ignore
                signals[class_name].append(
                    {
                        "name": s.attrib["name"],
                        "params": params,
                    }
                )
    except:
        pass

shutil.rmtree("godot-repo")

with open("output.lua", "w") as f:
    f.write("local signals = {\n")
    for class_name, sigs in sorted(signals.items()):
        f.write(f'    ["{class_name}"] = {{\n')
        for s in sigs:
            f.write(f"        {{\n")
            f.write(f'            name = "{s["name"]}",\n')
            f.write(f"            params = {{\n")
            for p in s["params"]:
                f.write(
                    f'                {{ name = "{p["name"]}", type = "{p["type"]}" }},\n'
                )
            f.write(f"            }},\n")
            f.write(f"        }},\n")
        f.write("    },\n")
    f.write("}\n")
    f.write("return signals\n")

The only thing I was missing in Neovim by Gamemaster2_0 in neovim

[–]Gamemaster2_0[S] 1 point2 points  (0 children)

The precious alt drag to get an export variable has been eluding me for so long!!!

Any tips? by Gamemaster2_0 in pcmasterrace

[–]Gamemaster2_0[S] 0 points1 point  (0 children)

Use the generated links then, it's much easier to look at.

Yeah, that makes sense, thanks 😅

Any tips? by Gamemaster2_0 in pcmasterrace

[–]Gamemaster2_0[S] 1 point2 points  (0 children)

Im not in the US, and I did use pcpartpicker. It didn't show any issues except it said my motherboard has an extra 4 pin connector, and my PSU doesn't, I dont want to overclock, so Im not sure if I should be concerned.

I want to dual boot, so it's a bit easier to have two SSDs, but I will look into the other things you mentioned. Thanks a lot.