This is a Visual Studio Code extension that allows you to insert "use client" or "use server" statements at the beginning of a file.
- Provides commands to insert "use client" or "use server" statements at the beginning of the active file.
- Supports the keyboard shortcuts:
- For "Insert 'use client' Statement": Control+Alt+C (Mac) or Ctrl+Alt+C (Windows/Linux)
- For "Insert 'use server' Statement": Control+Alt+S (Mac) or Ctrl+Alt+S (Windows/Linux)
- Can be triggered by right-clicking in the editor and selecting the corresponding option.
- You can also use the Command Palette (
Control+Shift+P
on macOS orCtrl+Shift+P
) and search for "Insert 'use client' Statement" or "Insert 'use server' Statement".
- Launch Visual Studio Code.
- Press
Ctrl+P
(orCmd+P
on macOS) to open the Quick Open dialog. - Type
ext install your-extension
and pressEnter
. - Click the Install button next to the extension "Your Extension" by "Your Publisher".
- To insert a "use client" statement:
- Use the predefined keyboard shortcut: Control+Alt+C (Mac) or Ctrl+Alt+C (Windows/Linux).
- Right-click in the editor and select "Insert 'use client' Statement".
- Use the Command Palette (
Cmd+Shift+P
on macOS orCtrl+Shift+P
) and search for "Insert 'use client' Statement".
- To insert a "use server" statement:
- Use the predefined keyboard shortcut: Control+Alt+S (Mac) or Ctrl+Alt+S (Windows/Linux).
- Right-click in the editor and select "Insert 'use server' Statement".
- Use the Command Palette (
Control+Shift+P
on macOS orCtrl+Shift+P
) and search for "Insert 'use server' Statement".
MIT 💚 License © 2023 Dennis Ollhoff