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

original uppercase pattern of UltiSnips doesn't run in coc-snippets #62

Closed
sfpmld opened this issue Sep 16, 2019 · 7 comments
Closed

original uppercase pattern of UltiSnips doesn't run in coc-snippets #62

sfpmld opened this issue Sep 16, 2019 · 7 comments

Comments

@sfpmld
Copy link

sfpmld commented Sep 16, 2019

Hi, I've migrated to coc.snippets to take care of my snippets, but I have this pb with uppercase pattern.

I'm trying to have this pattern wich was working well with simple Ultisnips plugin but don't work with coc-snippets

snippet mongs "Mongoose Schema Boilerplate" b
const mongoose = require('mongoose');
const Schema = mongoose.Schema;

const ${1:schema_name}Schema = new Schema({
	${2:field_name}: {
		type: ${3:String|Number|Date|Object|Buffer|Boolean|Schema.Types.ObjectID},
		required: ${4:true|false},
		${5://...}
	},
	${6://...}
}${7:, \{ timestamps: true \}});


module.exports = mongoose.model('${1/\w+\s*/\u$0/g}',$1Schema);
endsnippet

if $1 = recipe : we would have mongoose.model('Recipe',recipeSchema);

Ultisnips plugin was expanding this pattern ${1/\w+\s*/\u$0/g} with the first letter in uppercase.
I really need this behaviour in coc-snippets.
Is it a bug?

My config:

versions

vim version: NVIM v0.4.0-1155-gc62690ccc
node version: v10.16.0
coc.nvim version: 0.0.74-c97d41aa1e
term: screen-256color
platform: linux

Output channel: snippets

thanks in advance
Have a good day!

@chemzqm
Copy link
Member

chemzqm commented Sep 16, 2019

We don't have \u$0 with javascript, duplicate of #20

@chemzqm chemzqm closed this as completed Sep 16, 2019
@sfpmld
Copy link
Author

sfpmld commented Sep 16, 2019

Ok thank you for your fast response!

@sfpmld
Copy link
Author

sfpmld commented Sep 16, 2019

I was thinking about possibility to keep using UltiSnips aside coc.nvim. Is this possible? Cause I'm using only coc for my autocompleting, and I like it. But I would like to be able to use original Ultisnips plugin to access some specifics features.

@chemzqm
Copy link
Member

chemzqm commented Sep 16, 2019

You can

@sfpmld
Copy link
Author

sfpmld commented Sep 17, 2019

What is your indications to do so. Cause when I just uninstall coc-snippets, specify directories of snippets for UltiSnips plugin. Unfortunatly, coc.nvim don't propose Ultisnips snipppets list. How to do so?

@chemzqm
Copy link
Member

chemzqm commented Sep 17, 2019

There is coc-ultisnips for completion of snippet trigger https://github.com/neoclide/coc-sources, but it's less featured than coc-snippets.

@sfpmld
Copy link
Author

sfpmld commented Sep 18, 2019

Thank you, I' ll give a try today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants