fix: Do not show type completion if language not supported (#36)
This commit is contained in:
@@ -132,10 +132,14 @@ function neogen.jumpable(reverse)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function neogen.match_commands()
|
function neogen.match_commands()
|
||||||
|
if vim.bo.filetype == "" then
|
||||||
|
return {}
|
||||||
|
end
|
||||||
|
|
||||||
local language = neogen.configuration.languages[vim.bo.filetype]
|
local language = neogen.configuration.languages[vim.bo.filetype]
|
||||||
|
|
||||||
if not language or not language.parent then
|
if not language or not language.parent then
|
||||||
return { "func", "class", "type", "file" }
|
return {}
|
||||||
end
|
end
|
||||||
|
|
||||||
return vim.tbl_keys(language.parent)
|
return vim.tbl_keys(language.parent)
|
||||||
|
|||||||
Reference in New Issue
Block a user