docs: annotate Ruby configuration and plugin APIs with YARD types
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
# @param config [Vamp::Config]
|
||||
Vamp.configure do |config|
|
||||
config.leader = "space"
|
||||
config.clipboard_mode = "system" # "separate" keeps ordinary y/d/c/p/P internal
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
Vamp.plugin "greeting", requires: ["text"]
|
||||
|
||||
# @param editor [Vamp::Editor]
|
||||
# @param args [String]
|
||||
Vamp.command "greet" do |editor, args|
|
||||
# @type [String]
|
||||
name = args.empty? ? "world" : args
|
||||
editor.insert "Hello, #{name}!\n"
|
||||
editor.message "Greeting inserted by Ruby"
|
||||
end
|
||||
|
||||
# @param editor [Vamp::Editor]
|
||||
# @param _args [String]
|
||||
Vamp.command "upper" do |editor, _args|
|
||||
editor.replace editor.text.upcase
|
||||
editor.message "Buffer uppercased by Ruby"
|
||||
|
||||
Reference in New Issue
Block a user