Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Code RecycleNew to Visual Studio Code? Get it now.
Code Recycle

Code Recycle

LDXCODE

|
130 installs
| (0) | Free
Quickly initialize the project,Stackable layer structure,Programmable input logic,Dynamic code snippets,Code-level dependency injection
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

A designer for quickly creating code snippet, Scaffold Cascade, and Schematic diagram.

Quickly initialize the project,Stackable layer structure,Programmable input logic,Dynamic code snippets,Code-level dependency injection


中文 English

CLI

npm i @code-recycle/cli -D

Create a new script folder

  • Choose a location to create a folder and create it in the following hierarchy

You can refer to the Demo Repo

.
├── action 
│   ├── hello2.js
│   └── hello.js
├── snippet 
│   ├── hello2.js
│   └── manifest.json
└── view 
    ├── hello2.js
    └── hello.js

Create Script

  • Use the editor to open the created folder, then right-click to quickly create a script

创建

创建-输入名称

Editor Script

初始化

  • Here we demonstrate how to change the a declaration in a file from let to const

Test Selector

  • Click on the corresponding node to automatically copy the relevant labels

测试选择器

Implementation

实现

More?

  • Script Util Introduce

AST View Debugger

  • Located in the right upper corner of the editor's title bar.
  • Used for visual debugging when selecting custom rule

ast-tree

CSS Selector Universal Language Query

  • Use css selector for different language node queries
  • Implement the majority of the CSS selector functions
name Support
Descendant *, ,>,<,+,~,,
Attribute [xx],[xx=yy],[xx^=yy],[xx$=yy],[xx*=yy],[xx!=yy],[xx~=yy] , [xx\|=yy]
Pseudo :not,:has,:is,:where,:first-child,:last-child,:only-child,:nth-child,:nth-last-child,:first-of-type,:last-of-type,:only-of-type,:nth-of-type,:nth-last-of-type,:raw,:use
Pseudo-element ::parent, ::children(x) ,::xx

Description

  • Custom pseudo-classes :raw: used to query the original value/tag attribute of the current node

    xxx:raw([value=yyy]); this selector is used in very extreme scenarios and is used only in a few cases.

  • ::parent: query the parent element

  • ::children(x): query the xth child element of the current element

  • ::xx: query the custom child element defined in the current language.

  • Custom pseudo-classes :use: like :is,Can query siblings and descendants

Query general attributes of a node

  • index: Index representing the position of the current node in its parent.
  • tag: Label of the node.
  • value: Text of the current node.
  • range: Position of the current node.
  • children: List of child elements of the current node.
  • type: Type of the node (node/token).

Supported Language/Grammar

  • typescript(typescript)
  • typescript(javascript)
  • typescript(typescriptreact)
  • typescript(javascriptreact)
  • @angular/compiler(ng-html)
  • @angular/compiler(html)
  • htmlparser2(html)
  • htmlparser2(xml)
  • jsonc-parser(json)
  • gsql-ast-parser(sql)
  • @vue/compiler-dom(vue)
@lezer
cpp css html java
javascript json lezer markdown
php python rust sass
xml
antl4
abb abnf acme adaparent/ada83 adaparent/ada95 adaparent/ada2005
alef algol60 alloy alpaca angelscript antlrparent/antlr2
apt arangodb argus arithmetic ASL asmparent/asm6502
asmparent/asm8086 asmparent/asmMASM asmparent/asmZ80 asmparent/masm asmparent/nasm asmparent/pdp7
asmparent/ptx-parent/ptx-2.1 asnparent/asn atl b basic bcl
bibcode Bicep bnf C calculator callable
caql cayenne clf clojure cmake cobol85
CPP14 cql cql3 creole CSS3 csv
cto cypher Dart2 datalog dcm dice
doiurl dot edif300 edn elixir-parser erlang
esolangparent/brainflack esolangparent/cool esolangparent/dgol esolangparent/lolcode esolangparent/loop esolangparent/nanofuck
esolangparent/snowball esolangparent/wheel EVMB fasta fdo91 fen
flowmatic focal fol fortranparent/fortran77 fortranparent/fortran90 fusiontables
glsl gml golang graphql graphstream-dgs gtin
guitartab html http hypertalk ical icon
inf informix infosapient iri iso8601 istc
jam janus javaparent/java javaparent/java8 javaparent/java20 jsparent/javascript
jpa json json5 karel kirikiri-tjs kotlinparent/kotlin
kuka kquery lambda lcc less lisa
lrc ltl Lua Lucene matlab mckeeman-form
memcached metamath metric microc modelica modula2
moo morsecode PowerQuery mps muddb mumath
muparser newick oberon oncrpc orwell p
pascal pbm pcre pddl pdn peoplecode
pii pl0 plucid ply PMMN postalcode
prolog promql propcalc properties protobuf2 protobuf3
pythonparent/python3 qif quakemap racket-bsl racket-isl rcs
refal restructuredtext rfc822parent/datetime rfc822parent/rfc822 domain filter
robotwar romannumerals ron rpn Corundum rust
scotty scss semver sexpression sgf sharc
sieve smalltalk smiles smtlibv2 snobol Solidity
sqlparent/athena sqlparent/derby sqlparent/drill sqlparent/hiveparent/hivev2 sqlparent/hiveparent/hivev3 sqlparent/hiveparent/hivev4
sqlparent/mysql sqlparent/plsql sqlparent/trino sqlparent/tsql sqlparent/informix-sql stacktrace
stellaris suokif swift-fin szf tcp telephone
tiny tinybasic tinyc tinymud tl tnt
trac tsv ttm turing turtle turtle-doc
unicode/graphemes unreal_angelscript upnp url useragent vb6
verilogparent/verilog verilogparent/systemverilog vhdl vmf wavefront webidl
wkt-crs-v1 wln wren xml xpathparent/xpath xpathparent/XPath20
tree-sitter
haskell javascript php java c_sharp css
cpp python c ruby go bash
tsx json scala embedded_template agda jsdoc
tsq regex ocaml ocaml_interface dbscheme ql
toml swift ada sosl soql apex
capnp clojure cmake comment commonlisp cuda
d dockerfile dot elixir elm elisp
erlang fennel fish formula fortran gitattributes
gleam glsl gomod gowork graphql hack
jq json5 kotlin lalrpop latex lean
tablegen lua make markdown markdown_inline meson
nix objc org pascal pgn proto
racket rasi re2c rego rst r
scss sexp smali sourcepawn sparql sql_bigquery
ssh_client_config svelte thrift query turtle twig
vue wat wast wgsl yaml yang
  • tree-sitter needs to fetch code from the https://github.com/wszgrcy/tree-sitter-wasm-bundle repository or customized according to the format, then write the local path into the configuration file code-recycle.parser.tree-sitter.repository.

Support

System Support test
Windows [x] [x]
Linux [x] [x]
OSX [x] [x]
Software Support
VSCode [x]

The project code contains

Function Include
I18n [x]
Configuration WebView
Extension

Other

About open source

  • Before developers can maintain their livelihood and ensure sufficient energy to develop the plugin, the plugin will not be open-source temporarily.
  • When developers can make a living from the plugin and maintain their lives, we will consider open-sourceing.
  • Currently, the plugin has no commercial earnings.
  • If you have better ideas for commercialization, please contact me at any time:wszgrcy@gmail.com
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft