* add new autofmt sample
* Feat: implement rustfmt::skip support for rsx
* generally improve error handling with better expect messages
* wip: nested rsx formatting and expression formatting
* nested rsx formatting works
* collapse autofmt crate
* cast indent through macros
* use proper whitespace
* no more eating comments!
* Use proper error handling
* fix formatting and merging if chains in attributes
* fix autoformat if attribute chains
* Fix IfAttributeValue ToTokens implementation
---------
Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
* fix rsx autocomplete and diagnostics in the root; provide better completions after attributes are finished
* clean up pr to use internal child parsing
* Fix peek_lowercase name
* fix comma diagnostics in the root
* Fix parsing components with a path
* remove simple routes trailing comma
* Fix incomplete_root_elements test
* Remove trailing commas from root body node in tests
---------
Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
Hotreload the contents of for loops, if chains, component bodies, props, attributes, and any literals discovered in rsx!
Add a TUI renderer to the CLI.
Improve the CLI build system to be async and parallel.
Refactor RSX to allow partial expansion of expressions.
Merge autofmt implementations for consistency.
Merge the representation of elements and components under the hood.
Add a diagnostics system for rsx for improved error messages.
Drop interprocess and move to websockets for communication between the CLI and the server.
Assign IDs to nodes and attributes in a stable way to be used in non compiler contexts.
Add hotreloading to any body of component/for loop/if chain/etc.
---------
Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
Co-authored-by: Liam Mitchell <liamkarlmitchell@gmail.com>
* autocomplete rsx
* hide the completions module
* fix autocomplete for identifiers that start with a raw identifier
* add field completion hints for props
* remove extra import
* Revert "add field completion hints for props"
This reverts commit 194899c737.
* fix autocomplete inside raw expressions
* fix autofmt
* feat: just use regular ifmt if it's compatible
reuses the tokens for ifmt so RA provides its HIR lowering on simple formatted strings
* fix merging ifmt strings
* add a better error message for components called like functions
---------
Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
Adds the ability to specify an indent string to public autofmt methods - either
a sequence of spaces or a tab character.
Get the indentation style and size from rustfmt for dx fmt, or from the editor
settings for the vscode extension.
Closes#1595