diff --git a/lua/nvim-paredit/lang/init.lua b/lua/nvim-paredit/lang/init.lua index 2b0c960..6b7a28a 100644 --- a/lua/nvim-paredit/lang/init.lua +++ b/lua/nvim-paredit/lang/init.lua @@ -15,7 +15,12 @@ local function keys(tbl) end function M.get_language_api() - return langs[vim.bo.filetype] + for l in string.gmatch(vim.bo.filetype, "[^.]+") do + if langs[l] ~= nil then + return langs[l] + end + end + return nil end function M.add_language_extension(filetype, api)