diff options
| author | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2022-09-09 08:47:02 +0200 |
|---|---|---|
| committer | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2022-09-09 08:47:02 +0200 |
| commit | b5af6000bdacef641182bd094dc23908dde14110 (patch) | |
| tree | afdfc5fcb4fe871c0bdb25839f8ed3c02675ed94 /lua/alpha/snips/ft/php.lua | |
| parent | 7d5683672cdf1d73914b637b7266e5602f3ac34b (diff) | |
| download | nvim-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/ft/php.lua')
| -rw-r--r-- | lua/alpha/snips/ft/php.lua | 4 |
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 |