{"action":"created","issue":{"url":"https://api.github.com/repos/Vigemus/impromptu.nvim/issues/2","repository_url":"https://api.github.com/repos/Vigemus/impromptu.nvim","labels_url":"https://api.github.com/repos/Vigemus/impromptu.nvim/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/Vigemus/impromptu.nvim/issues/2/comments","events_url":"https://api.github.com/repos/Vigemus/impromptu.nvim/issues/2/events","html_url":"https://github.com/Vigemus/impromptu.nvim/issues/2","id":379458243,"node_id":"MDU6SXNzdWUzNzk0NTgyNDM=","number":2,"title":"Some issues testdriving","user":{"login":"KillTheMule","id":4117685,"node_id":"MDQ6VXNlcjQxMTc2ODU=","avatar_url":"https://avatars2.githubusercontent.com/u/4117685?v=4","gravatar_id":"","url":"https://api.github.com/users/KillTheMule","html_url":"https://github.com/KillTheMule","followers_url":"https://api.github.com/users/KillTheMule/followers","following_url":"https://api.github.com/users/KillTheMule/following{/other_user}","gists_url":"https://api.github.com/users/KillTheMule/gists{/gist_id}","starred_url":"https://api.github.com/users/KillTheMule/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KillTheMule/subscriptions","organizations_url":"https://api.github.com/users/KillTheMule/orgs","repos_url":"https://api.github.com/users/KillTheMule/repos","events_url":"https://api.github.com/users/KillTheMule/events{/privacy}","received_events_url":"https://api.github.com/users/KillTheMule/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-11-10T20:22:26Z","updated_at":"2018-11-15T15:00:43Z","closed_at":"2018-11-15T14:44:38Z","author_association":"NONE","body":"Hey,\r\n\r\nfirst of all, thanks for this, it's very promising and just what I need. Some issues though, they might be a result of the incomplete documentation, but I could not figure them out.\r\n\r\nFirst of all, here's the what I'm using\r\n\r\n```lua\r\nlocal function cardmenu()\r\n  local impromptu = require(\"impromptu\")\r\n\r\n  local opts = ...\r\n\r\n  impromptu.core.ask{\r\n    question = \"Navigate over the tree\",\r\n    options = opts,\r\n    handler = function(_, opt)\r\n      print(opt)\r\n      return true\r\n    end\r\n  }     \r\nend\r\n```\r\n\r\nThis seems to work. However, adding\r\n\r\n```lua\r\nlocal opts = {\r\n  Aux = {\r\n    description = \"Auxiliaries\",\r\n    key = \"A\",\r\n    children = {\r\n      GRP = { description = \"Group\" },\r\n      CDATA = { description = \"Cdat\", item = \"asdf\" }\r\n    }\r\n  },\r\n}\r\n```\r\n\r\nresults in an error, because on line 75 of `init.lua`, `h` is a nil value. Using the following makes the error go away:\r\n\r\n```lua\r\nlocal opts = {\r\n  Aux = {\r\n    description = \"Auxiliaries\",\r\n    key = \"A\",\r\n    children = {\r\n      GRP = { description = \"Group\" },\r\n      CDATA = { description = \"Cdat\", item = \"asdf\" }\r\n    }\r\n  },\r\n  one = {\r\n    description = \"Item 1\",\r\n    key = \"X\",\r\n    children = {\r\n      eleven = {description = \"Item 11\"},\r\n      twelve = {description = \"Item 12\"},\r\n    }\r\n  },\r\n}\r\n```\r\n\r\nso it seems connected to the number of options or something.\r\n\r\nNow the menu is basically working, but:\r\n\r\n1. `A` is not used as a key for the first menu, but `r` (also, \"X\" isn't the key for \"Item1\").\r\n2. The order of the items is different than in the options table. That's surprising. How can I influence the ordering?\r\n2. When going down to the `CDATA` item, the handler actually prints `CDATA`, while it should print `asdf`.\r\n\r\nAlso, could you point out what I can do with the \"session\" object in the handler? It might be what I need... actually, I might need the \"breadcrumbs\" mentioned [here](https://github.com/Vigemus/impromptu.nvim/blob/master/docs/tree-based.md).\r\n\r\nAs far as docs go, could you explain why [in this code](https://github.com/Vigemus/impromptu.nvim/blob/master/docs/tree-based.md#how-to) the item `child` is not a leave value? Or did I misinterpret it?\r\n\r\nThanks again :)"},"comment":{"url":"https://api.github.com/repos/Vigemus/impromptu.nvim/issues/comments/439069649","html_url":"https://github.com/Vigemus/impromptu.nvim/issues/2#issuecomment-439069649","issue_url":"https://api.github.com/repos/Vigemus/impromptu.nvim/issues/2","id":439069649,"node_id":"MDEyOklzc3VlQ29tbWVudDQzOTA2OTY0OQ==","user":{"login":"KillTheMule","id":4117685,"node_id":"MDQ6VXNlcjQxMTc2ODU=","avatar_url":"https://avatars2.githubusercontent.com/u/4117685?v=4","gravatar_id":"","url":"https://api.github.com/users/KillTheMule","html_url":"https://github.com/KillTheMule","followers_url":"https://api.github.com/users/KillTheMule/followers","following_url":"https://api.github.com/users/KillTheMule/following{/other_user}","gists_url":"https://api.github.com/users/KillTheMule/gists{/gist_id}","starred_url":"https://api.github.com/users/KillTheMule/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KillTheMule/subscriptions","organizations_url":"https://api.github.com/users/KillTheMule/orgs","repos_url":"https://api.github.com/users/KillTheMule/repos","events_url":"https://api.github.com/users/KillTheMule/events{/privacy}","received_events_url":"https://api.github.com/users/KillTheMule/received_events","type":"User","site_admin":false},"created_at":"2018-11-15T15:00:43Z","updated_at":"2018-11-15T15:00:43Z","author_association":"NONE","body":"Thanks! Is [this](https://github.com/Vigemus/impromptu.nvim/issues/2#issuecomment-437619556) supposed to be fixed? I'm still seeing it."}}
{"actor":{"display_login":"KillTheMule"}}