Skip to content

Commit cedae06

Browse files
committed
Update docs for indexing enhancements
1 parent aba9d60 commit cedae06

File tree

1 file changed

+1
-27
lines changed

1 file changed

+1
-27
lines changed

jekyll/add-ons.markdown

+1-27
Original file line numberDiff line numberDiff line change
@@ -302,33 +302,7 @@ class MyIndexingEnhancement < RubyIndexer::Enhancement
302302
end
303303
```
304304
305-
Finally, we need to register our enhancement in the index once during the add-on's activation.
306-
307-
```ruby
308-
module RubyLsp
309-
module MyLibrary
310-
class Addon < ::RubyLsp::Addon
311-
def activate(global_state, message_queue)
312-
# Register the enhancement as part of the indexing process
313-
global_state.index.register_enhancement(MyIndexingEnhancement.new(global_state.index))
314-
end
315-
316-
def deactivate
317-
end
318-
319-
def name
320-
"MyLibrary"
321-
end
322-
323-
def version
324-
"0.1.0"
325-
end
326-
end
327-
end
328-
end
329-
```
330-
331-
Done! With this the Ruby LSP should automatically handle calls to `my_dsl_that_creates_methods` and create an accurate
305+
With this the Ruby LSP should automatically handle calls to `my_dsl_that_creates_methods` and create an accurate
332306
representation of the declarations that will be available in the runtime.
333307
334308
### Registering formatters

0 commit comments

Comments
 (0)