Comments (8)
what are you roughly expecting this to look like?
from cmp_luasnip.
Whenever the choice node is jumped to, all the possible choices are displayed in cmp (potentially excluding the currently selected one?) and the user can confirm their selection immediately causing it to expand. It would essentially be the same as this just integrated into cmp instead.
from cmp_luasnip.
I'm not really sure if integrating with cmp is possible as the sources just provide completion candidates and how to resolve them. A hacky way would be instead of passing snippets we pass in the choice node candidates when a choice node is active but that'd still leave the issue of completion candidate from other sources such as lsp/buffer polluting the completion menu.
@L3MON4D3 any thoughts on this?
from cmp_luasnip.
I believe it possible to specify source priorities such that if one source returns completions none of the others are queried which should solve the pollution issue. Can't really speak to the rest of the problem however.
from cmp_luasnip.
In case you're not aware @p0da, luasnip already has integration with vim.ui.select
for changing choices.
I'm not really sure if integrating with cmp is possible as the sources just provide completion candidates and how to resolve them.
I think it should be doable, take a look at this piece of code from the ui.select
-integration, something similar could be done in the execute
-function of a source.
cmp_luasnip
could provide a second source for the choices only, then the priority for it could be modified without affecting the snippets.
from cmp_luasnip.
I think it should be doable, take a look at this piece of code from the ui.select-integration, something similar could be done in the execute-function of a source.
I can definitely try this out. Will try to create a PR in a few days once I have some time π
from cmp_luasnip.
Nice, looking forward to itπ
from cmp_luasnip.
@L3MON4D3 @p0da do you guys want to try out #45?
from cmp_luasnip.
Related Issues (20)
- No longer directly access `ls.snippets` HOT 3
- Keep getting sporadic errors (may be related to packer.nvim?) HOT 7
- attempt to index local 'snip' (a nil value) HOT 7
- Help wanted: Treesitter highlight lost after enabling cmp_luasnip HOT 4
- Plugin license HOT 5
- getting this error when autocompleting HOT 6
- Create tag when version requirement changes HOT 1
- Postfix snippets not shown or shown too late HOT 12
- Is there any ways to remove `~` in snippet completion window? HOT 3
- Sources appear in `LuaSnipListAvailable` but not in cmp suggestions list HOT 10
- Filter snippets by condition HOT 3
- Neovim freezing when pressing Tab HOT 3
- Neovim freezing
- Can't install plugin HOT 2
- module 'cmp' not found HOT 4
- Jump to placeholders in snippet HOT 2
- Respect `trigEngine`. HOT 1
- How to trigger expand on <C-n>? HOT 4
- Prevent putting the same information twice in documentation HOT 2
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_luasnip.