Last active
June 22, 2017 17:26
-
-
Save billyvg/f9cce50acbd00515c91dce0e7e346f29 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Buffer { | |
getLines() { | |
return new Promise((resolve) => resolve(['exciting', 'lines'])); | |
} | |
} | |
class Neovim { | |
getBuffer() { | |
return new Promise((resolve) => resolve(new Buffer())); | |
} | |
} | |
// Get lines of current buffer | |
nvim.getBuffer().then(buffer => buffer.getLines()).then(lines => { | |
// Do something with `lines` | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment