https://github.com/jos3lo89/autotemplate.nvim
Automatic string interpolation for Neovim. Instantly converts quotes to backticks when typing ${ inside strings. Powered by Treesitter.
https://github.com/jos3lo89/autotemplate.nvim
lua neovim neovim-plugin string-interpolation
Last synced: 24 days ago
JSON representation
Automatic string interpolation for Neovim. Instantly converts quotes to backticks when typing ${ inside strings. Powered by Treesitter.
- Host: GitHub
- URL: https://github.com/jos3lo89/autotemplate.nvim
- Owner: jos3lo89
- License: mit
- Created: 2026-01-19T23:22:55.000Z (24 days ago)
- Default Branch: main
- Last Pushed: 2026-01-20T06:20:29.000Z (24 days ago)
- Last Synced: 2026-01-20T06:27:03.588Z (24 days ago)
- Topics: lua, neovim, neovim-plugin, string-interpolation
- Language: Lua
- Homepage:
- Size: 172 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# autotemplate.nvim
Automatic String Interpolation for Neovim using Treesitter.
Automatically converts single (') or double (") quotes into backticks (`) when you type ${ inside a string.
## Demo
Imagine typing console.log("Hello ${name}"). When you type ${, the quotes are automatically converted to backticks and the cursor is placed inside the braces.

# autotemplate.nvim
Automatic String Interpolation for Neovim using Treesitter.
## Description
`autotemplate.nvim` automatically converts single (`'`) or double (`"`) quotes into backticks (`` ` ``) when you type `${` inside a string. Inspired by VS Code extensions, but built the Neovim way: Fast, native, and powered by Treesitter.
## Demo
Imagine typing `console.log("Hello ${name}")`. When you type `${`, the quotes are automatically converted to backticks and the cursor is placed inside the braces.
## Installation and Configuration
The plugin is designed to be flexible and give you full control.
### Installation with lazy.nvim
Copy and paste this block into your plugins file:
```lua
return {
"jos3lo89/autotemplate.nvim",
branch = "dev", -- Or "main" if you are on the stable branch
opts = {
-- Define exactly which languages you want to enable.
-- Defining this table overrides the defaults completely.
filetypes = {
"javascript",
"typescript",
"javascriptreact", -- for .jsx
"typescriptreact", -- for .tsx
"vue",
"svelte",
},
-- Filetypes to explicitly ignore, even if they are in the whitelist.
ignored_filetypes = {
"text",
"markdown",
},
auto_close_brackets = true, -- Automatically inserts "}" and moves cursor left
trigger_key = "{", -- Key that triggers the check (Default: "{")
disable_in_macro = true, -- Disable plugin while recording macros
debug = false, -- Enable debug notifications
},
}
```
### Requirements
- **Neovim 0.9+**
- **Nvim-Treesitter** installed with parsers for your target languages (e.g., `:TSInstall javascript`,, etc.)
## Commands
| Command | Description |
| --------------------- | ---------------------------------------------------- |
| `:AutoTemplateToggle` | Enables or disables the plugin globally in real-time |