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

Commit f785741

Browse files
committed
Fix error when there are no global snippets defined in snippets.nvim
1 parent ade764f commit f785741

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lua/completion/source/snippet.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ M.getSnippetsNvimItems = function(prefix)
8181
local snippets = require 'snippets'
8282
if not snippets then return {} end
8383
local ft = vim.bo.filetype
84-
local snippetsList = vim.tbl_extend('force', snippets.snippets._global, snippets.snippets[ft] or {})
84+
local snippetsList = vim.tbl_extend('force', snippets.snippets._global or {}, snippets.snippets[ft] or {})
8585
local complete_items = {}
8686
if vim.tbl_isempty(snippetsList) == 0 then
8787
return {}

0 commit comments

Comments
 (0)