Skip to content

Commit

Permalink
Merge pull request #59 from taw10/master
Browse files Browse the repository at this point in the history
Try all parts of a compound filetype
  • Loading branch information
julienvincent authored Mar 19, 2024
2 parents 54e4265 + dcad3ee commit 844b032
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lua/nvim-paredit/lang/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 844b032

Please sign in to comment.