local M = {}
local wk = require('which-key')
local map = require('user.keymap.mappings')

-- Mappings for FileType --
function M.whichkeyLocal()
    wk.register(map.local_map, { buffer = vim.api.nvim_get_current_buf(), prefix = '<localleader>' })
end

function M.whichkeyMarkdown()
    wk.register(map.markdown_map, { buffer = vim.api.nvim_get_current_buf(), prefix = '<localleader>' })
end

function M.whichkeyTex()
    wk.register(map.tex_map, { buffer = vim.api.nvim_get_current_buf(), prefix = '<localleader>' })
end

function M.whichkeyOrg()
    wk.register(map.org_map, { buffer = vim.api.nvim_get_current_buf() })
end

-- Other mappings --
function M.setup()
    map.undefined_map()
    wk.register(map.normal_map)
    wk.register(map.normal_with_leader_map, { prefix = '<leader>' })
    wk.register(map.visual_with_leader_map, { mode = 'x', prefix = '<leader>' })
end

return M
