Skip to content

Instantly share code, notes, and snippets.

View dangkhoipro's full-sized avatar

dang khoi dangkhoipro

View GitHub Profile
@JoosepAlviste
JoosepAlviste / typescript.lua
Last active July 15, 2025 02:01
Automatically add async to function declaration when typing "await"
---@param types string[] Will return the first node that matches one of these types
---@param node TSNode|nil
---@return TSNode|nil
local function find_node_ancestor(types, node)
if not node then
return nil
end
if vim.tbl_contains(types, node:type()) then
return node
@madysondesigns
madysondesigns / gist:9982968
Created April 4, 2014 20:56
Git Cheatsheet
Checking in/out:
$ git clone [project url] - get a copy of repo in a folder
$ git checkout [file] - check out last committed version of a file
$ git add --patch [file] - Step through each section of changes in a file with option to stage or not stage
$ git remote rm origin - remove origin
$ git remote add origin [url] - add origin
Working with Branches:
$ git branch [foo] - create branch named foo