Closed physicophilic closed 3 years ago
Seems like #167 describes the solution? I tried adding default_pattern=[[\w*]]
, which seems to fix the issue. That restricts the completion options from buffer to only alpha-numerics. Is this the optimal way?
Hm.... Sorry. this issue is a bit difficult with my English skills...
I can't think nvim-compe breaks ultisnips tab
expansion behavior... it's very weird.
(I can believe if you claims nvim-compe doesn't show ultinsips completion
)
It’s okay! No problem! I know some Japanese so let me try that.
Tashkani ultisnips snippets o complete koto ga dekimasu. Mondai sore ja nai. Buffer source o tsukatte toki ultisnips no tab ga chotte dake kowarimasu. Sore dake desu.
Tatoeba snippet ga buffer no words to onaji nattara, snippet no execution jikan ni nvim-compe no pop up ga ikimasu. Sono ato tab wa kikanai.
Sono tame ni buffer ‘default_pattern’ o [[\w\+]]
set kuretanda, soshite ‘tab’ wa ima ok desu. #167 to onaji desu.
chotto shitsumon wa kore deshita: kono pattern wa best desu ka? Anata no default pattern wa osoraku ‘{,},^..}’ o recognise kuretanda. Kore wa ‘[A-Za-z0-9]’ dake o recognise ga dekimasu. Sore ni, buffer no kotoba to betsu nani mono o complete koto no hitsuyo wa arimasu ka?
Nihongo de ayamachi o yurushtekudasai demo kono ato mo romaji de hanasu koto no hitsuyo nara oshiete kudasai.
Arigatou! Hopefully I have conveyed it to you!
@physicophilic I'm very surprised by your Japanese!!! Your Japanese is very well and thank you for your effort. But someone might see this issue for finding information so I think English is better.
The nvim-compe's default pattern is the following.
[['\%(-\?\d\+\%(\.\d\+\)\?\|\h\w*\%(-\w*\)*\)']]
I think it recognize word
, saneke_case
, kebab-case
, 0.1
, -0.1
, 1
and -1
.
The word's pattern is \h\w*\%(-\w*\)*
.
I think [\h\w*\%(-\w*\)*
is very similar to \w\+
.... it's weird...
Thank you @hrsh7th ! I learnt most of it from anime. Once took an N5 course at college to watch more anime without subtitles 😄
I think you're right. I have been trying to work but the problem is still there. The reason is something else. I don't know what I should do.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Checkhealth
Describe the bug
I like using buffer source in markdown. But after writing a lot, my snippet tabstops start to fail. I can't tab through them. See the example below.
Add the snippets to
/.config/nvim/UltiSnips/markdown.snippets
and
To Reproduce
Steps to reproduce the behavior with the minimal config:
mk
--->$|$
then$atd$
-->$a^{|}$
--->$a^{d |}$
. Here|
is the cursor. Hitting tab twice will reveal the error. It happens 90% of the timesActual vs expected behaviour
1 tab should give
$a^{d}|$
which it does. 2 tabs should give$a^{d}$|
, which it does not 90% of times.Try deleting all text from buffer and try it again; then it works 100% times.
Additional context (optional)
I think some time variable can be adjusted to prevent this behaviour?
And thank you for the plugin!
Edit: I forgot to add that
minimal.vim
problem vanishes.buffer
source only tries to complete 'words'? After all I don't want buffer to complete anything with{,}, (,
etc..