8000 chore: update README.md · rxtsel/template-string.nvim@d5572f0 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on May 23, 2025. It is now read-only.

Commit d5572f0

Browse files
author
Cristhian Melo
authored
chore: update README.md
1 parent 31a2cd7 commit d5572f0

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44

55
## Features
66

7-
- Wrap template literals with `{``}` when inside JSX/TSX components.
8-
- Revert template literals to their original form when necessary.
9-
- Integration with [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter): The plugin now utilizes nvim-treesitter to accurately detect and manipulate JSX/TSX nodes, enhancing its functionality and precision.
7+
- Automatically wraps template literals with backticks ``` `` ``` when a `${}` expression is added within single or double quotes in JavaScript or TypeScript files.
8+
- Wraps template literals with `{``}` when inside JSX/TSX components.
9+
- Reverts template literals to their original form when the `${}` expression is removed.
10+
- Integration with [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) for accurate detection and manipulation of JSX/TSX nodes, enhancing its functionality and precision.
1011

1112
## Supported Languages
1213

@@ -32,16 +33,17 @@ Install using your favorite package manager for Neovim. For example, using [lazy
3233

3334
## Usage
3435

35-
Once installed, the plugin automatically wraps template literals with **``** when editing JavaScript or TypeScript files. To use template literals, simply enclose your JavaScript or TypeScript expressions in `${}`. For example:
36+
Once installed, the plugin automatically wraps template literals with backticks `` `...` `` when a `${}` expression is added within single or double quotes in JavaScript or TypeScript files. For example, changing `"Hello, ${name}"` to `` `Hello, ${name}` ``. In JSX/TSX, it wraps with `{``}`.
37+
38+
### JavaScript/TypeScript
3639

3740
```javascript
38-
// Javascript/TypeScript
3941
const name = "World";
4042
const greeting = `Hello, ${name}!`;
4143
console.log(greeting);
4244
```
4345

44-
On JSX/TSX components, the plugin will wrap template literals with `{``}`. For example:
46+
### JSX/TSX
4547

4648
```jsx
4749
const props = {

0 commit comments

Comments
 (0)
0