This repository was archived by the owner on May 18, 2026. It is now read-only.
feat: use appropriate CompletionItemKind for Monaco snippets#514
Merged
Conversation
- Modified BaseCompleter to map item.type to monaco.languages.CompletionItemKind - Updated SnippetsCompleter to respect type field in JSON - Added appropriate type (method, variable, event, snippet, constant) to several snippet files - Fixes smalruby/smalruby3-develop#17
- Updated sound, sensing, operators, pen, music, video-sensing, text-to-speech, translate, microbit, mesh, smalrubot-s1, microbit-more, makey, gdx_for, procedure, and koshien snippets - Categorized each as method, variable, event, snippet, or constant based on their function
- Escaped newlines in snippet strings to prevent build failures - Reverted unintentional snippet content changes
- Added enum_member mapping in BaseCompleter - Updated motion-snippets.json to use function, variable, and enum_member types based on ruby-generator/motion.js logic
- Updated looks-snippets.json and sound-snippets.json to use function and variable types based on their ruby-generator return values
- Updated control-snippets.json and events-snippets.json to use event, snippet, and function types based on their ruby-generator logic
- Added value type mapping in BaseCompleter - Updated all snippet JSON files with appropriate types (function, variable, value, enum_member, event, snippet) based on ruby-generator logic
- Fixed unescaped quotes in pen-snippets.json and koshien-snippets.json - Fixed incorrectly escaped quotes and literal newlines in koshien and microbit snippets
- Configure ESLint to lint JSON files in src/containers/ruby-tab/ - Add eslint-plugin-jsonc and jsonc-eslint-parser - Fix newline issues and minor snippet syntax errors in JSON files - Update cspell.json with 'smalrubot' 🤖 Generated with [Gemini Code](https://gemini.google.com/code) Co-Authored-By: Gemini <noreply@google.com>
- Removed extra spaces from snippet placeholders (e.g., " ${1:value} " → "${1:value}")
- Restored snippets to match develop branch format
- Kept type field additions for Monaco Editor completion
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
f2382fd to
5334f96
Compare
- Restored placeholders in microbit-snippets.json (e.g., "${1:A}" instead of "A")
- Fixed escape error in operators-snippets.json string.include? snippet
- Kept type field additions for Monaco Editor completion
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
github-actions Bot
pushed a commit
that referenced
this pull request
Jan 14, 2026
…o-completion-kinds feat: use appropriate CompletionItemKind for Monaco snippets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Monaco Editorの補完候補に適切な
kindを設定するように変更しました。これにより、エディタのGUI上でメソッド、変数、イベントなどのアイコンが正しく表示されるようになります。変更内容
BaseCompleter:item.typeをmonaco.languages.CompletionItemKindにマップする機能を追加SnippetsCompleter: JSONファイルからtypeを読み取るように変更type(method, variable, event, snippet, constant) を追加:motion-snippets.jsonvariables-snippets.jsoncontrol-snippets.jsonevents-snippets.jsonlooks-snippets.jsonFixes smalruby/smalruby3-develop#17