Skip to content

Automatically convert strings to f-strings or template strings and back.

License

Notifications You must be signed in to change notification settings

skoch13/nvim-puppeteer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nvim-puppeteer 🎎

Master of strings. Automatically convert strings to f-strings or template strings and back.

Features

  • When typing {} in a python string, automatically convert it to an f-string.
  • When typing ${} in a javascript or typescript string, automatically convert it to a template string.
  • When removing the {} or ${}, automatically convert it back to a regular string.
  • Also works with multi-line strings.
  • No configuration needed, just install and you are ready to go.

Requirements

  • nvim 0.9 or higher.
  • The respective Treesitter parsers are required: :TSInstall python javascript typescript.

Installation

-- lazy.nvim
{ 
	"chrisgrieser/nvim-puppeteer",
	dependencies = "nvim-treesitter/nvim-treesitter",
	lazy = false, -- plugin lazy-loads itself
},

-- packer
use {
	"chrisgrieser/nvim-puppeteer",
	requires = "nvim-treesitter/nvim-treesitter",
}

No configuration or .setup() call is needed. The plugin already automatically loads as little as possible.

Credits

About Me
In my day job, I am a sociologist studying the social mechanisms underlying the digital economy. For my PhD project, I investigate the governance of the app economy and how software ecosystems manage the tension between innovation and compatibility. If you are interested in this subject, feel free to get in touch.

Blog
I also occasionally blog about vim: Nano Tips for Vim

Profiles

Buy Me a Coffee

Buy Me a Coffee at ko-fi.com

About

Automatically convert strings to f-strings or template strings and back.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua 100.0%