kitchen sink again :(

This commit is contained in:
2025-05-06 16:51:24 -05:00
parent 3094bf2a39
commit 7c3289fded
51 changed files with 544 additions and 792 deletions

View File

@ -1,4 +1,4 @@
require('core.snippets.shorthands')
require("core.snippets.shorthands")
--- create a decleration of a function from it's definition using treesitter
---@param func string

View File

@ -1,5 +1,5 @@
require('core.snippets.shorthands')
require('core.snippets.functions')
require("core.snippets.shorthands")
require("core.snippets.functions")
--- shortcut to choose between java access modifiers
---@param idx number index of the node

View File

@ -1,47 +0,0 @@
require('core.snippets.shorthands')
return {
-- basic make template snippet
s("make", {
t({ "PKG_CONFIG = pkg-config", "CC = cc", "VERSION = " }),
i(1, "0.1"),
t({ "", "", "# flags and incs", "PKGS = " }),
i(2),
t({ "", "CFLAGS = -DVERSION=\\\"$(VERSION)\\\" -Wall" }),
i(3),
t({ "", "LIBS = `$(PKG_CONFIG) --libs --cflags $(PKGS)`" }),
i(4),
t({ "", "", "PREFIX = " }),
i(5, "/usr/local"),
t({ "", "MANDIR = $(PREFIX)/share/man" }),
t({ "", "", "all: " }),
i(6, "main"),
t({ "", "" }),
rep(6),
t(": "),
rep(6),
t({ ".o", "\t$(CC) *.o $(CFLAGS) $(LIBS) -o $@", "" }),
rep(6),
t(".o: "),
rep(6),
t({ ".c", "", "clean:", "\trm -f " }),
rep(6),
t({ " *.o", "", "install: " }),
rep(6),
t({ "", "\tmkdir -p $(PREFIX)/bin", "\tcp -f " }),
rep(6),
t({ " $(PREFIX)/bin", "\tchmod 755 $(PREFIX)/bin/" }),
rep(6),
t({ "", "\tmkdir -p $(MANDIR)/man1", "\tcp -f " }),
rep(6),
t({ ".1 $(MANDIR)/man1", "\tchmod 644 $(MANDIR)/man1/" }),
rep(6),
t({ ".1", "", "uninstall: " }),
rep(6),
t({ "", "\trm -f $(PREFIX)/bin/" }),
rep(6),
t(" $(MANDIR)/man1/"),
rep(6),
t(".1")
})
}

View File

@ -1,5 +1,5 @@
require('core.snippets.shorthands')
require('core.snippets.functions')
require("core.snippets.shorthands")
require("core.snippets.functions")
return {
-- header level 1, usually this has the same name as the file

View File

@ -1,4 +1,4 @@
require('core.snippets.shorthands')
require("core.snippets.shorthands")
return {
-- translate snippet

View File

@ -1,4 +1,4 @@
require('core.snippets.shorthands')
require("core.snippets.shorthands")
return {
s("php", {

View File

@ -1,5 +1,5 @@
require('core.snippets.shorthands')
require('core.snippets.functions')
require("core.snippets.shorthands")
require("core.snippets.functions")
return {
-- document snippet