Skip to content

Commit d1619fa

Browse files
committed
doc
1 parent 0c242e2 commit d1619fa

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

Readme.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ It's capable of:
1010
- Load snipmate snippets.
1111
- Load VSCode snippets from coc extensions.
1212
- Load VSCode snippets from custom directories.
13-
- Load UltiSnips snippets from configuration folder.
13+
- Load UltiSnips snippets from configured folder.
1414
- Provide snippets as completion items.
1515
- Provide expand and expandOrJump keymaps for snippet.
1616
- Provide snippets list for edit snippet.
1717
- Provide `snippets.editSnippets` command for edit user snippets of current filetype.
1818

19+
**Note:** some features of ultisnips and snipmate format snippets not supported, checkout [faq](#faq).
20+
1921
## Why?
2022

2123
- Use same keys for jump placeholder.
@@ -88,11 +90,6 @@ Some ultisnips features are **not** supported:
8890
- [ ] Format related snippet options, including `t`, `s` and `m` (can't support).
8991
- [ ] Snippet actions (can't support).
9092

91-
**Note** coc-snippets convert UltiSnips snippets to textmate snippets and send
92-
it to coc's snippets manager, format snippets after snippet insert will not be
93-
supported except for placeholder transform which also supported by textmate
94-
snippet.
95-
9693
## Options
9794

9895
- `snippets.priority`: priority of snippets source, default `90`.
@@ -132,11 +129,17 @@ snippet.
132129
Python regular expression of UltiSnips would be converted to javascript regex, however some
133130
patterns are not supported, including `\u` `(?s)` `\Z` `(?(id/name)yes-pattern|no-pattern)`.
134131

135-
The failed snippets would not be loaded, you can checkout the errors by check output:
132+
## F.A.Q
133+
134+
**Q:** How to check if a snippet successfully loaded?
136135

137-
:CocCommand workspace.showOutput snippets
136+
**A:** Use command `:CocCommand workspace.showOutput snippets`
138137

139-
## F.A.Q
138+
**Q:** Some ultisnips snippet not works as expected.
139+
140+
**A:** Reformat after change of placeholder feature can't be supported for now,
141+
and some regex pattern can't be converted to javascript regex pattern, so the
142+
snippet can be failed to load.
140143

141144
**Q:** Where to get snippets?
142145

@@ -150,11 +153,11 @@ configuration from it.
150153

151154
**Q:** How to check jumpable or expandable at current position.
152155

153-
**A:** Use functions: `coc#expandable()` `coc#jumpable()` and `coc#expandableOrJumpable()`.
156+
**A:** Use functions provided by coc.nvim: `coc#expandable()` `coc#jumpable()` and `coc#expandableOrJumpable()`.
154157

155158
**Q:** It doesn't load snippets from [vim-go](https://github.com/fatih/vim-go).
156159

157-
**A:** It use `g:UltiSnipsSnippetDirectories` which is not supported, you can
160+
**A:** It uses `g:UltiSnipsSnippetDirectories` which is not supported, you can
158161
add settings:
159162

160163
```

0 commit comments

Comments
 (0)