@enjoys/context-engine 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/data/commands/adb.json +322 -0
  2. package/data/commands/alembic.json +301 -0
  3. package/data/commands/artisan.json +277 -0
  4. package/data/commands/atlas.json +426 -0
  5. package/data/commands/auth0.json +648 -0
  6. package/data/commands/bat.json +84 -0
  7. package/data/commands/bundle.json +321 -0
  8. package/data/commands/composer.json +507 -0
  9. package/data/commands/dart.json +216 -0
  10. package/data/commands/dbmate.json +257 -0
  11. package/data/commands/docker-compose.json +384 -0
  12. package/data/commands/drizzle-kit.json +217 -0
  13. package/data/commands/expo.json +65 -0
  14. package/data/commands/fastlane.json +243 -0
  15. package/data/commands/fd.json +86 -0
  16. package/data/commands/flutter.json +298 -0
  17. package/data/commands/flyway.json +261 -0
  18. package/data/commands/fzf.json +103 -0
  19. package/data/commands/gem.json +267 -0
  20. package/data/commands/jq.json +100 -0
  21. package/data/commands/k9s.json +62 -0
  22. package/data/commands/liquibase.json +399 -0
  23. package/data/commands/manifest.json +619 -0
  24. package/data/commands/minikube.json +60 -0
  25. package/data/commands/ng.json +64 -0
  26. package/data/commands/nuxt.json +60 -0
  27. package/data/commands/php.json +157 -0
  28. package/data/commands/pm2.json +259 -0
  29. package/data/commands/pod.json +175 -0
  30. package/data/commands/prisma.json +257 -0
  31. package/data/commands/rails.json +372 -0
  32. package/data/commands/rake.json +360 -0
  33. package/data/commands/react-native.json +57 -0
  34. package/data/commands/rg.json +103 -0
  35. package/data/commands/rspec.json +257 -0
  36. package/data/commands/ruby.json +108 -0
  37. package/data/commands/sequelize.json +342 -0
  38. package/data/commands/snyk.json +442 -0
  39. package/data/commands/sonar-scanner.json +219 -0
  40. package/data/commands/stripe.json +314 -0
  41. package/data/commands/symfony.json +449 -0
  42. package/data/commands/tmux.json +197 -0
  43. package/data/commands/trivy.json +367 -0
  44. package/data/commands/twilio.json +382 -0
  45. package/data/commands/typeorm.json +262 -0
  46. package/data/commands/vue.json +60 -0
  47. package/data/commands/wp.json +857 -0
  48. package/data/commands/xcodebuild.json +141 -0
  49. package/data/commands/yq.json +57 -0
  50. package/data/completion/bash.json +1184 -0
  51. package/data/completion/c.json +1067 -0
  52. package/data/completion/cpp.json +824 -0
  53. package/data/completion/csharp.json +860 -0
  54. package/data/completion/dockerfile.json +536 -0
  55. package/data/completion/go.json +1346 -0
  56. package/data/completion/html.json +806 -0
  57. package/data/completion/java.json +1112 -0
  58. package/data/completion/javascript.json +914 -0
  59. package/data/completion/lua.json +968 -0
  60. package/data/completion/php.json +1535 -0
  61. package/data/completion/python.json +1427 -0
  62. package/data/completion/ruby.json +1531 -0
  63. package/data/completion/rust.json +698 -0
  64. package/data/completion/sql.json +887 -0
  65. package/data/completion/toml.json +428 -0
  66. package/data/completion/typescript.json +338 -0
  67. package/data/completion/yaml.json +563 -0
  68. package/data/defination/bash.json +565 -0
  69. package/data/defination/c.json +865 -0
  70. package/data/defination/cpp.json +348 -0
  71. package/data/defination/csharp.json +144 -0
  72. package/data/defination/dockerfile.json +113 -0
  73. package/data/defination/go.json +561 -0
  74. package/data/defination/html.json +559 -0
  75. package/data/defination/java.json +184 -0
  76. package/data/defination/javascript.json +265 -0
  77. package/data/defination/lua.json +181 -0
  78. package/data/defination/php.json +726 -0
  79. package/data/defination/python.json +717 -0
  80. package/data/defination/ruby.json +670 -0
  81. package/data/defination/rust.json +207 -0
  82. package/data/defination/sql.json +473 -0
  83. package/data/defination/toml.json +251 -0
  84. package/data/defination/typescript.json +29 -0
  85. package/data/defination/yaml.json +197 -0
  86. package/data/hover/bash.json +245 -0
  87. package/data/hover/c.json +265 -0
  88. package/data/hover/cpp.json +210 -0
  89. package/data/hover/csharp.json +290 -0
  90. package/data/hover/dockerfile.json +145 -0
  91. package/data/hover/go.json +580 -0
  92. package/data/hover/html.json +250 -0
  93. package/data/hover/java.json +395 -0
  94. package/data/hover/javascript.json +330 -0
  95. package/data/hover/lua.json +265 -0
  96. package/data/hover/php.json +300 -0
  97. package/data/hover/python.json +380 -0
  98. package/data/hover/ruby.json +265 -0
  99. package/data/hover/rust.json +275 -0
  100. package/data/hover/sql.json +230 -0
  101. package/data/hover/toml.json +145 -0
  102. package/data/hover/typescript.json +120 -0
  103. package/data/hover/yaml.json +165 -0
  104. package/data/manifest.json +242 -0
  105. package/package.json +1 -1
