-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Calling Telescope grapple tags causes Error 'Expected Lua number' #87
Comments
@erik-schmidt Thanks for raising this issue! I'm focusing on finishing up the rewrite for Grapple so I won't have time to fix telescope integration quite yet. I'm happy to accept a PR for it, if you're willing. Otherwise, I will address this when the rewrite is released. |
@erik-schmidt While the rewrite has not been released yet, it is relatively stable now. In addition, I fixed the telescope extension on that branch 🙂 Feel free to check out the |
@cbochs This was really quick, thank you! I will give it a go and test it. Regarding the PR for the telescope fix on the main branch, I will try to fix it on my free time. I am no expert in lua, but this could be a great learning opportunity. I try my best |
@cbochs I have checked out the
I have this in my config (using lazy.nvim): return {
"cbochs/grapple.nvim",
branch = "rewrite",
event = "VeryLazy"
} |
You know, I've been using v0.10 for so long I forgot that the rename of Edit: turns out there are a number of things which are new ( |
@erik-schmidt Everything looks to be functional in 0.9 now. With that all fixed up, I'll likely merge and release in the next few hours. But, if you do try the rewrite branch out and find any more issues, please let me know! |
@cbochs I have tested the new 0.10 release and I still have the exect same issue when calling Here is the full error message:
Am I missing something? (btw I am using the AstroNvim Distro) Edit: I don't want to come as ungrateful, I really like the new changes. Thank you for the hard work you are putting into this plugin! |
Hmm 🤔 I'm following the traceback here... Can you tell me what the result of the following two commands gives you? require("telescope.config").values
require("telescope.config").values.path_display |
I get an error if I try these commands:
If I print the results I get these results:
Will this help you? |
Ah, sorry. Those were not technically commands, but lua tables I was interested in. Try these commands:
Note: Prefer |
Ahh, I didn't know that! Now I have learned somthing new 😄 These are the results:
|
Ok, great! Can you see what printing this gives you?
|
Sure, here it is. It just gives a
|
This looks a bit like a telescope bug. Looking at the help docs for
Looking at local calc_result_length = function(truncate_len)
local status = get_status(vim.api.nvim_get_current_buf())
local len = vim.api.nvim_win_get_width(status.results_win) - status.picker.selection_caret:len() - 2
return type(truncate_len) == "number" and len - truncate_len or len
end It's expecting Also, it looks like right now you are using the In the mean time, I'll make a small tweak to the extension so that it doesn't try truncating the path. |
With the newest change this has been fixed and I can open the telescope window with tags without any issues. Thank you for the effort. I am going to close this issue. |
I have now tested the telescope window with tags and I get another error:
Can this be because of a telescope sorter I have? (I am using the fzy-sorter) |
From telescope's help docs:
Nope. That one is on me this time. As you can tell, I don't write telescope extensions that often. Should be fixed 🤞 in the most recent commit |
I have tested it and it works! It sorts the matching tag at the top. If I find the time I can also dig into the code and try to fix it. But for now this is more than enough for me. Since the bug has been fixed, I can close this issue. I appreciate your effort on this one, thank you! |
Hi, thank you for this great plugin! I was excited when I saw that telescope is now supported, which I missed coming from harpoon. I followed the guide on the README by firstly calling "require("telescope").load_extension("grapple")" and then calling "Telescope grapple tags", which is showing in the autocompletion menu of telescope when hitting tab (so I am assuming the first command worked correctly). When I have no tags saved, telescope opens without any saved tags, which is expected. Once I save a tag and try to call the "Telescope grapple tags" command, I get the following error:
my configuration for grapple:
I also tried to only install grapple with only the default configuration, but the error is still the same. Am I missing something?
The text was updated successfully, but these errors were encountered: