From 4400c94ff02d3884800e62784656e223aac075da Mon Sep 17 00:00:00 2001 From: Thomas Ruoff Date: Wed, 13 Sep 2023 08:24:10 +0200 Subject: [PATCH] automatic template expansion in js --- lua/custom/plugins/js.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 lua/custom/plugins/js.lua diff --git a/lua/custom/plugins/js.lua b/lua/custom/plugins/js.lua new file mode 100644 index 0000000..db8aa26 --- /dev/null +++ b/lua/custom/plugins/js.lua @@ -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 = [["]], + }, + }, +}