From 7ff7f47104721b0d67f14312c1908bc088c7ba58 Mon Sep 17 00:00:00 2001 From: veypi Date: Tue, 15 Oct 2024 19:31:12 +0800 Subject: [PATCH] templates --- init.lua | 4 ++++ lazy-lock.json | 1 + lua/plugins/tools.lua | 5 +++++ templates/=template=.go | 10 ++++++++++ templates/=template=.rs | 8 ++++++++ templates/=template=.ts | 8 ++++++++ templates/=template=.vue | 16 ++++++++++++++++ templates/=template=Makefile | 9 +++++++++ 8 files changed, 61 insertions(+) create mode 100644 templates/=template=.go create mode 100644 templates/=template=.rs create mode 100644 templates/=template=.ts create mode 100644 templates/=template=.vue create mode 100644 templates/=template=Makefile diff --git a/init.lua b/init.lua index 2514f9e..324bf68 100644 --- a/init.lua +++ b/init.lua @@ -1,2 +1,6 @@ -- bootstrap lazy.nvim, LazyVim and your plugins +vim.g.user = "veypi" +vim.g.email = "i@veypi.com" +vim.g.templates_directory = '~/.config/nvim/templates' + require("config.lazy") diff --git a/lazy-lock.json b/lazy-lock.json index 09429dd..13067ad 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -44,5 +44,6 @@ "tokyonight.nvim": { "branch": "main", "commit": "2c85fad417170d4572ead7bf9fdd706057bd73d7" }, "trouble.nvim": { "branch": "main", "commit": "254145ffd528b98eb20be894338e2d5c93fa02c2" }, "ts-comments.nvim": { "branch": "main", "commit": "98d7d4dec0af1312d38e288f800bbf6ff562b6ab" }, + "vim-template": { "branch": "master", "commit": "0bf607233719a0ed6e14bf0197ba8950bf8833fc" }, "which-key.nvim": { "branch": "main", "commit": "8badb359f7ab8711e2575ef75dfe6fbbd87e4821" } } diff --git a/lua/plugins/tools.lua b/lua/plugins/tools.lua index b90ff2e..30535d7 100644 --- a/lua/plugins/tools.lua +++ b/lua/plugins/tools.lua @@ -1,4 +1,9 @@ return { + { + 'aperezdc/vim-template', + config = function() + end, + }, { "norcalli/nvim-colorizer.lua", config = function() diff --git a/templates/=template=.go b/templates/=template=.go new file mode 100644 index 0000000..e0f9996 --- /dev/null +++ b/templates/=template=.go @@ -0,0 +1,10 @@ +// +// %FFILE% +// Copyright (C) %YEAR% %USER% <%MAIL%> +// %FDATE% +// Distributed under terms of the %LICENSE% license. +// + +package main + +%HERE% diff --git a/templates/=template=.rs b/templates/=template=.rs new file mode 100644 index 0000000..e782d40 --- /dev/null +++ b/templates/=template=.rs @@ -0,0 +1,8 @@ +// +// %FFILE% +// Copyright (C) %YEAR% %USER% <%MAIL%> +// %FDATE% +// Distributed under terms of the %LICENSE% license. +// + +%HERE% diff --git a/templates/=template=.ts b/templates/=template=.ts new file mode 100644 index 0000000..259568c --- /dev/null +++ b/templates/=template=.ts @@ -0,0 +1,8 @@ +/* + * %FFILE% + * Copyright (C) %YEAR% %USER% <%MAIL%> + * %FDATE% + * Distributed under terms of the %LICENSE% license. + */ + + %HERE% diff --git a/templates/=template=.vue b/templates/=template=.vue new file mode 100644 index 0000000..a6adb7e --- /dev/null +++ b/templates/=template=.vue @@ -0,0 +1,16 @@ + + + + + + + diff --git a/templates/=template=Makefile b/templates/=template=Makefile new file mode 100644 index 0000000..5ffdd47 --- /dev/null +++ b/templates/=template=Makefile @@ -0,0 +1,9 @@ +# +# %FFILE% +# Copyright (C) %YEAR% %USER% <%MAIL%> +# %FDATE% +# Distributed under terms of the %LICENSE% license. +# + +all: + %HERE%@echo "%FFILE% needs your attention"