- πΒ I'm based in Istanbul, Turkey currently
- βοΈΒ You can contact me at [email protected]
- π§ Β I'm learning Go and Typescript π₯½
- β‘Β I might bore you with my questions!
My GitHub Stats
File template plugin based on buffer filetype
My GitHub Stats
telescope
extension here would be good.LuaSnip
Thank you for your work. This plugin is what I need, but I encountered the following error while using it:
msg_show.lua_error Error executing vim.schedule lua callback: ...share/nvim/lazy/template.nvim/lua/template/internals.lua:76: attempt to yield across C-call boundary
stack traceback:
[C]: in function 'yield'
...share/nvim/lazy/template.nvim/lua/template/internals.lua:76: in function 'cb'
...ocal/share/nvim/lazy/dressing.nvim/lua/dressing/util.lua:206: in function <...ocal/share/nvim/lazy/dressing.nvim/lua/dressing/util.lua:202>
Do I need to install other supporting plugins for this?
Thank you so much for your help!
After fixing it, I found that when there are multiple file types, only the Vue files are triggered. Is it because my config file is not configured properly, or is there something else?
return {
{ "stevearc/dressing.nvim", event = "VeryLazy" },
{
"doganalper/template.nvim",
event = "VeryLazy",
config = function()
require("template").setup({
-- custom config
mappings = {
switch_template = "<leader>cg",
},
templates = {
vue = {
{
name = "Vue 2 JS",
template = {
"<template>",
"<div>",
"</div>",
"<template>",
"",
"<script>",
"export default {}",
"</script>",
},
},
{
name = "Vue 2 Ts",
template = {
"<template>",
"<div>",
"</div>",
"</template>",
"",
'<script lang="ts">',
"import Vue from 'vue';",
"export default Vue.extend({})",
"</script>",
},
},
{
name = "Vue 3",
template = {
'<script lang="ts" setup></script>',
"",
"<template></template>",
},
},
},
markdown = {
{
name = "bast template",
template = {
"---",
"title:",
"categories: [ ]",
"tags: [ ]",
"date:",
"---",
},
},
{
name = "bas1 template",
template = {
"---",
"title:",
"categories: [ ]",
"tags: [ ]",
"date:",
"---",
},
},
},
Java = {
{
name = "Java template",
template = {
"// java template",
},
}
}
},
})
end,
},
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.