fix: Do not show type completion if language not supported (#36)

This commit is contained in:
danymat
2022-01-11 12:00:17 +01:00
parent c06907ef6d
commit 1a76b572f0

View File

@@ -132,10 +132,14 @@ function neogen.jumpable(reverse)
end
function neogen.match_commands()
if vim.bo.filetype == "" then
return {}
end
local language = neogen.configuration.languages[vim.bo.filetype]
if not language or not language.parent then
return { "func", "class", "type", "file" }
return {}
end
return vim.tbl_keys(language.parent)