automatic template expansion in js

This commit is contained in:
Thomas Ruoff
2023-09-13 08:24:10 +02:00
parent d9f4f8153e
commit 4400c94ff0

13
lua/custom/plugins/js.lua Normal file
View File

@@ -0,0 +1,13 @@
return {
'axelvc/template-string.nvim',
opts = {
filetypes = { 'html', 'typescript', 'javascript', 'typescriptreact', 'javascriptreact' }, -- filetypes where the plugin is active
jsx_brackets = true, -- must add brackets to JSX attributes
remove_template_string = false, -- remove backticks when there are no template strings
restore_quotes = {
-- quotes used when "remove_template_string" option is enabled
normal = [[']],
jsx = [["]],
},
},
}