diff options
| author | Ariel D'Alessandro <ariel.dalessandro@auto1.com> | 2022-06-17 17:39:56 +0200 |
|---|---|---|
| committer | Ariel D'Alessandro <ariel.dalessandro@auto1.com> | 2022-06-17 17:39:56 +0200 |
| commit | 09361db9ee52be27ddb27320eda8121223330f04 (patch) | |
| tree | 186b2f6d6b2391739e150f49dcffe1891702bb9d /lua/alpha/php_code_actions.lua | |
| parent | 03436a47918c8c5229e435481cafdae61dd67fc5 (diff) | |
| download | nvim-conf-09361db9ee52be27ddb27320eda8121223330f04.tar.gz nvim-conf-09361db9ee52be27ddb27320eda8121223330f04.zip | |
commits from laptop
Diffstat (limited to 'lua/alpha/php_code_actions.lua')
| -rw-r--r-- | lua/alpha/php_code_actions.lua | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lua/alpha/php_code_actions.lua b/lua/alpha/php_code_actions.lua index f43245b..3d6b5e9 100644 --- a/lua/alpha/php_code_actions.lua +++ b/lua/alpha/php_code_actions.lua @@ -45,7 +45,9 @@ vim.treesitter.set_query( ]] ) -local php_setter_getter_actions = { +local M = {} + +M.php_setter_getter_actions = { method = null_ls.methods.CODE_ACTION, filetypes = { "php" }, generator = { @@ -86,6 +88,7 @@ local php_setter_getter_actions = { for _, match in comment_query:iter_matches(test_node, 0) do for _, subNode in pairs(match) do local type = get_node_text(subNode, 0) + P(type) if type ~= "null" then table.insert(property_types, type) else @@ -94,6 +97,7 @@ local php_setter_getter_actions = { end end + P(property_types) local getter = generator.getGetter(property_name, nullable, property_types) local setter = generator.getSetter(property_name, nullable, property_types) @@ -126,6 +130,5 @@ local php_setter_getter_actions = { end, }, } --- uncomment when not developing this -null_ls.reset_sources() -null_ls.register(php_setter_getter_actions) + +return M |