Skip to content
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

Some snippet bugs #883

Closed
shengchao-lin opened this issue Oct 15, 2018 · 12 comments
Closed

Some snippet bugs #883

shengchao-lin opened this issue Oct 15, 2018 · 12 comments
Labels
snippets Issue is related to snippets

Comments

@shengchao-lin
Copy link

shengchao-lin commented Oct 15, 2018

Description

Some snippet like ** will not work completely even I press Tab afterward.
Some snippet like @6 work if I press Tab but no suggestion window popped up.

Sorry didn't have time to test all the snippets.

Additional Information

System: MacOS 10.14
VSCode and LaTeXworkshop: latest

@tecosaur
Copy link
Contributor

I forget the precise details but this is a vs code issue, I believe it's to do with having special characters in snippets.

@shengchao-lin
Copy link
Author

I forget the precise details but this is a vs code issue, I believe it's to do with having special characters in snippets.

Could it be because some snippet has special meaning to the editor?
@/ and @( seems similar but the former one doesn't work.

Also, all snippets work if import from Command+Shift+P "Show All Command" window.

@tecosaur
Copy link
Contributor

This may help you, I know at one point I experienced the same issue. I looked at my settings.json and one of these might help you:

    "editor.snippetSuggestions": "top",
    "editor.suggestSelection": "recentlyUsedByPrefix",
    "editor.tabCompletion": "onlySnippets",
    "editor.quickSuggestionsDelay": 0,

@jlelong
Copy link
Collaborator

jlelong commented Oct 15, 2018

Please check the closed issues labelled with snippets.

@shengchao-lin
Copy link
Author

Please check the closed issues labeled with snippets.

I've checked those issues, but none of them seems to work this time.
I believe it's not autocompletion's problem.

@shengchao-lin
Copy link
Author

Please check the closed issues labeled with snippets.

I've checked the setting.

Here is the solution, if the editor.snippetSuggestions is set to onlySnippets, Tab will work.
The default on option won't work.

But still, no suggestion window pops, it still might be a bug.

@jlelong
Copy link
Collaborator

jlelong commented Oct 15, 2018

There is no suggestion window popup for ** but it should work for all the others. Do you confirm?

@shengchao-lin
Copy link
Author

There is no suggestion window popup for ** but it should work for all the others. Do you confirm?

Not all others works, ** is just an example, like @/ doesn't have popup either.
Sorry, I don't have a full list of what doesn't have popup windows.

@jlelong
Copy link
Collaborator

jlelong commented Oct 15, 2018

Except **, all the other snippets work on my installation. Note that snippets do not work on lines longer than 100 characters if cursor is nat at the end of line because of a bug in vscode.

@shengchao-lin
Copy link
Author

Except **, all the other snippets work on my installation. Note that snippets do not work on lines longer than 100 characters if cursor is nat at the end of line because of a bug in vscode.

That's interesting, did you also set to onlySnippets?
Also, I believe this is independent to 100 characters bug.

@jlelong
Copy link
Collaborator

jlelong commented Oct 16, 2018

I have "editor.snippetSuggestions": "inline".

@jlelong jlelong added the snippets Issue is related to snippets label Oct 16, 2018
@jlelong jlelong closed this as completed Nov 13, 2018
jlelong added a commit that referenced this issue Dec 12, 2018
This is a regex to determine what a word is for the LaTeX language. This
is used by vscode to trigger intellisense.
See https://code.visualstudio.com/docs/extensionAPI/extension-points#_contributeslanguages

This finally fixes #609 #669 801 #837 #857 #883 #1059 and possible
others.
@jlelong
Copy link
Collaborator

jlelong commented Dec 12, 2018

Everything should be properly fixed now. To have intellisense automatically triggered inside snippets, set "editor.suggest.snippetsPreventQuickSuggestions": false.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
snippets Issue is related to snippets
Projects
None yet
Development

No branches or pull requests

3 participants