From db21b47a47b2d88e611853d8bff30e3ca4631515 Mon Sep 17 00:00:00 2001 From: John Turner Date: Mon, 25 Sep 2023 05:48:47 -0400 Subject: [PATCH] new use-package for c-ts-mode --- packages/treesit.el | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/packages/treesit.el b/packages/treesit.el index d5af6b9..af73861 100644 --- a/packages/treesit.el +++ b/packages/treesit.el @@ -20,10 +20,16 @@ (funcall setup-treesit-mode 'cpp 'c++-ts-mode '("cpp" "cxx" "c++" "hpp" "hxx" "h++")))) (use-package rust-ts-mode - :requires treesit - :hook - (rust-ts-mode . (lambda () - (when (require 'rust-mode nil t) - (add-hook 'before-save-hook 'rust-before-save-method nil t) - (add-hook 'after-save-hook 'rust-after-save-method nil t) - (use-local-map (make-composed-keymap (list rust-ts-mode-map rust-mode-map))))))) + :requires treesit + :hook + (rust-ts-mode . (lambda () + (when (require 'rust-mode nil t) + (add-hook 'before-save-hook 'rust-before-save-method nil t) + (add-hook 'after-save-hook 'rust-after-save-method nil t) + (use-local-map (make-composed-keymap (list rust-ts-mode-map rust-mode-map))))))) + +(use-package c-ts-mode + :requires treesit + :custom + (c-ts-mode-indent-style 'linux) + (c-ts-mode-indent-offset 2))