vscode-markdown-notes icon indicating copy to clipboard operation
vscode-markdown-notes copied to clipboard

[Bug] auto-complete for wiki-links doesn't work

Open thgie opened this issue 4 years ago • 16 comments

Window 10 (up to date) VS Code 1.44.1

I had peeking working yesterday, but since I reinstalled the package that doesn't work either anymore. Can I somehow give you more relevant information?

thgie avatar Apr 17 '20 05:04 thgie

I pushed a new version yesterday. Possible i broke something. Lemme investigate

kortina avatar Apr 17 '20 14:04 kortina

I just checked my machine and peeking still works for me (I have not changed anything with that either).

Can you provide:

  • full path to the file you are editing when you try to peek
  • full line of text including the [[wiki-link]] you are trying to peek
  • full path to the file in the [[wiki-link]] you are trying to peek

Possible there is some difference where this works on Mac / Unix but not windows, but I do not have a windows machine so hard to test.

Also, is auto-complete still working? Or is it just peek that is broken?

kortina avatar Apr 17 '20 15:04 kortina

Thanks for going after the issue :)

auto-complere as well as peek are not working at the moment.

C:\Users\adria\Earth\Notes\Wiki\ideas-for-workshops-practices.md

# Ideas for Workshops / Practices

* List-making as a participatory, democratic practice
* Beating the bounds to bond to the grounds
* Oral Storytelling

[[daniel.md]

C:\Users\adria\Earth\Notes\Wiki\daniel.md

thgie avatar Apr 17 '20 15:04 thgie

Hi, I'm a Mac user, and I'm also seeing that peeking is not working for wiki links. I just downloaded this extension a few days ago and auto-complete was working before, so it may be an issue with the recent version.

MacOS: Catalina 10.15.3 VS Code Version: 1.44.2 VS Code Markdown Notes: 0.0.4

[Edit: Auto-complete doesn't seem to be working with date timestamp I prefix to my file names, but it is working when I start typing the subsequent name of the file. Peeking is still not working, however]

sahn avatar Apr 18 '20 07:04 sahn

@thgie:

I am unable to reproduce. I did:

cd tmp/
mkdir -p Earth/Notes/Wiki/
pbpaste > Earth/Notes/Wiki/ideas-for-workshops-practices.md # with your note text in clipboard
echo "_____DANIEL____" > Earth/Notes/Wiki/daniel.md
cd Earth/Notes/
code .

When I edited ideas-for-workshops-practices.md I DO to get completion and peek to work for daniel.md

@sahn

Can you provide the following info?

  • Full path to workspace directory: [eg /Users/kortina/notebook]
  • Full path to file editing: [eg /Users/kortina/journal.md]
  • Full path to file whose name should be completing (or the file you are trying to Peek): [eg /Users/kortina/books.md] (if applicable)
  • Full path to file containing tags that should be completing: [eg /Users/kortina/gravitys-rainbow.md] (if applicable)
  • Your vscodeMarkdownNotes.workspaceFilenameConvention setting: [eg uniqueFilenames or relativePaths]

@thgie @sahn

Can you both try doing the following:

  • Checkout the repo: git clone [email protected]:kortina/vscode-markdown-notes.git
  • Open the test notebook directory: cd vscode-markdown-notes/test && code .
  • Open top.md in the test workspace in VS Code
  • [ ] typing [[t, triggerSuggest (⌃Space by default) gives completions: test.md, top.md
  • [ ] typing [[s, triggerSuggest (⌃Space by default) gives completions: sub.md, sub2.md
  • [ ] typing #a, triggerSuggest (⌃Space by default) gives completions: #another_tag, #tag
  • [ ] typing [[test.md]], moving cursor over this word, peekDefinition (⌥F12 by default) opens Peek Definition window
  • Did your bug occur in the test directory?
    • [ ] Yes
    • [ ] No

This will help determine if the issue is with your workspace or the extension.

ALL:

I built and uploaded previous versions of the extension here: https://github.com/kortina/vscode-markdown-notes/releases

If you want, you can try getting the vsix files for previous versions to see if this is a regression (I don't see what would cause it, looking at the code...) or an issue that has always existed.

kortina avatar Apr 18 '20 16:04 kortina

I'm having a similar issue - I haven't had a chance to test your solution above, but just to report someone else seeing it. I didn't have it working before though, this is my first time using it.

cpopell avatar Apr 22 '20 08:04 cpopell

This also doesn't work for me in your test directory, also new note command doesn't work for me either. Thanks for creating this, I've not much experience but I'll have a look at trying to debug this at some point if a fix isn't found!

crystalthoughts avatar Apr 26 '20 13:04 crystalthoughts

Hmm, ok, thanks for checking in the test directory, @danvenn. My guess is it is either:

  1. OS problem (but will need help from someone w a windows machine to debug, probably someone a little technical)
  2. A conflict with another extension

@danvenn @cpopell - what OS are y'all on?

Re New Note Command - I did recently notice an issue (I think with a recent VS Code release) where my alt+n keybinding (suggested in the README) stopped working. I had to rebind to alt+shift+n to get it working - must have been some sort of conflict with new defaults. For those having issues with New Note, does the cmd+shift+p (open command palette), typing "New Note," and selecting "VS Code Markdown Notes: New Note" work? If so, it might be a problem w just the keybinding. If not, something is up with the command.

kortina avatar Apr 26 '20 15:04 kortina

I may or may not be as technical as needed but I'll try to set aside some time with the debug directory tomorrow.

cpopell avatar Apr 27 '20 03:04 cpopell

And I'm on Windows. I can give you an extension list.

cpopell avatar Apr 27 '20 03:04 cpopell

I'm on Windows 10.

OK, disabling my extensions didn't change much, but reinstalling this one did. I can't say why that made a difference but it's working a bit better.

Holding ctrl on your test.md, only these two work as links, which is as designed right? :

  • [[test.md]]
  • [[sub.md]]

I made my own markdown directory elsewhere and it works - except for when there are spaces in filename! That may have been throwing me off initially because my personal markdown files all have spaces.

The new note command palette has the same issue as before - it asks for a filename but doesn't create it.

crystalthoughts avatar Apr 27 '20 09:04 crystalthoughts

@danvenn - we're planning to add support for _ as another separator in note names, but I'm really not sure about the spaces in filenames. (1) I think it's just a little messy (personal bias) but (2) I think it might complicate some of the regex matching within files in tricky ways. I would definitely want to have more robust testing of the regex matching if we were going to look into this as an option.

kortina avatar May 11 '20 04:05 kortina

Hi there,

I faced the same issue. Thanks to the test folder provided by kotina I realized that the amount of files in my workspace was too big for Markdown Notes to autocomplete

Removing some folders from my workspace fixed this issue.

It would be great if Markdown Notes could handle numerous files, but that's no big deal (I candidate to make complementary tests if that can help)

Thanks a lot for this great extension

Update: I've tested Markdown Link Suggestion on my initial workspace and the completion is quite fast. Maybe you can find there some bits of codes to get inspired

iaeiou avatar Jan 31 '21 04:01 iaeiou

@iaeiou how many files and folders did you have in your workspace?

kortina avatar Jan 31 '21 06:01 kortina

@iaeiou how many files and folders did you have in your workspace?

1550 files, a mix containing HTML, CSS and Markdown

iaeiou avatar Jan 31 '21 06:01 iaeiou

Same problem, probably because of the amount of files as well: 827 files, of which 70 files markdown.

Would be great if this extension could handle those amounts.

gijswijs avatar Mar 02 '21 07:03 gijswijs