Skip to content

Instantly share code, notes, and snippets.

View jacksonludwig's full-sized avatar

Jackson Ludwig jacksonludwig

View GitHub Profile
@davidatsurge
davidatsurge / luasnip_config.lua
Last active January 15, 2023 13:22
luasnip+treesitter snippet that fills in prop names when creating new react component
local ls = require("luasnip")
local fmt = require("luasnip.extras.fmt").fmt
local s = ls.snippet
local i = ls.insert_node
local f = ls.function_node
local d = ls.dynamic_node
local sn = ls.snippet_node
local rep = require("luasnip.extras").rep
-- Get a list of the property names given an `interface_declaration`
@xquangdang
xquangdang / rn-with-wsl-wsa.md
Last active March 22, 2024 14:39
Develop React Native app with WSL and WSA

Develop React Native app with WSL and WSA

Requirement

  • Windows Subsystem for Linux 2 (WSL2)
  • Windows Subsystem for Android (WSA)
  • NodeJS install inside WSL2

Steps

WSA

function RenameWithQuickfix()
local position_params = vim.lsp.util.make_position_params()
local new_name = vim.fn.input "New Name > "
position_params.newName = new_name
vim.lsp.buf_request(0, "textDocument/rename", position_params, function(err, method, result, ...)
-- You can uncomment this to see what the result looks like.
if false then
print(vim.inspect(result))
@bergmannjg
bergmannjg / rearct-native-app-in-wsl2.md
Last active April 27, 2024 07:21
Building a react native app in WSL2