{"id":16805771,"url":"https://github.com/konn/vscode-generic-input-method","last_synced_at":"2025-04-11T00:50:28.345Z","repository":{"id":33915288,"uuid":"156402761","full_name":"konn/vscode-generic-input-method","owner":"konn","description":"Generic Input Method for VSCode, mainly focusing on Unicode Symbol input for Theorem Provers, and YaTeX-like image completion for LaTeX","archived":false,"fork":false,"pushed_at":"2023-07-19T13:54:55.000Z","size":1189,"stargazers_count":11,"open_issues_count":5,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T21:38:44.991Z","etag":null,"topics":["input-method","latex","math","symbols","unicode","vscode","vscode-extension"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/konn.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["konn"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2018-11-06T15:14:37.000Z","updated_at":"2023-07-31T09:01:08.000Z","dependencies_parsed_at":"2025-02-20T14:01:12.628Z","dependency_job_id":null,"html_url":"https://github.com/konn/vscode-generic-input-method","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konn%2Fvscode-generic-input-method","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konn%2Fvscode-generic-input-method/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konn%2Fvscode-generic-input-method/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konn%2Fvscode-generic-input-method/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/konn","download_url":"https://codeload.github.com/konn/vscode-generic-input-method/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248322609,"owners_count":21084336,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["input-method","latex","math","symbols","unicode","vscode","vscode-extension"],"created_at":"2024-10-13T09:49:13.967Z","updated_at":"2025-04-11T00:50:28.329Z","avatar_url":"https://github.com/konn.png","language":"TypeScript","funding_links":["https://github.com/sponsors/konn"],"categories":[],"sub_categories":[],"readme":"# Generic Input Method for VSCode\n\n[![Visual Studio Marketplace](https://img.shields.io/vscode-marketplace/v/mr-konn.generic-input-method.svg)](https://marketplace.visualstudio.com/items?itemName=mr-konn.generic-input-method)\n[![Visual Studio Marketplace](https://vsmarketplacebadge.apphb.com/installs/mr-konn.generic-input-method.svg)](https://marketplace.visualstudio.com/items?itemName=mr-konn.generic-input-method)\n\nThis extension provides a generic input method within VSCode.\nIt can be used as a [YaTeX][yatex]-like image completion for LaTeX or Unicode Math input for theorem provers such as Agda or Lean.\n\n[yatex]: http://yatex.org\n\n## Features\n\n- ~~[YaTeX][yatex]-like image-completion for LaTeX~~\n  - Since version 0.0.8, LaTeX-related functionalities are moved to [CaTeX] extension.\n- Unicode Math input for Markdown\n- Ability to configure your own custom input methods!\n- Automatic configuration update\n\n[CaTeX]: https://marketplace.visualstudio.com/items?itemName=mr-konn.catex\n\n## Demos\n\n### Unicode Math Input\n\n![GIF Anime](images/unicode-input.gif)\n\n## Configuration\n\nYou can define and/or modify input methods in `generic-input-method.input-methods`.\nThis must be an array of input method.\nEach input method is defined as follows:\n\n```javascript\n{\n  // Unique name for the input method\n  \"name\": \"Example Math Input\",\n\n  // Languages where the IM is activated.\n  \"languages\": [\"markdown\", \"latex\"],\n\n  // Characters to trigger conversion\n  \"triggers\": [\"\\\\\"],\n\n  // How to render each items?\n  // Available: \"string\" or \"snippet\"; other extension can add more.\n  // `string` just prints the content of \"body\" property.\n  // See `defaults/images.json` for examples.\n  // You can also define custom expander for render.\n  \"renderMode\": \"string\",\n\n  // Suffix for a text-editor command;\n  // you can invoke it as `extension.complete.custom.example-math`.\n  \"commandName\": \"custom.example-math\",\n\n  // An array of items or a reference to the default dictionary.\n  \"dictionary\": [\n    // Default Math dictionary shipped with this extension\n    \"defaults/math.json\",\n\n    // Push `\\||-` to input `\\Vvdash`.\n    // Shows `⊪` as a preview.\n    { \"label\": \"|||-\", \"body\": \"\\\\Vvdash\", \"description\": \"⊪\" }\n  ]\n}\n```\n\nCurrently, you can only refer to the default dictionaries shipped with the `generic-input-method` extension.\n\n## External API\n\nThis extension provides an API to un/register custom input methods.\n\n### Registering a new Input Method dynamically\n\n```typescript\nimport { extensions, ExtensionContext } from \"vscode\";\n\nfunction async activate(context: ExtensionContext) {\n  let ims = extensions.getExtension(\"mr-konn.generic-input-method\");\n  if (gim) {\n    const api: any = await gim.activate();\n    const im: any = {\n      name: \"My Great IM Dynamically Registered\",\n      languages: [\"redtt\"],\n      triggers: [\"\\\\\"],\n      dictionary: [\"defaults/math.json\", { label: \"to\", body: \"→\" }]\n    };\n    api.registerInputMethod(im);\n  }\n}\n```\n\nSee [CaTeX][catex-repo] and [`redtt-diagnostics`][redtt-diag] for an example usage.\n\n[catex-repo]: https://github.com/konn/catex\n[redtt-diag]: https://github.com/konn/vscode-redtt-diagnostics\n\n### Invoking Input Method Forcedly\n\nYou can use `api.invokeInputMethod(editor?, nameOrIM?)` to invoke an input method, regardless of the language of editor.\n\n## TODOs\n\n- Cool screenshot GIFs\n- Underlining converted input\n- Contextual completion based on scopes\n- Split LaTeX-related input methods as an external extension?\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkonn%2Fvscode-generic-input-method","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkonn%2Fvscode-generic-input-method","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkonn%2Fvscode-generic-input-method/lists"}