From 3df9682eaf9adde3a8e8f7ef03328df37303178a Mon Sep 17 00:00:00 2001 From: Ariel D'Alessandro Date: Mon, 20 Jun 2022 11:50:16 +0200 Subject: fix class generator --- lua/alpha/snips/ft/php.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua/alpha') diff --git a/lua/alpha/snips/ft/php.lua b/lua/alpha/snips/ft/php.lua index daf1e77..2d69abc 100644 --- a/lua/alpha/snips/ft/php.lua +++ b/lua/alpha/snips/ft/php.lua @@ -32,7 +32,7 @@ local visibility = function(position, default) end local namespace = function() - local dir = vim.fn.getcwd() + local dir = vim.fn.expand("%:h") local autoloads = vim.call("composer#query", "autoload.psr-4") if autoloads == nil then return (dir:gsub("^%l", string.upper)) -- cgit v1.2.3