Skip to content

VS Code: add snippets for the commons builtins #6

Open

Description

@alakanani

Welcome, builder. This is a friendly starter task for Hacktoberfest. No Python needed, just care. Comment below to claim it. Questions are welcome in our Discord: https://discord.gg/894FEJhWfZ

The task

The VS Code extension already ships starter snippets in editors/vscode/snippets/godcode.json, and the Setswana tongue has its own set. The commons builtins, the everyday tools learners reach for most, have none yet.

Add snippets for the commons tools so a learner can type a few letters and get a ready-made call:

  • Words: TRIM, REPLACE, STARTS_WITH, ENDS_WITH, SUBSTRING, CONTAINS, COUNT
  • Lists: SORT, MIN_OF, MAX_OF, SUM_OF, FIRST, LAST, UNIQUE, INDEX_OF
  • Maps: KEYS, VALUES, HAS_KEY, MERGE
  • Numbers: ABS, ROUND, FLOOR, CEIL, SQRT, POW

Where to work

  • editors/vscode/snippets/godcode.json: follow the existing entries exactly for shape: a friendly description, a lowercase prefix a learner would guess, and tab stops ($1, $2) on the arguments so the cursor lands where typing should start.
  • One short line in editors/vscode/README.md if it lists the snippet set, so the count stays honest.

How to verify

  • The file must stay valid JSON: python3 -m json.tool editors/vscode/snippets/godcode.json should print it back without complaint.
  • If you have VS Code, load the extension from editors/vscode and try two or three of your prefixes in a .god file.

Done looks like

Every commons tool above has a snippet that expands to a correct call with sensible placeholders, the JSON validates, and the style matches its neighbours.

Please read CONTRIBUTING.md and our Code of Conduct before you start. You are welcome here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions