3 ms·
Thank you for the recommendation. I will look into building my own tree sitter grammars using https://github.com/casouri/tree-sitter-module https://github.com/c
by srhtftw 3y ago
Thank you for the recommendation.
I will look into building my own tree sitter grammars using https://github.com/casouri/tree-sitter-module https://github.com/casouri/tree-sitter-module as you suggest.
Some time ago I followed this guide https://vxlabs.com/2022/06/12/typescript-development-with-emacs-tree-sitter-and-lsp-in-2022 https://vxlabs.com/2022/06/12/typescript-development-with-em...
and added this to my .emacs
(use-package tree-sitter
:ensure t
:config
;; activate tree-sitter on any buffer containing code for which it has a parser available
(global-tree-sitter-mode)
;; you can easily see the difference tree-sitter-hl-mode makes for python, ts or tsx
;; by switching on and off
(add-hook 'tree-sitter-after-on-hook #'tree-sitter-hl-mode))
(use-package tree-sitter-langs
:ensure t
:after tree-sitter)
Regarding C++, I tried a simpler experiment starting emacs with
% open -n -a Emacs --args "-q"
and I think my C++ slowness issue is due to fontlock https://www.gnu.org/software/emacs/manual/html_node/emacs/Font-Lock.html https://www.gnu.org/software/emacs/manual/html_node/emacs/Fo...
Even without a startup file, I can't open https://github.com/ASDAlexander77/TypeScriptCompiler/blob/main/tsc/lib/TypeScript/MLIRGen.cpp https://github.com/ASDAlexander77/TypeScriptCompiler/blob/ma... and scroll through the file unless I also manually do
ESC : (global-font-lock-mode 0)
I'm sorry if I gave the impression I'm a regular C++ developer. I only use it occasionally. I just happened to remember finding myself unable to use Emacs for that particular file.