From 0c91b6a93c56c9e8c76d9752048a284287e3ea50 Mon Sep 17 00:00:00 2001 From: Vitaly Slobodin Date: Sat, 29 Aug 2026 10:05:19 +0200 Subject: [PATCH] feat(ruby): Remove code snippets Code snippets will live in a separate extension since most people do not use them. Closes https://github.com/zed-extensions/ruby/issues/202 --- extension.toml | 1 - languages/ruby/ruby.json | 160 --------------------------------------- 2 files changed, 161 deletions(-) delete mode 100644 languages/ruby/ruby.json diff --git a/extension.toml b/extension.toml index 4277c7f..db02667 100644 --- a/extension.toml +++ b/extension.toml @@ -5,7 +5,6 @@ version = "0.16.16" schema_version = 1 authors = ["Vitaly Slobodin "] repository = "https://github.com/zed-extensions/ruby" -snippets = "./languages/ruby/ruby.json" [language_servers.solargraph] name = "Solargraph" diff --git a/languages/ruby/ruby.json b/languages/ruby/ruby.json deleted file mode 100644 index 8873f2f..0000000 --- a/languages/ruby/ruby.json +++ /dev/null @@ -1,160 +0,0 @@ -{ - "New Minitest spec": { - "prefix": ["Minitest"], - "body": [ - "# frozen_string_literal: true", - "", - "require \"spec_helper\"", - "", - "class $1 < Minitest::Spec", - " describe \"$2\" do", - " it \"$3\" do", - " $0", - " assert(true)", - " end", - " end", - "end", - "" - ], - "description": "New Minitest class using the spec syntax." - }, - "New Minitest test": { - "prefix": ["Minitest"], - "body": [ - "# frozen_string_literal: true", - "", - "require \"test_helper\"", - "", - "class $1 < Minitest::Test", - " def test_$2", - " $0", - " assert(true)", - " end", - "end", - "" - ], - "description": "New Minitest class using the test syntax." - }, - "New Rspec test": { - "prefix": ["Rspec"], - "body": [ - "# frozen_string_literal: true", - "", - "describe $1 do", - " describe \"$2\" do", - " it \"$3\" do", - " $0", - " expect(true).to eq(true)", - " end", - " end", - "end", - "" - ], - "description": "New Minitest class using the spec syntax." - }, - "New class": { - "prefix": ["class"], - "body": ["class $1", " def initialize", " $0", " end", "end", ""], - "description": "New Ruby class." - }, - "New module": { - "prefix": ["module"], - "body": ["module $1", " def $2", " $0", " end", "end", ""], - "description": "New Ruby module." - }, - "Begin rescue block": { - "prefix": ["begin"], - "body": ["begin", " $0", "rescue $1", "end", ""], - "description": "New Ruby begin block with rescue." - }, - "Begin rescue ensure": { - "prefix": ["begin"], - "body": ["begin", " $0", "rescue $1", "ensure", "end", ""], - "description": "New Ruby begin block with rescue and ensure." - }, - "Each inline": { - "prefix": ["each"], - "body": ["each { |$1| $0 }"], - "description": "New Ruby inline each loop." - }, - "Each block": { - "prefix": ["each"], - "body": ["each do |$1|", " $0", "end"], - "description": "New Ruby each loop." - }, - "Map inline": { - "prefix": ["map"], - "body": ["map { |$1| $0 }"], - "description": "New Ruby inline map loop." - }, - "Map block": { - "prefix": ["map"], - "body": ["map do |$1|", " $0", "end"], - "description": "New Ruby map loop." - }, - "Flat map inline": { - "prefix": ["flat_map"], - "body": ["flat_map { |$1| $0 }"], - "description": "New Ruby inline flat_map loop." - }, - "Flat Map block": { - "prefix": ["flat_map"], - "body": ["flat_map do |$1|", " $0", "end"], - "description": "New Ruby flat_map loop." - }, - "Select inline": { - "prefix": ["select"], - "body": ["select { |$1| $0 }"], - "description": "New Ruby inline select loop." - }, - "Select block": { - "prefix": ["select"], - "body": ["select do |$1|", " $0", "end"], - "description": "New Ruby select loop." - }, - "Find inline": { - "prefix": ["find"], - "body": ["find { |$1| $0 }"], - "description": "New Ruby inline find loop." - }, - "Find block": { - "prefix": ["find"], - "body": ["find do |$1|", " $0", "end"], - "description": "New Ruby find loop." - }, - "Define method method": { - "prefix": ["def"], - "body": ["def $1", " $0", "end"], - "description": "New method." - }, - "Define singleton method": { - "prefix": ["defs"], - "body": ["def self.$1", " $0", "end"], - "description": "New singleton method." - }, - "Define attribute accessor": { - "prefix": ["attr"], - "body": ["attr_accessor :$1"], - "description": "New attribute accessor." - }, - "Define attribute reader": { - "prefix": ["attr"], - "body": ["attr_reader :$1"], - "description": "New attribute reader." - }, - "Define attribute writer": { - "prefix": ["attr"], - "body": ["attr_writer :$1"], - "description": "New attribute writer." - }, - "If else": { - "prefix": ["if"], - "body": ["if $1", " $0", "else", "end"], - "description": "New if statement with else." - }, - "If elsif": { - "prefix": ["if"], - "body": ["if $1", " $0", "elsif $2", " $0", "end"], - "description": "New if statement with elsif." - } -}