aboutsummaryrefslogtreecommitdiffstats
path: root/lua/alpha/snips
diff options
context:
space:
mode:
authorAriel D'Alessandro <dalessandro.ariel@gmail.com>2022-09-09 08:47:02 +0200
committerAriel D'Alessandro <dalessandro.ariel@gmail.com>2022-09-09 08:47:02 +0200
commitb5af6000bdacef641182bd094dc23908dde14110 (patch)
treeafdfc5fcb4fe871c0bdb25839f8ed3c02675ed94 /lua/alpha/snips
parent7d5683672cdf1d73914b637b7266e5602f3ac34b (diff)
downloadnvim-conf-b5af6000bdacef641182bd094dc23908dde14110.tar.gz
nvim-conf-b5af6000bdacef641182bd094dc23908dde14110.zip
Add composer check locally to avoid needing external library for that
Diffstat (limited to 'lua/alpha/snips')
-rw-r--r--lua/alpha/snips/ft/php.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/lua/alpha/snips/ft/php.lua b/lua/alpha/snips/ft/php.lua
index 41272a7..dbd872e 100644
--- a/lua/alpha/snips/ft/php.lua
+++ b/lua/alpha/snips/ft/php.lua
@@ -1,4 +1,5 @@
local ls = require("luasnip")
+local composer = require("alpha.composer")
local snippet_from_nodes = ls.sn
local c = ls.choice_node
@@ -33,8 +34,7 @@ end
local namespace = function()
local dir = vim.fn.expand("%:h")
- -- replace this since I don't want to use this composer
- local autoloads = vim.call("composer#query", "autoload.psr-4")
+ local autoloads = composer.query({"autoload", "psr-4"})
if autoloads == nil then
return (dir:gsub("^%l", string.upper))
end