feat: Only show completion for available types (#36)

This commit is contained in:
danymat
2022-01-11 11:30:14 +01:00
parent a6ea2c1718
commit b1c5e39104

View File

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