couple updates 🤷

This commit is contained in:
Thomas Ruoff
2023-03-14 23:02:40 +01:00
parent 8c12d8e565
commit eb70207586
2 changed files with 22 additions and 0 deletions

View File

@@ -4,6 +4,9 @@ vim.keymap.set('t', 'jk', [[<C-\><C-n>]])
-- quick write
vim.keymap.set('n', '<leader>w', vim.cmd.w)
-- quick config
vim.keymap.set('n', '<leader>C', '<Cmd>e $MYVIMRC<CR>', { desc = '[C]onfig' })
-- quick source file
vim.keymap.set('n', '<leader>x', "<Cmd>source %|echo expand('%') 'sourced'<CR>")

View File

@@ -62,6 +62,25 @@ local snippets = {
),
},
javascript = {
s(
{ trig = 'rfc', name = 'React Fuctional Component' },
fmt(
[[
import PropTypes from 'prop-types';
const {} = function({}) {{
return {};
}};
{}.propTypes = {{
{}
}};
export default {};
]],
{ i(1, 'ComponentName'), i(2, '{}'), i(0), rep(1), i(3), rep(1) }
)
),
s(
{ trig = 'des', name = 'describe' },
fmt(