Skip to content

Instantly share code, notes, and snippets.

@bergmannjg
bergmannjg / rearct-native-app-in-wsl2.md
Last active November 14, 2024 08:51
Building a react native app in WSL2
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))
@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

@davidatsurge
davidatsurge / luasnip_config.lua
Last active September 24, 2024 23:26
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`