Class: Neovim::Plugin::DSL
- Inherits:
- BasicObject
- Defined in:
- lib/neovim/plugin/dsl.rb
Overview
The DSL exposed in Neovim.plugin
blocks.
Instance Method Summary collapse
-
#autocmd(event, options = {}, &block) ⇒ Object
Register an
nvim
autocmd. -
#command(name, options = {}, &block) ⇒ Object
Register an
nvim
command. -
#function(name, options = {}, &block) ⇒ Object
Register an
nvim
function. -
#initialize(plugin) ⇒ DSL
constructor
A new instance of DSL.
Constructor Details
#initialize(plugin) ⇒ DSL
Returns a new instance of DSL.
9 10 11 |
# File 'lib/neovim/plugin/dsl.rb', line 9 def initialize(plugin) @plugin = plugin end |
Instance Method Details
#autocmd(event, options = {}, &block) ⇒ Object
Register an nvim
autocmd. See :h autocmd.
65 66 67 |
# File 'lib/neovim/plugin/dsl.rb', line 65 def autocmd(event, ={}, &block) register_handler(:autocmd, event, , block) end |
#command(name, options = {}, &block) ⇒ Object
Register an nvim
command. See :h command.
35 36 37 |
# File 'lib/neovim/plugin/dsl.rb', line 35 def command(name, ={}, &block) register_handler(:command, name, , block) end |
#function(name, options = {}, &block) ⇒ Object
Register an nvim
function. See :h function.
51 52 53 |
# File 'lib/neovim/plugin/dsl.rb', line 51 def function(name, ={}, &block) register_handler(:function, name, , block) end |