-
Notifications
You must be signed in to change notification settings - Fork 69
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
WikiTags can't work under gvim 9.1 or neovim 0.10 + win 10 pro #365
Comments
my VIMRC: Plug 'lervag/wiki.vim'
Plug 'junegunn/fzf'
Plug 'bullets-vim/bullets.vim'
if has('nvim')
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim'
endif and related plugin config: |
First, I would be very glad if you could try and improve your grammar. I don't say that to be rude, it's just that some of your sentences are very difficult to understand. I think there are many great tools available today, e.g. Google translate and ChatGPT and similar.
My first question is: what is the related configuration here? Is it the one you posted afterwards, i.e. https://github.com/VimWei/vim-init/blob/master/init/plugins.config/wiki.vim.vim? I'll assume so for the rest of my reply. The error message you are seeing is from fzf, I think here: https://github.com/junegunn/fzf/blob/590060a16b85270c19c605e8758cda16c4517086/plugin/fzf.vim#L1006 And it is quite hard to immediately understand what went wrong here. But I think it is this line: wiki.vim/autoload/wiki/fzf.vim Line 127 in 5943633
Perhaps you could help verify that. If you add the following code in that file on your side: function! s:accept_tag(input) abort "{{{1
let l:key = a:input[0]
+ let g:__test = [a:input]
let [l:tag, l:file, l:lnum] = split(a:input[1], ':')
+ let g:__test += ["done"] Then you repeat the steps you had to reproduce the error. After reproducing the error, can you report the output of
I know it seems trivial, but it is very good if you can be fully explicit about the config you are using. E.g., in this case, I believe you changed
I believe you are saying that vim.g.wiki_select_method = {
pages = require("wiki.telescope").pages,
tags = require("wiki.telescope").tags,
toc = require("wiki.telescope").toc,
links = require("wiki.telescope").links,
} Is my understanding correct? |
Yes, the related configuration is detailed in the following link: #365 (comment). After incorporating the
Yes, your understanding is entirely correct. I organize my vimrc in the following way: Each plugin's related configuration is stored in a file with the same name as the plugin, followed by a .vim extension, located in the vim-init/init/plugins.config/ directory. When I disable/enable a certain plugin, its related configuration is also disabled/enabled accordingly. This method makes it easier to enable or disable particular plugins and their configuration, preventing them from interfering with each other. For specific implementation, see: Therefore, I don't need to change any configurations in plugins.config/wiki.vim.vim and plugins.config/telescope.nvim.vim. I only need to modify whether the telescope plugin is enabled or not.
Thanks for your patience and understanding with my unclear expressions. Many of my previous expressions were actually completed with the help of ChatGPT, ^_^ |
Sorry for my very late reply - it's been a very busy month!
Ah, thanks, that explains the problem! Since you are on Windows, and since Windows uses the
:)
Yes, that sounds like a reasonable config concept.
Yes, I think you're right.
Let me know if my latest patch fixes things for you now.
No problem 😸 |
Thanks! I've upgraded the plugin and performed the same tests on Windows 10 Pro:
|
Great!
Huh. I think I missed this in your original report. I'll look into it. |
Again I think it is because of the Windows path thing. But I'm not immediately sure how to fix it. |
The problem is here: wiki.vim/lua/wiki/telescope.lua Lines 70 to 76 in ce6c49e
In line 72, we pass the file path to the value. The path is a full path and the value is what is used by telescope to open the file. Perhaps you could help investigate by adding something like this above the vim.g.__test = entry Then you can inspect the value afterwards with |
To be clear, it is somewhat hard for me to debug this because I don't use Windows. |
I would expect that entry is a list/table with three entries, where the second one is a full path like this:
Perhaps it will look like this instead:
And if it does, then that might be the problem here. Do you have |
Yes, I have
|
Can you check if you have the same problem if you disable shellslash?
This does in fact confirm my suspicion. I think, if you disable shellslash, that the path may become like a regular windows path with |
Alternatively, you could try to make the following change here: wiki.vim/lua/wiki/telescope.lua Line 72 in c60e6a5
- value = entry[2],
+ value = vim.fn.tr(entry[2], '/', '\\'), |
Disable shellslash, and test with
|
Ok, thanks. So, shellslash is not relevant here. I assume my suggested solution to apply the |
It does not help. |
Bummer. To be honest, I don't really have a clear idea of what is wrong here. I think we will need to debug this from your end. Are you familiar with Lua and some programming already? I believe the solution will require a small modification to the code in the picker function, here: wiki.vim/lua/wiki/telescope.lua Lines 37 to 81 in ce6c49e
I think the code until line 66 should be fine, really, and that this is related to the telescope API. But it's impossible to debug it for me since I can't reproduce it. |
gvim 9.1.0429 under win10 pro
:WikiTags
open a dialog with tag-page listenter
neovim 0.10 with telescope under win10 pro
:WikiTags
can work with default setting but not telescope under neovim 0.10 + win 10 pro, but neovim's defaultvim.ui.select
haven't filter.With telescope:
:WikiTags
open a dialog with tag-page listenter
compare:
:WikiTagSearch
and:WikiPages
can work both gvim and neovim(Regardless of whether Telescope is used) under win10 pro.The text was updated successfully, but these errors were encountered: