doomemacs / doomemacs/core

Yasnippet opens for select snippet even when only has one option on typescript-tsx-mode

Open
#6,050 0 comments 1 reaction 0 assignees View on GitHub
is:bug needs-triage
Dominant language
Emacs Lisp
Stars
22.7k
Forks
3.1k
Avg merge
10h 46m
Merged PRs (30d)
4

Description

### What did you expect to happen?

just inserts the snippet.

### What actually happened?

- When the snippet is only derived from typescript:
It just inserts (example: function)

- When the snippet is defined on web-mode AND typescript, it pops the window to select a snippet, but only the web-mode can be selected (has only one selection). Example: Create an snippet with `if` and save it on web-mode. Call if.

- When snippet is saved for typescript-tsx-mode (with yas-new-snippet on .doom.d) and has a snippet with same name on rjsx mode, if will pop the window to select a snippet with just 1 item (and only rjsx can be selected)

### Describe your attempts to resolve the issue

_No response_

### Steps to reproduce

- Create a snippet for web-mode with key = if
- Open a .tsx file
- Press if and call yas-expand

### System Information

https://pastebin.com/95w0Qi6R

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.