treesitter.lua 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. require'nvim-treesitter.configs'.setup {
  2. ensure_installed = {
  3. "c",
  4. "lua",
  5. "java",
  6. "python",
  7. "bash",
  8. "html",
  9. "css",
  10. "javascript",
  11. "bibtex",
  12. "cmake",
  13. "cpp",
  14. "latex",
  15. "perl",
  16. "regex",
  17. "toml",
  18. "yaml"
  19. },
  20. -- Install parsers synchronously (only applied to `ensure_installed`)
  21. sync_install = false,
  22. highlight = {
  23. enable = true,
  24. disable = {"rust"},
  25. -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
  26. -- Using this option may slow down your editor, and you may see some duplicate highlights.
  27. additional_vim_regex_highlighting = false,
  28. },
  29. refactor = {
  30. highlight_definitions = {
  31. enable = true,
  32. -- Set to false if you have an `updatetime` of ~100.
  33. clear_on_cursor_move = false,
  34. },
  35. highlight_current_scope = {
  36. -- very annonying per default, maybe has its use when its unclear
  37. enable = false
  38. },
  39. smart_rename = {
  40. enable = true,
  41. keymaps = {
  42. smart_rename = "grr",
  43. },
  44. },
  45. navigation = {
  46. enable = true,
  47. keymaps = {
  48. goto_definition = "gnd",
  49. list_definitions = "gnD",
  50. list_definitions_toc = "gO",
  51. goto_next_usage = "<A-n>",
  52. goto_previous_usage = "<A-p>",
  53. },
  54. },
  55. },
  56. }