Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> https://medium.com/really-learn-programming/setting-up-tree-...

The author made this story available to Medium members only. Sign up to read this one for free.

/sigh



Yeah, sorry, I was hastily looking for a tutorial. But I got "c++-ts-mode" working for me now, see my other comment below: https://news.ycombinator.com/item?id=37466899

I am still not a competent C++ programmer but this is how your basic tree sitter C++ mode is supposed too look with "C-h m":

  Minor modes enabled in this buffer: Auto-Save Flycheck Flyspell
  Font-Lock Yas

  The major mode is C++// mode defined in c-ts-mode.el:

  Major mode for editing C++, powered by tree-sitter.

  This mode is independent from the classic cc-mode.el based
  ‘c++-mode’, so configuration variables of that mode, like
  ‘c-basic-offset’, don’t affect this mode.

  To use tree-sitter C/C++ modes by default, evaluate

      (add-to-list 'major-mode-remap-alist '(c-mode . c-ts-mode))
      (add-to-list 'major-mode-remap-alist '(c++-mode . c++-ts-mode))
      (add-to-list 'major-mode-remap-alist
                   '(c-or-c++-mode . c-or-c++-ts-mode))




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: