config.lua 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. O.treesitter = {
  2. ensure_installed = {}, -- one of "all", "maintained" (parsers with maintainers), or a list of languages
  3. ignore_install = {},
  4. matchup = {
  5. enable = false, -- mandatory, false will disable the whole extension
  6. -- disable = { "c", "ruby" }, -- optional, list of language that will be disabled
  7. },
  8. highlight = {
  9. enable = true, -- false will disable the whole extension
  10. additional_vim_regex_highlighting = true,
  11. disable = { "latex" },
  12. },
  13. context_commentstring = {
  14. enable = false,
  15. config = { css = "// %s" },
  16. },
  17. -- indent = {enable = true, disable = {"python", "html", "javascript"}},
  18. -- TODO seems to be broken
  19. indent = { enable = { "javascriptreact" } },
  20. autotag = { enable = false },
  21. textobjects = {
  22. swap = {
  23. enable = false,
  24. -- swap_next = textobj_swap_keymaps,
  25. },
  26. -- move = textobj_move_keymaps,
  27. select = {
  28. enable = false,
  29. -- keymaps = textobj_sel_keymaps,
  30. },
  31. },
  32. textsubjects = {
  33. enable = false,
  34. keymaps = { ["."] = "textsubjects-smart", [";"] = "textsubjects-big" },
  35. },
  36. playground = {
  37. enable = false,
  38. disable = {},
  39. updatetime = 25, -- Debounced time for highlighting nodes in the playground from source code
  40. persist_queries = false, -- Whether the query persists across vim sessions
  41. keybindings = {
  42. toggle_query_editor = "o",
  43. toggle_hl_groups = "i",
  44. toggle_injected_languages = "t",
  45. toggle_anonymous_nodes = "a",
  46. toggle_language_display = "I",
  47. focus_language = "f",
  48. unfocus_language = "F",
  49. update = "R",
  50. goto_node = "<cr>",
  51. show_help = "?",
  52. },
  53. },
  54. rainbow = {
  55. enable = false,
  56. extended_mode = true, -- Highlight also non-parentheses delimiters, boolean or table: lang -> boolean
  57. max_file_lines = 1000, -- Do not enable for files with more than 1000 lines, int
  58. },
  59. }
  60. -- -- TODO refactor treesitter
  61. -- -- @usage pass a table with your desired languages
  62. -- treesitter = {
  63. -- ensure_installed = "all",
  64. -- ignore_install = { "haskell" },
  65. -- highlight = { enabled = true },
  66. -- -- The below are for treesitter-textobjects plugin
  67. -- textobj_prefixes = {
  68. -- goto_next = "]", -- Go to next
  69. -- goto_previous = "[", -- Go to previous
  70. -- inner = "i", -- Select inside
  71. -- outer = "a", -- Selct around
  72. -- swap = "<leader>a", -- Swap with next
  73. -- },
  74. -- textobj_suffixes = {
  75. -- -- Start and End respectively for the goto keys
  76. -- -- for other keys it only uses the first
  77. -- ["function"] = { "f", "F" },
  78. -- ["class"] = { "m", "M" },
  79. -- ["parameter"] = { "a", "A" },
  80. -- ["block"] = { "k", "K" },
  81. -- ["conditional"] = { "i", "I" },
  82. -- ["call"] = { "c", "C" },
  83. -- ["loop"] = { "l", "L" },
  84. -- ["statement"] = { "s", "S" },
  85. -- ["comment"] = { "/", "?" },
  86. -- },
  87. -- -- The below is for treesitter hint textobjects plugin
  88. -- hint_labels = { "h", "j", "f", "d", "n", "v", "s", "l", "a" },
  89. -- },