Class: Neovim::DslVimscript

Inherits:
DslBase show all
Defined in:
lib/neovim/vimscript_provider.rb

Constant Summary collapse

TYPE =
:rplugin

Constants included from Logging

Logging::DEFAULT_LEVEL, Logging::LEVELS

Instance Method Summary collapse

Methods inherited from DslBase

#mkplugin, open

Methods included from Logging

put

Constructor Details

#initialize(source) ⇒ DslVimscript

Returns a new instance of DslVimscript.



14
15
16
17
# File 'lib/neovim/vimscript_provider.rb', line 14

def initialize source
  super *[]
  @source = source
end

Instance Method Details

#autocmd(event, **options, &block) ⇒ Object



29
30
31
32
# File 'lib/neovim/vimscript_provider.rb', line 29

def autocmd event, **options, &block
  # Options: group pattern nested once eval
  register_handler :autocmd, event, true, **options, &block
end

#command(name, sync: true, **options, &block) ⇒ Object



19
20
21
22
# File 'lib/neovim/vimscript_provider.rb', line 19

def command name, sync: true, **options, &block
  # Options: range/count bang register nargs complete bar
  register_handler :command, name, sync, **options, &block
end

#function(name, sync: true, **options, &block) ⇒ Object



24
25
26
27
# File 'lib/neovim/vimscript_provider.rb', line 24

def function name, sync: true, **options, &block
  # Options: range eval
  register_handler :function, name, sync, **options, &block
end