-
I have following component to generate the 2024-05-30.19-10-28.mp4 |
Beta Was this translation helpful? Give feedback.
Answered by
L3MON4D3
May 31, 2024
Replies: 2 comments
-
I'll have to re-check the code, but you may get away with calling |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
s1n7ax
-
Yep. Works beautifully. return function()
return fmt(
[[
{}export default function {}() {{
return({})
}}
]],
{
f(function()
if not ts_react:has_react_import() then
vim.api.nvim_buf_set_lines(0, 0, 0, true, {
'import React from "react"',
})
end
return {}
end, {}),
i(1, 'Name'),
i(2, ''),
}
)
end
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'll have to re-check the code, but you may get away with calling
nvim_buf_set_text
in the functionNode to insert text anywhere in the buffer.. could you try if it works correctly?