From 1a13d2375bad70b372b89cd06beb3c726ed93f5c Mon Sep 17 00:00:00 2001 From: Ariel D'Alessandro Date: Sat, 19 Feb 2022 21:04:27 +0100 Subject: update snippets, treesitter config --- lua/alpha/snips/ft/php.lua | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) (limited to 'lua/alpha/snips/ft/php.lua') diff --git a/lua/alpha/snips/ft/php.lua b/lua/alpha/snips/ft/php.lua index 4e2506f..6de8114 100644 --- a/lua/alpha/snips/ft/php.lua +++ b/lua/alpha/snips/ft/php.lua @@ -98,18 +98,18 @@ local M = { declare(strict_types=1); -namespace []; +namespace {}; -class [] -{ - [] -} +class {} +{{ + {} +}} ]], { f(namespace), f(class_name), i(0), - }, { delimiters = "[]"}), + }), _c = { d(1, visibility, {}, "public"), @@ -127,6 +127,26 @@ class [] t {"", ") {", "}"}, }, + fn = { + d(1, visibility, {}, "public"), + t(" function "), + i(2, "name"), + t("("), + i(3, "$arg"), + t(")"), + c(4, { + t(""), + snippet_from_nodes(nil, { + t(': '), + i(1, "void"), + }), + }), + newline "{", + newline "\t", + i(0, ""), + newline "}", + }, + pro = { d(1, visibility, {}, "private"), t " ", -- cgit v1.2.3