quarto.lua 851 B

123456789101112131415161718192021222324252627282930
  1. local api = vim.api
  2. local ts = vim.treesitter
  3. vim.b.slime_cell_delimiter = '```'
  4. vim.b['quarto_is_r_mode'] = nil
  5. vim.b['reticulate_running'] = false
  6. vim.bo.commentstring = '<!-- %s -->'
  7. -- wrap text, but by word no character
  8. -- indent the wrappped line
  9. vim.wo.wrap = true
  10. vim.wo.linebreak = true
  11. vim.wo.breakindent = true
  12. vim.wo.showbreak = '|'
  13. -- don't run vim ftplugin on top
  14. vim.api.nvim_buf_set_var(0, 'did_ftplugin', true)
  15. -- markdown vs. quarto hacks
  16. local ns = vim.api.nvim_create_namespace 'QuartoHighlight'
  17. vim.api.nvim_set_hl(ns, '@markup.strikethrough', { strikethrough = false })
  18. vim.api.nvim_set_hl(ns, '@markup.doublestrikethrough', { strikethrough = true })
  19. vim.api.nvim_win_set_hl_ns(0, ns)
  20. -- vim.api.nvim_set_hl(0, '@markup.codecell', { bg = '#000055' })
  21. vim.api.nvim_set_hl(0, '@markup.codecell', {
  22. link = 'CursorLine',
  23. })