| 1 | package Neovim::RPC::Plugin::Echo; | ||
| 2 | 1 | our $AUTHORITY = 'cpan:YANICK'; | |
| 3 | # ABSTRACT: echo back message to nvim | ||
| 4 | 1 | $Neovim::RPC::Plugin::Echo::VERSION = '1.0.1'; | |
| 5 | 1 | ▶ | use 5.20.0; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 1 | ▶ | use Neovim::RPC::Plugin; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | |||
| 12 | 1 | ▶ | use experimental qw/ signatures /; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | |||
| 14 | 0 | ▶ | subscribe echo => sub($self,$event) { |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 15 | 0 | my $message = $event->params->[0]; | |
| 16 | 0 | $self->api->vim_command( qq{echo "$message"} ); | |
| 17 | 1 | }; | |
| 18 | |||
| 19 | 1 | 1; | |
| 20 | |||
| 21 | __END__ | ||