-- Basic Options
vim.opt_local.spell = true
vim.bo.expandtab = false
vim.bo.smartindent = false
vim.bo.textwidth = 80
vim.wo.colorcolumn = '80'
vim.bo.spelllang = 'en,es,cjk'
vim.bo.complete = 'kspell'
vim.wo.conceallevel = 2
vim.opt_local.shiftwidth = 2
vim.opt_local.commentstring = '<!-- %s -->'

vim.g.markdown_fenced_languages = {
  'bash=sh',
  'console=sh',
  'javascript',
  'lua',
  'typescript',
  'zsh=sh',
}

-- Spellcheck
vim.keymap.set('n', '<F7>', '[s', { silent = true, buffer = true })
vim.keymap.set('n', '<F8>', ']s', { silent = true, buffer = true })
vim.keymap.set('n', '<F9>', 'z=1<CR><CR>', { silent = true, buffer = true })
vim.keymap.set('n', '<F10>', 'z=', { silent = true, buffer = true })
vim.keymap.set('i', '<C-l>', '<C-g>u<Esc>[s1z=`]a<C-g>u', { buffer = true, desc = 'Fix Last Miss-Spelling' })
