From 5b2542081b433fd24dc4ae35335a767815e5d986 Mon Sep 17 00:00:00 2001 From: Ariel D'Alessandro Date: Fri, 3 Feb 2023 11:14:46 +0100 Subject: fix: fix the unpact of the tree sitter. fix some names --- lua/alpha/php/gateway.lua | 8 ++++---- lua/plugins/colorscheme.lua | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'lua') diff --git a/lua/alpha/php/gateway.lua b/lua/alpha/php/gateway.lua index 51f230b..614c4f2 100644 --- a/lua/alpha/php/gateway.lua +++ b/lua/alpha/php/gateway.lua @@ -26,7 +26,7 @@ local get_all_definitions = function() return mutations_definitions end --- "'@=mutation(\"App\\\\GraphQL\\\\Mutation\\\\ImageMutation::deleteVehicleImage\", args[\"inspectionId\"], args[\"url\"], info)'", +-- "'@=mutation(\"App\\\\GraphQL\\\\Mutations\\\\Mutation::action\", ...)'", local open_resolver = function(resolver) -- need to parse to get this values local args = string.match(resolver, "'@=mutation%((.+)%)'") @@ -44,7 +44,7 @@ local open_resolver = function(resolver) fqn = string.gsub(fqn, "\\\\", "\\") -- P(fqn) - R("alpha.php.lsp").find(fqn, "phpactor") + require("alpha.php.lsp").find(fqn, "phpactor") end --- @param bufnr integer Buff id @@ -75,7 +75,7 @@ gateway.get_graphql_definitions = function(bufnr) local parsers = require "nvim-treesitter.parsers" local parser = parsers.get_parser(bufnr) - local tree = unpack(parser:parse()) + local tree = parser:parse()[1] for id, node in query:iter_captures(tree:root(), bufnr) do if query.captures[id] == "mutation" then @@ -104,7 +104,7 @@ gateway.graphql_definitions = function(opts) entry_maker = function(entry) -- buffer = 43, -- lnum = 82, - -- resolver = "'@=mutation(\"App\\\\GraphQL\\\\Mutation\\\\ImageMutation::deleteVehicleImage\", args[\"inspectionId\"], args[\"url\"], info)'", + -- resolver = "'@=mutation(\"App\\\\GraphQL\\\\Mutation\\\\Mutation::action\", ...)'", -- value = "deleteVehicleImage" return { value = entry, diff --git a/lua/plugins/colorscheme.lua b/lua/plugins/colorscheme.lua index ca323b8..322161b 100644 --- a/lua/plugins/colorscheme.lua +++ b/lua/plugins/colorscheme.lua @@ -4,7 +4,7 @@ return { priority = 1000, config = function() require("tokyonight").setup { - style = "night", + style = "moon", } vim.cmd.colorscheme "tokyonight" end, -- cgit v1.2.3