Skip to content
This repository was archived by the owner on Oct 13, 2021. It is now read-only.

Commit b8544fa

Browse files
committed
fix: Refactor variable name
1 parent 78d8686 commit b8544fa

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ supported.
1111
- Asynchronous completion using the `libuv` api.
1212
- Automatically open hover windows when popupmenu is available.
1313
- Automatically open signature help if it's available.
14-
- Snippets integration with UltiSnips and Neosnippet and Vsnip.
14+
- Snippets integration with UltiSnips and Neosnippet and vim-vsnip.
1515
- Apply *additionalTextEdits* in LSP spec if it's available.
1616
- Chain completion support inspired by ![vim-mucomplete](https://github.com/lifepillar/vim-mucomplete)
1717

@@ -101,10 +101,10 @@ inoremap <silent><expr> <TAB>
101101
- By default other snippets source support are disabled, turn them on by
102102

103103
```vim
104-
" possible value: 'UltiSnips', 'Neosnippet', 'Vsnip'
104+
" possible value: 'UltiSnips', 'Neosnippet', 'vim-vsnip'
105105
let g:completion_enable_snippet = 'UltiSnips'
106106
```
107-
- Support `UltiSnips` and `Neosnippet` and `Vsnip`
107+
- Support `UltiSnips` and `Neosnippet` and `vim-vsnip`
108108

109109
### LSP Based Snippet parsing
110110

doc/completion-nvim.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ FEATURE *completion-features*
2424
- Asynchronous completion using libuv api.
2525
- Automatically open hover windows when popupmenu is available.
2626
- Automatically open signature help if it's available.
27-
- Snippets integration with UltiSnips and Neosnippet and Vsnip.
27+
- Snippets integration with UltiSnips and Neosnippet and vim-vsnip.
2828
- ins-complete method integration
2929
- Apply additionalTextEdits in LSP spec if it's available.
3030
- Chain completion support inspired by vim-mucomplete
@@ -87,7 +87,7 @@ g:completion_enable_auto_popup *g:completion_enable_auto_popup*
8787
g:completion_enable_snippet *g:completion_enable_snippet*
8888

8989
You can specify which snippet engines you want to use. Possible values
90-
are |UltiSnips| and |Neosnippet| and |Vsnip|.
90+
are |UltiSnips| and |Neosnippet| and |vim-vsnip|.
9191

9292
Note: Snippet engines will not work without setting this variables.
9393

lua/completion.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ function M.confirmCompletion()
7676
api.nvim_call_function('UltiSnips#ExpandSnippet', {})
7777
elseif complete_item.kind == 'Neosnippet' then
7878
api.nvim_input("<c-r>".."=neosnippet#expand('"..complete_item.word.."')".."<CR>")
79-
elseif complete_item.kind == 'Vsnip' then
79+
elseif complete_item.kind == 'vim-vsnip' then
8080
api.nvim_call_function('vsnip#expand', {})
8181
end
8282
M.completionConfirm = false

lua/completion/health.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ local checkSnippetSource = function()
2929
else
3030
health_error("Neosnippet is not available! Check if you install Neosnippet correctly.")
3131
end
32-
elseif snippet_source == 'Vsnip' then
32+
elseif snippet_source == 'vim-vsnip' then
3333
if string.match(api.nvim_get_option("rtp"), ".*vsnip.*") then
34-
health_ok("You are using Vsnip as your snippet source")
34+
health_ok("You are using vim-vsnip as your snippet source")
3535
else
36-
health_error("Vsnip is not available! Check if you install Vsnip correctly.")
36+
health_error("vim-vsnip is not available! Check if you install vim-vsnip correctly.")
3737
end
3838
else
39-
health_error("You're snippet source is not available! possible value are: UltiSnips, Neosnippet, Vsnip")
39+
health_error("You're snippet source is not available! possible value are: UltiSnips, Neosnippet, vim-vsnip")
4040
end
4141
end
4242

lua/source/snippet.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ local getVsnipItems = function(prefix)
5858
if vim.tbl_isempty(snippetsList) == 0 then
5959
return {}
6060
end
61-
local priority = vim.g.completion_items_priority['Vsnip']
61+
local priority = vim.g.completion_items_priority['vim-vsnip']
6262
for _, source in pairs(snippetsList) do
6363
for _, snippet in pairs(source) do
6464
local user_data = {hover = snippet.description}
6565
local item = {}
6666
item.word = snippet.prefix[1]
67-
item.kind = 'Vsnip'
67+
item.kind = 'vim-vsnip'
6868
item.priority = priority
6969
item.user_data = user_data
7070
match.matching(complete_items, prefix, item)
@@ -80,7 +80,7 @@ M.getCompletionItems = function(prefix, score_func, _)
8080
snippet_list = getUltisnipItems(prefix, score_func)
8181
elseif source == 'Neosnippet' then
8282
snippet_list = getNeosnippetItems(prefix, score_func)
83-
elseif source == 'Vsnip' then
83+
elseif source == 'vim-vsnip' then
8484
snippet_list = getVsnipItems(prefix, score_func)
8585
end
8686
return snippet_list

0 commit comments

Comments
 (0)