diff options
| author | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2022-09-24 12:09:01 +0200 |
|---|---|---|
| committer | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2022-09-24 12:09:01 +0200 |
| commit | 787f25f886259081676f47b6a7b45a9b58293576 (patch) | |
| tree | 9503a5b85c44e1d2c649159c53dfeb478b6709bc /lua/alpha/composer.lua | |
| parent | a3e663dd61a23f8882843a249beb9375ee9f0362 (diff) | |
| download | nvim-conf-787f25f886259081676f47b6a7b45a9b58293576.tar.gz nvim-conf-787f25f886259081676f47b6a7b45a9b58293576.zip | |
Extract composer, set file creator as part of php actions
Diffstat (limited to 'lua/alpha/composer.lua')
| -rw-r--r-- | lua/alpha/composer.lua | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/lua/alpha/composer.lua b/lua/alpha/composer.lua deleted file mode 100644 index 4792979..0000000 --- a/lua/alpha/composer.lua +++ /dev/null @@ -1,32 +0,0 @@ -local M = {} - -local function get_composer_file() - if vim.fn.findfile("composer.json") ~= "" then - return vim.fn.json_decode(vim.fn.readfile(vim.fn.getcwd() .. "/composer.json")) - end - - if vim.fn.findfile("master/composer.json") ~= "" then - return vim.fn.json_decode(vim.fn.readfile(vim.fn.getcwd() .. "/master/composer.json")) - end - - return nil -end - -M.query = function (path) - local target = get_composer_file() - - if target == nil then - return nil - end - - for _, part in ipairs(path) do - target = target[part] - if target == nil then - return nil - end - end - - return target -end - -return M |