Skip to content

Instantly share code, notes, and snippets.

@billyvg
billyvg / foo.ts
Last active January 6, 2026 20:36
Komodo Action: Create a new stack on git push
/**
* Create a new Komodo Action and paste the following in. Take the webhook URL and connect
* it to your git host so that the webhook is called on pushes.
*
* You may need to modify it to your liking but the code detects when files are added and assumes
* the format: `<stackName>/compose.yaml`
*/
// I used to use a template to create a new stack, but
// templates cause my update procedure to fail, so I just define my template here instead
// From
nvim.tabpage.then(tabpage => tabpage.window).then(window => window.buffer).then(buffer => buffer.lines).then(lines => lines);
// To
const lines = await nvim.tabpage.window.buffer.lines;
// or without await
nvim.tabpage.window.buffer.lines.then(lines => lines);
nvim.getBuffer().getLines().then(lines => lines);
const lines = await nvim.buffer.lines;
const buffer = await nvim.buffer;
const lines = await buffer.lines;
const buffer = await nvim.getBuffer();
const lines = await buffer.getLines();
class Buffer {
getLines() {
return new Promise((resolve) => resolve(['exciting', 'lines']));
}
}
class Neovim {
getBuffer() {
return new Promise((resolve) => resolve(new Buffer()));
}
// Desired API
const name = await neovim.buffer.name; // neovim.buffer.name((name) => name);
class Buffer {
get name() {}
remove(start, end) {}
}
class Neovim {
get buffer() {
Process: 2.28-x64-chromedriver [17759]
Path: /Users/USER/*/2.28-x64-chromedriver
Identifier: 2.28-x64-chromedriver
Version: 0
Code Type: X86-64 (Native)
Parent Process: java [17757]
Responsible: 2.28-x64-chromedriver [17759]
User ID: 501
Date/Time: 2017-04-28 12:18:50.389 -0700
class MainView extends React.Component {
_addEntry(e) {
this.props.navigator.push({
title: 'New',
component: AddEntryView,
rightButtonTitle: 'Save',
onRightButtonPress: (e) => {
// save
},
});