Comments (5)
Thanks for reporting.
from cmp-nvim-ultisnips.
We would need to change the keyword pattern for this. As I understood it, this is a Vim regex that the line needs to match in order to trigger completion of a completion item.
cmp-nvim-ultisnips/lua/cmp_nvim_ultisnips/source.lua
Lines 17 to 19 in 21f02b6
However changing it to something like "\\.\\*"
which should match any characters does not work for whatever reason (the snippet won't even show up then). PR / suggestions welcome.
from cmp-nvim-ultisnips.
Any workaround or solution?
from cmp-nvim-ultisnips.
Aha, I just understood that it might be wrong handling of the i
parameter (in-word expansion), and not the context thing.
from cmp-nvim-ultisnips.
I thought about this a but more and came to the conclusion that the keyword_pattern
is not the issue. The problem is that cmp
will not invoke completion when typing directly after an existing word.
Let's say that you have a snippet with mrm
as the trigger. Also assume that this is the buffer content and |
is the cursor position:
end|
Currently, nvim-cmp will only show words that contain all of the characters in end
. This is why the mrm
snippet will not be suggested.
So what nvim-cmp needs to support is the following:
After endm|
was typed, besides the words e
, en
, end
and endm
cmp needs to also match ndm
, dm
and m
. This way, if you have a snippet mdm
, it will be suggested because it starts with m
.
So I think you should open an issue on nvim-cmp
and include this as usecase.
from cmp-nvim-ultisnips.
Related Issues (20)
- Mapping causes error on system paste HOT 3
- Disabling autotrigger causes error HOT 9
- broken UltiSnips HOT 6
- Having issues with nested tabstop HOT 1
- No snippets in completion list? HOT 3
- Update support for new lua parser in treesitter HOT 3
- Strange error when trying to load ultisnips HOT 5
- Expand Snippet shows on the command line HOT 6
- When cmp is active, jump forward doesnt go forward. HOT 7
- Using tab to jump forward leaves a space before jumping forward HOT 6
- Snippetes with multiple options doesn't works HOT 1
- Possible bug when triggering snippet before the completion menu has opened for the first time
- If i set jump_forwards before expand, it has a lag before i can expand HOT 8
- Error detected while processing TextChangedI Autocommands for "*": HOT 16
- Not showing all honza/vim-snippets (but it still exists somehow) HOT 12
- Failed to load parser: uv_dlsym: dlsym(0x208d77c60, tree_sitter_Dockerfile): symbol not found HOT 1
- Many auto-snippets can not be trigger HOT 1
- E5108: Error executing lua Vim:E117: Unknown function: `UltiSnips#CanJumpForwards`, `UltiSnips#CanJumpBackwards`, and `UltiSnips#CanExpand` HOT 21
- Error detected while processing TextChangedI Autocommands for "*": HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cmp-nvim-ultisnips.