@@ -0,0 +1,380 @@
1
+ {
2
+ "language": "python",
3
+ "hovers": {
4
+ "print": {
5
+ "contents": [
6
+ { "value": "```python\nprint(*objects, sep=' ', end='\\n', file=sys.stdout, flush=False) -> None\n```\nPrint objects to the text stream *file*, separated by *sep* and followed by *end*. Both *sep* and *end* must be strings." }
7
+ ]
8
+ },
9
+ "len": {
10
+ "contents": [
11
+ { "value": "```python\nlen(s: Sized) -> int\n```\nReturn the number of items in a container. The argument may be a sequence (string, bytes, tuple, list, range) or a collection (dict, set, frozenset)." }
12
+ ]
13
+ },
14
+ "range": {
15
+ "contents": [
16
+ { "value": "```python\nclass range(stop)\nclass range(start, stop, step=1)\n```\nAn immutable sequence of numbers. Commonly used for looping a specific number of times in `for` loops. Supports membership testing, indexing, slicing, and negative indices." }
17
+ ]
18
+ },
19
+ "enumerate": {
20
+ "contents": [
21
+ { "value": "```python\nenumerate(iterable, start=0) -> Iterator[tuple[int, T]]\n```\nReturn an enumerate object. Yields pairs containing a count (from *start*, default 0) and the values from the iterable." }
22
+ ]
23
+ },
24
+ "zip": {
25
+ "contents": [
26
+ { "value": "```python\nzip(*iterables, strict=False) -> Iterator[tuple[...]]\n```\nIterate over several iterables in parallel, producing tuples with an item from each one. With `strict=True` (3.10+), raises `ValueError` if iterables have different lengths." }
27
+ ]
28
+ },
29
+ "map": {
30
+ "contents": [
31
+ { "value": "```python\nmap(function, iterable, *iterables) -> Iterator\n```\nReturn an iterator that applies *function* to every item of *iterable*, yielding the results. With multiple iterables, the function must accept that many arguments." }
32
+ ]
33
+ },
34
+ "filter": {
35
+ "contents": [
36
+ { "value": "```python\nfilter(function: Callable[[T], bool] | None, iterable: Iterable[T]) -> Iterator[T]\n```\nReturn an iterator yielding those items of *iterable* for which `function(item)` is true. If function is `None`, return items that are true." }
37
+ ]
38
+ },
39
+ "sorted": {
40
+ "contents": [
41
+ { "value": "```python\nsorted(iterable, /, *, key=None, reverse=False) -> list\n```\nReturn a new sorted list from the items in *iterable*. *key* specifies a function of one argument used to extract a comparison key. The sort is stable." }
42
+ ]
43
+ },
44
+ "reversed": {
45
+ "contents": [
46
+ { "value": "```python\nreversed(sequence) -> Iterator\n```\nReturn a reverse iterator over the values of the given sequence. The sequence must have a `__reversed__()` method or support `__len__()` and `__getitem__()`." }
47
+ ]
48
+ },
49
+ "any": {
50
+ "contents": [
51
+ { "value": "```python\nany(iterable) -> bool\n```\nReturn `True` if any element of the *iterable* is true. If the iterable is empty, return `False`. Short-circuits on the first true value." }
52
+ ]
53
+ },
54
+ "all": {
55
+ "contents": [
56
+ { "value": "```python\nall(iterable) -> bool\n```\nReturn `True` if all elements of the *iterable* are true (or if the iterable is empty). Short-circuits on the first false value." }
57
+ ]
58
+ },
59
+ "isinstance": {
60
+ "contents": [
61
+ { "value": "```python\nisinstance(object, classinfo) -> bool\n```\nReturn `True` if *object* is an instance of *classinfo*. *classinfo* may be a type, a tuple of types, or (3.10+) a `Union` type." }
62
+ ]
63
+ },
64
+ "issubclass": {
65
+ "contents": [
66
+ { "value": "```python\nissubclass(class, classinfo) -> bool\n```\nReturn `True` if *class* is a subclass (direct, indirect, or virtual) of *classinfo*. A class is considered a subclass of itself." }
67
+ ]
68
+ },
69
+ "type": {
70
+ "contents": [
71
+ { "value": "```python\ntype(object) -> type\ntype(name: str, bases: tuple, dict: dict) -> type\n```\nWith one argument, return the type of *object*. With three arguments, create a new type object — this is essentially a dynamic form of the `class` statement." }
72
+ ]
73
+ },
74
+ "id": {
75
+ "contents": [
76
+ { "value": "```python\nid(object) -> int\n```\nReturn the identity of an object. This is an integer guaranteed to be unique and constant for this object during its lifetime (CPython: memory address)." }
77
+ ]
78
+ },
79
+ "hash": {
80
+ "contents": [
81
+ { "value": "```python\nhash(object) -> int\n```\nReturn the hash value of the object (if it has one). Hash values are integers used to quickly compare dictionary keys during lookup." }
82
+ ]
83
+ },
84
+ "dir": {
85
+ "contents": [
86
+ { "value": "```python\ndir(object=...) -> list[str]\n```\nWithout arguments, return the list of names in the current local scope. With an argument, return a list of valid attributes for that object." }
87
+ ]
88
+ },
89
+ "vars": {
90
+ "contents": [
91
+ { "value": "```python\nvars(object=...) -> dict[str, Any]\n```\nReturn the `__dict__` attribute of the given object. Without arguments, acts like `locals()`." }
92
+ ]
93
+ },
94
+ "getattr": {
95
+ "contents": [
96
+ { "value": "```python\ngetattr(object, name: str, default=...) -> Any\n```\nReturn the value of the named attribute of *object*. If *default* is provided, it is returned when the attribute doesn't exist; otherwise `AttributeError` is raised." }
97
+ ]
98
+ },
99
+ "setattr": {
100
+ "contents": [
101
+ { "value": "```python\nsetattr(object, name: str, value) -> None\n```\nSet the named attribute on the given object to the specified value. Equivalent to `object.name = value`." }
102
+ ]
103
+ },
104
+ "hasattr": {
105
+ "contents": [
106
+ { "value": "```python\nhasattr(object, name: str) -> bool\n```\nReturn `True` if the string *name* is the name of one of the object's attributes. Implemented by calling `getattr(object, name)` and checking for `AttributeError`." }
107
+ ]
108
+ },
109
+ "delattr": {
110
+ "contents": [
111
+ { "value": "```python\ndelattr(object, name: str) -> None\n```\nDelete the named attribute from the given object. Equivalent to `del object.name`." }
112
+ ]
113
+ },
114
+ "super": {
115
+ "contents": [
116
+ { "value": "```python\nsuper() -> super\nsuper(type, object_or_type=...) -> super\n```\nReturn a proxy object that delegates method calls to a parent or sibling class of *type*. Zero-argument form works inside a class body." }
117
+ ]
118
+ },
119
+ "abs": {
120
+ "contents": [
121
+ { "value": "```python\nabs(x) -> int | float | complex\n```\nReturn the absolute value of a number. The argument may be an integer, a floating-point number, or an object implementing `__abs__()`." }
122
+ ]
123
+ },
124
+ "min": {
125
+ "contents": [
126
+ { "value": "```python\nmin(iterable, *, key=None, default=...)\nmin(arg1, arg2, *args, key=None)\n```\nReturn the smallest item in an iterable or the smallest of two or more arguments. If *key* is provided, it specifies a one-argument ordering function." }
127
+ ]
128
+ },
129
+ "max": {
130
+ "contents": [
131
+ { "value": "```python\nmax(iterable, *, key=None, default=...)\nmax(arg1, arg2, *args, key=None)\n```\nReturn the largest item in an iterable or the largest of two or more arguments. If *key* is provided, it specifies a one-argument ordering function." }
132
+ ]
133
+ },
134
+ "sum": {
135
+ "contents": [
136
+ { "value": "```python\nsum(iterable, /, start=0) -> number\n```\nSums *start* and the items of an *iterable* from left to right and returns the total. The iterable's items are normally numbers; the start value is not allowed to be a string." }
137
+ ]
138
+ },
139
+ "round": {
140
+ "contents": [
141
+ { "value": "```python\nround(number, ndigits=None) -> int | float\n```\nRound a number to a given precision in decimal digits. If *ndigits* is omitted or `None`, returns the nearest integer. Uses banker's rounding (round-half-to-even)." }
142
+ ]
143
+ },
144
+ "pow": {
145
+ "contents": [
146
+ { "value": "```python\npow(base, exp, mod=None)\n```\nReturn `base ** exp`; if *mod* is present, return `base ** exp % mod` (computed more efficiently than `pow(base, exp) % mod`)." }
147
+ ]
148
+ },
149
+ "divmod": {
150
+ "contents": [
151
+ { "value": "```python\ndivmod(a, b) -> tuple[int, int]\n```\nReturn the pair `(a // b, a % b)`. For floating-point numbers, the result is `(q, a % b)` where `q` is usually `math.floor(a / b)`." }
152
+ ]
153
+ },
154
+ "open": {
155
+ "contents": [
156
+ { "value": "```python\nopen(\n file,\n mode='r',\n buffering=-1,\n encoding=None,\n errors=None,\n newline=None,\n closefd=True,\n opener=None\n) -> IO\n```\nOpen *file* and return a corresponding file object. *mode* is an optional string specifying the mode: `'r'` (read), `'w'` (write), `'a'` (append), `'x'` (exclusive create), `'b'` (binary), `'t'` (text), `'+'` (update)." }
157
+ ]
158
+ },
159
+ "input": {
160
+ "contents": [
161
+ { "value": "```python\ninput(prompt='') -> str\n```\nRead a line from input (via `sys.stdin`), convert it to a string (stripping a trailing newline), and return that. The *prompt* string is written to standard output without a trailing newline." }
162
+ ]
163
+ },
164
+ "iter": {
165
+ "contents": [
166
+ { "value": "```python\niter(object) -> Iterator\niter(callable, sentinel) -> Iterator\n```\nReturn an iterator object. The first form expects an iterable. The second form calls *callable* with no arguments until it returns *sentinel*." }
167
+ ]
168
+ },
169
+ "next": {
170
+ "contents": [
171
+ { "value": "```python\nnext(iterator, default=...) -> T\n```\nRetrieve the next item from the *iterator* by calling its `__next__()` method. If *default* is given, it is returned if the iterator is exhausted; otherwise, `StopIteration` is raised." }
172
+ ]
173
+ },
174
+ "callable": {
175
+ "contents": [
176
+ { "value": "```python\ncallable(object) -> bool\n```\nReturn `True` if the object argument appears callable, `False` if not. Classes are callable (calling a class returns a new instance); instances are callable if their class has a `__call__()` method." }
177
+ ]
178
+ },
179
+ "eval": {
180
+ "contents": [
181
+ { "value": "```python\neval(expression: str, globals=None, locals=None) -> Any\n```\nEvaluate a Python expression string (a single expression, not statements) and return the result.\n\n⚠️ **Security warning:** Never use `eval` with untrusted input." }
182
+ ]
183
+ },
184
+ "exec": {
185
+ "contents": [
186
+ { "value": "```python\nexec(code: str | code, globals=None, locals=None) -> None\n```\nDynamically execute Python code. *code* can be a string or a code object. Unlike `eval`, `exec` supports statements.\n\n⚠️ **Security warning:** Never use `exec` with untrusted input." }
187
+ ]
188
+ },
189
+ "compile": {
190
+ "contents": [
191
+ { "value": "```python\ncompile(source, filename, mode, flags=0, dont_inherit=False, optimize=-1) -> code\n```\nCompile the *source* into a code or AST object. *mode* is `'exec'` (module), `'eval'` (single expression), or `'single'` (interactive statement)." }
192
+ ]
193
+ },
194
+ "breakpoint": {
195
+ "contents": [
196
+ { "value": "```python\nbreakpoint(*args, **kws) -> None\n```\nCall `sys.breakpointhook()`, passing *args* and *kws* through. By default this drops you into `pdb`. Set `PYTHONBREAKPOINT=0` to disable, or set it to another debugger's entry point." }
197
+ ]
198
+ },
199
+ "repr": {
200
+ "contents": [
201
+ { "value": "```python\nrepr(object) -> str\n```\nReturn a string containing a printable representation of an object. For many types this attempts to return a string that would yield an object with the same value when passed to `eval()`." }
202
+ ]
203
+ },
204
+ "format": {
205
+ "contents": [
206
+ { "value": "```python\nformat(value, format_spec='') -> str\n```\nConvert a *value* to a formatted representation, as controlled by *format_spec*. Delegates to `value.__format__(format_spec)`." }
207
+ ]
208
+ },
209
+ "hex": {
210
+ "contents": [
211
+ { "value": "```python\nhex(x: int) -> str\n```\nConvert an integer number to a lowercase hexadecimal string prefixed with `'0x'`." }
212
+ ]
213
+ },
214
+ "oct": {
215
+ "contents": [
216
+ { "value": "```python\noct(x: int) -> str\n```\nConvert an integer number to an octal string prefixed with `'0o'`." }
217
+ ]
218
+ },
219
+ "bin": {
220
+ "contents": [
221
+ { "value": "```python\nbin(x: int) -> str\n```\nConvert an integer number to a binary string prefixed with `'0b'`." }
222
+ ]
223
+ },
224
+ "ord": {
225
+ "contents": [
226
+ { "value": "```python\nord(c: str) -> int\n```\nReturn the Unicode code point for a one-character string." }
227
+ ]
228
+ },
229
+ "chr": {
230
+ "contents": [
231
+ { "value": "```python\nchr(i: int) -> str\n```\nReturn the string representing a character whose Unicode code point is the integer *i*. `chr(97)` returns `'a'`." }
232
+ ]
233
+ },
234
+ "str": {
235
+ "contents": [
236
+ { "value": "```python\nclass str(object='')\nclass str(object=b'', encoding='utf-8', errors='strict')\n```\nThe `str` type is the standard text sequence type in Python. Strings are immutable sequences of Unicode code points. Support indexing, slicing, `+` concatenation, `*` repetition, `in` membership, and numerous methods like `.split()`, `.join()`, `.replace()`, `.strip()`, `.format()`, `.encode()`." }
237
+ ]
238
+ },
239
+ "list": {
240
+ "contents": [
241
+ { "value": "```python\nclass list(iterable=())\n```\nMutable sequence type. Lists may be constructed with `[]`, `list()`, or list comprehensions `[x for x in it]`. Support indexing, slicing, `+`, `*`, `in`, and methods like `.append()`, `.extend()`, `.pop()`, `.insert()`, `.remove()`, `.sort()`, `.reverse()`, `.copy()`." }
242
+ ]
243
+ },
244
+ "dict": {
245
+ "contents": [
246
+ { "value": "```python\nclass dict(**kwargs)\nclass dict(mapping, **kwargs)\nclass dict(iterable, **kwargs)\n```\nMutable mapping type. Dicts may be constructed with `{}`, `dict()`, or dict comprehensions `{k: v for k, v in it}`. Key methods: `.get()`, `.items()`, `.keys()`, `.values()`, `.update()`, `.pop()`, `.setdefault()`, `|` merge (3.9+)." }
247
+ ]
248
+ },
249
+ "set": {
250
+ "contents": [
251
+ { "value": "```python\nclass set(iterable=())\n```\nMutable unordered collection of unique hashable elements. Support set operations: `|` (union), `&` (intersection), `-` (difference), `^` (symmetric difference). Methods include `.add()`, `.discard()`, `.remove()`, `.update()`, `.intersection()`, `.union()`, `.difference()`." }
252
+ ]
253
+ },
254
+ "tuple": {
255
+ "contents": [
256
+ { "value": "```python\nclass tuple(iterable=())\n```\nImmutable sequence type. Tuples may be constructed with `()`, `tuple()`, or a trailing comma `a,`. Support indexing, slicing, `+`, `*`, `in`, packing/unpacking, and named tuples via `collections.namedtuple`." }
257
+ ]
258
+ },
259
+ "int": {
260
+ "contents": [
261
+ { "value": "```python\nclass int(x=0)\nclass int(x: str, base=10)\n```\nImmutable arbitrary-precision integer type. Supports standard arithmetic operations and bit operations (`&`, `|`, `^`, `~`, `<<`, `>>`). Methods: `.bit_length()`, `.bit_count()`, `.to_bytes()`, `.from_bytes()`." }
262
+ ]
263
+ },
264
+ "float": {
265
+ "contents": [
266
+ { "value": "```python\nclass float(x=0.0)\n```\nImmutable floating-point number (IEEE 754 double precision). Special values: `float('inf')`, `float('-inf')`, `float('nan')`. Methods: `.is_integer()`, `.hex()`, `.fromhex()`, `.as_integer_ratio()`." }
267
+ ]
268
+ },
269
+ "bool": {
270
+ "contents": [
271
+ { "value": "```python\nclass bool(x=False)\n```\nSubclass of `int`. Has exactly two instances: `True` (== 1) and `False` (== 0). Falsy values include `None`, `0`, `''`, `[]`, `{}`, `set()`, `b''`." }
272
+ ]
273
+ },
274
+ "bytes": {
275
+ "contents": [
276
+ { "value": "```python\nclass bytes(source=b'')\nclass bytes(source: str, encoding: str)\nclass bytes(length: int)\n```\nImmutable sequence of bytes (integers 0–255). Supports many `str`-like methods: `.split()`, `.join()`, `.replace()`, `.startswith()`, `.decode()`, `.hex()`, `.fromhex()`." }
277
+ ]
278
+ },
279
+ "frozenset": {
280
+ "contents": [
281
+ { "value": "```python\nclass frozenset(iterable=())\n```\nImmutable version of `set`. Being immutable and hashable, frozensets can be used as dictionary keys or elements of other sets." }
282
+ ]
283
+ },
284
+ "os": {
285
+ "contents": [
286
+ { "value": "```python\nimport os\n```\nMiscellaneous operating system interfaces. Provides functions for interacting with the file system, process management, and environment variables. Key members: `os.path`, `os.environ`, `os.listdir()`, `os.makedirs()`, `os.getcwd()`, `os.getenv()`, `os.walk()`." }
287
+ ]
288
+ },
289
+ "sys": {
290
+ "contents": [
291
+ { "value": "```python\nimport sys\n```\nSystem-specific parameters and functions. Provides access to interpreter variables: `sys.argv`, `sys.path`, `sys.stdin`, `sys.stdout`, `sys.stderr`, `sys.version_info`, `sys.exit()`, `sys.modules`, `sys.platform`." }
292
+ ]
293
+ },
294
+ "json": {
295
+ "contents": [
296
+ { "value": "```python\nimport json\n```\nJSON encoder and decoder. Key functions: `json.dumps(obj)` — serialize to string, `json.loads(s)` — deserialize from string, `json.dump(obj, fp)` — serialize to file, `json.load(fp)` — deserialize from file." }
297
+ ]
298
+ },
299
+ "pathlib": {
300
+ "contents": [
301
+ { "value": "```python\nfrom pathlib import Path\n```\nObject-oriented filesystem paths. `Path` represents filesystem paths with methods for common operations: `.read_text()`, `.write_text()`, `.exists()`, `.mkdir()`, `.glob()`, `.iterdir()`, `.resolve()`, `.parent`, `.name`, `.suffix`, `.stem`. Use `/` operator for joining paths." }
302
+ ]
303
+ },
304
+ "asyncio": {
305
+ "contents": [
306
+ { "value": "```python\nimport asyncio\n```\nAsynchronous I/O framework. Core concepts: coroutines (`async def`), tasks, event loops. Key functions: `asyncio.run()`, `asyncio.create_task()`, `asyncio.gather()`, `asyncio.sleep()`, `asyncio.wait()`, `asyncio.TaskGroup` (3.11+). Use `await` to suspend until a coroutine completes." }
307
+ ]
308
+ },
309
+ "re": {
310
+ "contents": [
311
+ { "value": "```python\nimport re\n```\nRegular expression operations. Key functions: `re.search()` — scan for a match, `re.match()` — match at the beginning, `re.findall()` — find all matches, `re.sub()` — replace matches, `re.compile()` — compile a pattern for reuse, `re.split()` — split by pattern." }
312
+ ]
313
+ },
314
+ "typing": {
315
+ "contents": [
316
+ { "value": "```python\nimport typing\n```\nSupport for type hints. Provides special forms: `Optional`, `Union`, `Any`, `TypeVar`, `Generic`, `Protocol`, `Literal`, `Final`, `TypeGuard`, `Self`, `Never`, `TypeAlias`. In Python 3.9+ most generic types can use built-in syntax (`list[int]` instead of `List[int]`). In 3.10+ use `X | Y` instead of `Union[X, Y]`." }
317
+ ]
318
+ },
319
+ "async": {
320
+ "contents": [
321
+ { "value": "```python\nasync def coroutine():\n result = await some_awaitable()\n```\nThe `async` keyword declares an asynchronous coroutine function. Use `await` inside to pause execution until the awaitable completes. Combine with `async for` (async iteration) and `async with` (async context managers)." }
322
+ ]
323
+ },
324
+ "await": {
325
+ "contents": [
326
+ { "value": "```python\nresult = await coroutine()\n```\nSuspend execution of the coroutine until the awaitable object completes and return its result. Can only be used inside `async def` functions." }
327
+ ]
328
+ },
329
+ "yield": {
330
+ "contents": [
331
+ { "value": "```python\nyield value\nyield from iterable\n```\n`yield` pauses a generator function and sends a value to the caller. `yield from` delegates to a sub-generator, forwarding sent values and exceptions. A function containing `yield` becomes a generator function." }
332
+ ]
333
+ },
334
+ "with": {
335
+ "contents": [
336
+ { "value": "```python\nwith expression as variable:\n ...\n```\nThe `with` statement simplifies resource management using context managers. `__enter__()` is called on entry (its return value is bound to `as variable`) and `__exit__()` is called on exit, even if an exception occurs." }
337
+ ]
338
+ },
339
+ "match": {
340
+ "contents": [
341
+ { "value": "```python\nmatch subject:\n case pattern:\n ...\n```\nStructural pattern matching (Python 3.10+). Matches *subject* against one or more `case` patterns in order. Supports literal patterns, capture patterns, sequence patterns, mapping patterns, class patterns, OR patterns (`|`), and wildcard `_`." }
342
+ ]
343
+ },
344
+ "case": {
345
+ "contents": [
346
+ { "value": "```python\ncase pattern [if guard]:\n ...\n```\nA `case` clause in a `match` statement. The pattern can be a literal, name, sequence, mapping, class pattern, or `_` wildcard. An optional `if guard` adds an extra condition." }
347
+ ]
348
+ },
349
+ "property": {
350
+ "contents": [
351
+ { "value": "```python\n@property\ndef name(self) -> type:\n return self._name\n```\nThe `@property` decorator turns a method into a read-only attribute. Use `@name.setter` and `@name.deleter` to define the setter and deleter." }
352
+ ]
353
+ },
354
+ "staticmethod": {
355
+ "contents": [
356
+ { "value": "```python\n@staticmethod\ndef method(args) -> type:\n ...\n```\nTransform a method into a static method — it does not receive an implicit first argument (`self` or `cls`). Can be called on the class or on an instance." }
357
+ ]
358
+ },
359
+ "classmethod": {
360
+ "contents": [
361
+ { "value": "```python\n@classmethod\ndef method(cls, args) -> type:\n ...\n```\nTransform a method into a class method — it receives the class as the implicit first argument instead of an instance. Commonly used for alternative constructors." }
362
+ ]
363
+ },
364
+ "dataclass": {
365
+ "contents": [
366
+ { "value": "```python\nfrom dataclasses import dataclass\n\n@dataclass\nclass ClassName:\n field: type\n```\nThe `@dataclass` decorator auto-generates `__init__()`, `__repr__()`, `__eq__()`, and optionally `__hash__()`, `__lt__()` etc. Parameters: `frozen=True` (immutable), `slots=True` (3.10+), `kw_only=True` (3.10+), `order=True`." }
367
+ ]
368
+ },
369
+ "globals": {
370
+ "contents": [
371
+ { "value": "```python\nglobals() -> dict[str, Any]\n```\nReturn the dictionary implementing the current module namespace. This is always the namespace of the current module — inside a function, this is the module's namespace, not the function's local namespace." }
372
+ ]
373
+ },
374
+ "locals": {
375
+ "contents": [
376
+ { "value": "```python\nlocals() -> dict[str, Any]\n```\nReturn a mapping of the current local symbol table. Free variables are returned by `locals()` when called in function blocks. The contents should not be modified (changes may not affect the actual locals in CPython 3.13+)." }
377
+ ]
378
+ }
379
+ }
380
+ }
@@ -0,0 +1,265 @@
1
+ {
2
+ "language": "ruby",
3
+ "hovers": {
4
+ "puts": {
5
+ "contents": [
6
+ { "value": "```ruby\nputs(*objects) -> nil\n```\nWrites the given objects to STDOUT, followed by a newline for each. Calls `.to_s` on each object. Returns `nil`." }
7
+ ]
8
+ },
9
+ "print": {
10
+ "contents": [
11
+ { "value": "```ruby\nprint(*objects) -> nil\n```\nPrints the given objects to STDOUT without a trailing newline. Calls `.to_s` on each object." }
12
+ ]
13
+ },
14
+ "p": {
15
+ "contents": [
16
+ { "value": "```ruby\np(*objects) -> object\n```\nFor each object, calls `object.inspect` and writes the result to STDOUT followed by a newline. Returns the object (or array of objects if multiple)." }
17
+ ]
18
+ },
19
+ "pp": {
20
+ "contents": [
21
+ { "value": "```ruby\npp(*objects) -> object\n```\nPretty-prints the given objects with nice formatting and indentation. Returns the object." }
22
+ ]
23
+ },
24
+ "printf": {
25
+ "contents": [
26
+ { "value": "```ruby\nprintf(format_string, *args) -> nil\n```\nPrints a formatted string to STDOUT using format specifiers like `%s`, `%d`, `%f`, `%x`." }
27
+ ]
28
+ },
29
+ "warn": {
30
+ "contents": [
31
+ { "value": "```ruby\nwarn(*messages, uplevel: nil, category: nil) -> nil\n```\nWrites the given messages to STDERR. If `uplevel` is given, prepends the file and line info." }
32
+ ]
33
+ },
34
+ "def": {
35
+ "contents": [
36
+ { "value": "```ruby\ndef method_name(args)\n body\nend\n```\nDefines a new method. The return value is the result of the last evaluated expression, or an explicit `return`. Methods are instances of `UnboundMethod`." }
37
+ ]
38
+ },
39
+ "class": {
40
+ "contents": [
41
+ { "value": "```ruby\nclass ClassName < SuperClass\n body\nend\n```\nDefines a new class. Classes are open and can be reopened to add or modify methods. Inherits from `Object` by default." }
42
+ ]
43
+ },
44
+ "module": {
45
+ "contents": [
46
+ { "value": "```ruby\nmodule ModuleName\n body\nend\n```\nDefines a module. Modules serve as namespaces and as mixins. They cannot be instantiated. Use `include` to mix into a class." }
47
+ ]
48
+ },
49
+ "include": {
50
+ "contents": [
51
+ { "value": "```ruby\ninclude(module, ...) -> self\n```\nIncludes the given module(s) into the current class or module. The module's methods become available as instance methods." }
52
+ ]
53
+ },
54
+ "extend": {
55
+ "contents": [
56
+ { "value": "```ruby\nextend(module, ...) -> self\n```\nAdds the methods from the given module(s) as singleton (class-level) methods to the receiver." }
57
+ ]
58
+ },
59
+ "prepend": {
60
+ "contents": [
61
+ { "value": "```ruby\nprepend(module, ...) -> self\n```\nPrepends the module(s) to the current class, inserting them before the class in the method lookup chain. Useful for method wrapping." }
62
+ ]
63
+ },
64
+ "require": {
65
+ "contents": [
66
+ { "value": "```ruby\nrequire(name) -> true or false\n```\nLoads the given library (a `.rb` or native extension). Returns `true` if loaded successfully, `false` if already loaded. Searches `$LOAD_PATH`." }
67
+ ]
68
+ },
69
+ "require_relative": {
70
+ "contents": [
71
+ { "value": "```ruby\nrequire_relative(path) -> true or false\n```\nLoads a file relative to the directory of the file containing the `require_relative` call." }
72
+ ]
73
+ },
74
+ "attr_accessor": {
75
+ "contents": [
76
+ { "value": "```ruby\nattr_accessor(*symbols) -> array\n```\nDefines getter and setter instance methods for the named attributes. Equivalent to calling both `attr_reader` and `attr_writer`." }
77
+ ]
78
+ },
79
+ "attr_reader": {
80
+ "contents": [
81
+ { "value": "```ruby\nattr_reader(*symbols) -> array\n```\nDefines getter instance methods for the named attributes. Each generated method returns the value of the corresponding instance variable." }
82
+ ]
83
+ },
84
+ "attr_writer": {
85
+ "contents": [
86
+ { "value": "```ruby\nattr_writer(*symbols) -> array\n```\nDefines setter instance methods for the named attributes. Each generated method sets the corresponding instance variable." }
87
+ ]
88
+ },
89
+ "raise": {
90
+ "contents": [
91
+ { "value": "```ruby\nraise(exception_class, message, backtrace)\nraise(message)\nraise\n```\nRaises an exception. With no arguments, re-raises the current exception. With a string, raises a `RuntimeError`. With a class, creates and raises an instance of that class." }
92
+ ]
93
+ },
94
+ "yield": {
95
+ "contents": [
96
+ { "value": "```ruby\nyield(*args) -> object\n```\nTransfers control to the block passed to the current method. Passes the given arguments to the block and returns the block's return value." }
97
+ ]
98
+ },
99
+ "block_given?": {
100
+ "contents": [
101
+ { "value": "```ruby\nblock_given? -> true or false\n```\nReturns `true` if a block was passed to the current method via `yield`. Useful for methods that optionally accept blocks." }
102
+ ]
103
+ },
104
+ "lambda": {
105
+ "contents": [
106
+ { "value": "```ruby\nlambda { |args| body } -> Proc\n```\nCreates a lambda (a Proc with strict argument checking). `return` inside a lambda exits the lambda only. Also available as `->` (stabby lambda)." }
107
+ ]
108
+ },
109
+ "proc": {
110
+ "contents": [
111
+ { "value": "```ruby\nproc { |args| body } -> Proc\n```\nCreates a Proc object. Unlike lambdas, procs have relaxed argument checking and `return` exits the enclosing method." }
112
+ ]
113
+ },
114
+ "if": {
115
+ "contents": [
116
+ { "value": "```ruby\nif condition\n body\nelsif condition\n body\nelse\n body\nend\n```\nConditional execution. In Ruby, only `false` and `nil` are falsy; everything else (including `0` and `\"\"`) is truthy. `if` is also an expression that returns a value." }
117
+ ]
118
+ },
119
+ "unless": {
120
+ "contents": [
121
+ { "value": "```ruby\nunless condition\n body\nelse\n body\nend\n```\nNegated conditional. Executes the body if the condition is `false` or `nil`. Equivalent to `if !condition`. Avoid using `unless` with `else`." }
122
+ ]
123
+ },
124
+ "case": {
125
+ "contents": [
126
+ { "value": "```ruby\ncase expression\nwhen value1\n body1\nwhen value2\n body2\nelse\n default_body\nend\n```\nCase expression using `===` for comparison. Supports ranges, classes, regexps, and procs as `when` values. Ruby 2.7+ also supports pattern matching with `case/in`." }
127
+ ]
128
+ },
129
+ "while": {
130
+ "contents": [
131
+ { "value": "```ruby\nwhile condition\n body\nend\n```\nExecutes the body repeatedly while the condition is truthy. Can also be used as a modifier: `do_something while condition`." }
132
+ ]
133
+ },
134
+ "until": {
135
+ "contents": [
136
+ { "value": "```ruby\nuntil condition\n body\nend\n```\nExecutes the body repeatedly until the condition becomes truthy. Equivalent to `while !condition`." }
137
+ ]
138
+ },
139
+ "begin": {
140
+ "contents": [
141
+ { "value": "```ruby\nbegin\n body\nrescue ExceptionClass => e\n handle error\nelse\n no error occurred\nensure\n always runs\nend\n```\nException handling block. `rescue` catches exceptions, `else` runs when no exception occurs, `ensure` always runs (like `finally` in other languages)." }
142
+ ]
143
+ },
144
+ "rescue": {
145
+ "contents": [
146
+ { "value": "```ruby\nrescue ExceptionClass => variable\n```\nCatches exceptions in a `begin/end` block or method body. Without a class, catches `StandardError`. Multiple `rescue` clauses are checked in order." }
147
+ ]
148
+ },
149
+ "ensure": {
150
+ "contents": [
151
+ { "value": "```ruby\nensure\n cleanup_code\nend\n```\nCode in the `ensure` clause always runs, whether or not an exception was raised. Similar to `finally` in Java/JavaScript." }
152
+ ]
153
+ },
154
+ "self": {
155
+ "contents": [
156
+ { "value": "```ruby\nself -> object\n```\nRefers to the current object (the receiver of the current method call). At the top level, `self` is `main`. Inside a class body, `self` is the class." }
157
+ ]
158
+ },
159
+ "super": {
160
+ "contents": [
161
+ { "value": "```ruby\nsuper\nsuper(args)\n```\nCalls the same-named method in the superclass. Without parentheses or arguments, passes along the current method's arguments. With explicit arguments, passes those instead. With empty parens `super()`, passes no arguments." }
162
+ ]
163
+ },
164
+ "freeze": {
165
+ "contents": [
166
+ { "value": "```ruby\nobj.freeze -> obj\n```\nPrevents further modifications to the object. Attempting to modify a frozen object raises `FrozenError`. Freezing is permanent and cannot be undone." }
167
+ ]
168
+ },
169
+ "frozen?": {
170
+ "contents": [
171
+ { "value": "```ruby\nobj.frozen? -> true or false\n```\nReturns `true` if the object is frozen (cannot be modified). All `Integer`, `Float`, `Symbol`, and frozen string literals are frozen." }
172
+ ]
173
+ },
174
+ "each": {
175
+ "contents": [
176
+ { "value": "```ruby\ncollection.each { |element| block } -> collection\ncollection.each -> Enumerator\n```\nCalls the given block once for each element in the collection, passing that element as a parameter. Returns the collection itself." }
177
+ ]
178
+ },
179
+ "map": {
180
+ "contents": [
181
+ { "value": "```ruby\ncollection.map { |element| block } -> Array\ncollection.map -> Enumerator\n```\nReturns a new array with the results of running the block once for every element in the collection. Alias: `collect`." }
182
+ ]
183
+ },
184
+ "select": {
185
+ "contents": [
186
+ { "value": "```ruby\ncollection.select { |element| block } -> Array\ncollection.select -> Enumerator\n```\nReturns a new array containing all elements for which the block returns a truthy value. Alias: `filter`." }
187
+ ]
188
+ },
189
+ "reject": {
190
+ "contents": [
191
+ { "value": "```ruby\ncollection.reject { |element| block } -> Array\ncollection.reject -> Enumerator\n```\nReturns a new array excluding all elements for which the block returns a truthy value. Opposite of `select`." }
192
+ ]
193
+ },
194
+ "reduce": {
195
+ "contents": [
196
+ { "value": "```ruby\ncollection.reduce(initial) { |accumulator, element| block } -> object\ncollection.reduce(symbol) -> object\n```\nCombines all elements by applying a binary operation. Also known as `inject` or `fold`. Without an initial value, uses the first element." }
197
+ ]
198
+ },
199
+ "flat_map": {
200
+ "contents": [
201
+ { "value": "```ruby\ncollection.flat_map { |element| block } -> Array\n```\nReturns a new array with the concatenated results of running the block for every element. Equivalent to `map` followed by `flatten(1)`." }
202
+ ]
203
+ },
204
+ "group_by": {
205
+ "contents": [
206
+ { "value": "```ruby\ncollection.group_by { |element| block } -> Hash\n```\nGroups the collection's elements into a hash. Keys are the block's return values; values are arrays of elements that produced that key." }
207
+ ]
208
+ },
209
+ "sort_by": {
210
+ "contents": [
211
+ { "value": "```ruby\ncollection.sort_by { |element| block } -> Array\n```\nSorts the elements using the values returned by the block as sort keys. Uses a Schwartzian transform for efficiency." }
212
+ ]
213
+ },
214
+ "tally": {
215
+ "contents": [
216
+ { "value": "```ruby\ncollection.tally -> Hash\ncollection.tally_by { |element| block } -> Hash\n```\nCounts the occurrences of each element and returns a hash where keys are elements and values are their counts. Added in Ruby 2.7." }
217
+ ]
218
+ },
219
+ "File.read": {
220
+ "contents": [
221
+ { "value": "```ruby\nFile.read(filename, length = nil, offset = 0, **opts) -> String\n```\nOpens the file, optionally seeks to the given offset, reads `length` bytes (or all if nil), and returns the data as a string." }
222
+ ]
223
+ },
224
+ "File.write": {
225
+ "contents": [
226
+ { "value": "```ruby\nFile.write(filename, string, offset = nil, **opts) -> Integer\n```\nOpens the file, optionally seeks to the given offset, writes the string, and returns the number of bytes written." }
227
+ ]
228
+ },
229
+ "File.open": {
230
+ "contents": [
231
+ { "value": "```ruby\nFile.open(filename, mode = 'r', **opts) -> File\nFile.open(filename, mode = 'r', **opts) { |f| block } -> object\n```\nOpens the file with the given mode. When a block is given, the file is passed to the block and automatically closed afterward." }
232
+ ]
233
+ },
234
+ "File.exist?": {
235
+ "contents": [
236
+ { "value": "```ruby\nFile.exist?(path) -> true or false\n```\nReturns `true` if the named file exists. Follows symlinks." }
237
+ ]
238
+ },
239
+ "File.delete": {
240
+ "contents": [
241
+ { "value": "```ruby\nFile.delete(*filenames) -> Integer\n```\nDeletes the named file(s). Returns the number of files deleted. Raises `Errno::ENOENT` if a file does not exist." }
242
+ ]
243
+ },
244
+ "File.join": {
245
+ "contents": [
246
+ { "value": "```ruby\nFile.join(*parts) -> String\n```\nJoins the given path components using `File::SEPARATOR` (typically `/`). Handles redundant separators." }
247
+ ]
248
+ },
249
+ "File.dirname": {
250
+ "contents": [
251
+ { "value": "```ruby\nFile.dirname(path, level = 1) -> String\n```\nReturns all components of the filename except the last one. With `level`, strips that many trailing components." }
252
+ ]
253
+ },
254
+ "File.basename": {
255
+ "contents": [
256
+ { "value": "```ruby\nFile.basename(path, suffix = '') -> String\n```\nReturns the last component of the filename. If `suffix` is given and present, it is removed from the result." }
257
+ ]
258
+ },
259
+ "Dir.glob": {
260
+ "contents": [
261
+ { "value": "```ruby\nDir.glob(pattern, flags = 0, base: nil) -> Array\n```\nReturns filenames matching the given glob pattern. Supports `*`, `**`, `?`, `[set]`, and `{alt1,alt2}` syntax." }
262
+ ]
263
+ }
264
+ }
265
+ }