Yuan Fu
e37cd4fa59
Add baseline tree-sitter indent rule for C-like languages
...
I found a really good baseline indent rule that handles a wide
range of situations very well. Now major modes can just start
with this rule and add exceptions on top.
This is worth mentioning in the manual, but that'll be a large
change, and doesn't have to be included in this commit.
* lisp/progmodes/c-ts-common.el:
(c-ts-common-list-indent-style): New variable.
(c-ts-common--standalone-parent):
(c-ts-common--prev-standalone-sibling):
(c-ts-common-parent-ignore-preproc):
(c-ts-common-baseline-indent-rule): New function.
* lisp/treesit.el (treesit--indent-prev-line-node): New function.
(treesit-simple-indent-presets): Add new preset.
2024-12-01 17:53:22 -08:00
..
2024-10-15 16:16:25 +02:00
2024-11-30 06:44:06 -05:00
2024-10-24 16:50:07 +08:00
2024-11-21 22:12:32 +01:00
2024-10-04 01:38:11 +02:00
2024-12-01 10:56:08 -08:00
2024-11-23 22:40:43 -08:00
2024-11-13 23:29:57 +01:00
2024-10-24 16:50:07 +08:00
2024-10-24 16:50:07 +08:00
2024-07-28 09:44:44 +03:00
2024-11-07 14:26:07 +01:00
2024-12-01 17:52:16 -08:00
2024-10-04 01:38:11 +02:00
2024-12-01 17:52:16 -08:00
2024-07-25 10:48:03 +02:00
2024-11-21 10:06:19 +01:00
2024-10-27 11:06:40 +08:00
2024-10-04 01:38:11 +02:00
2024-12-01 17:53:22 -08:00
2024-11-23 04:46:10 -05:00
2024-11-22 09:42:50 +01:00
2024-10-24 16:50:07 +08:00
2024-09-07 06:25:15 -04:00
2024-11-23 04:46:10 -05:00
2024-10-01 23:56:06 +02:00
2024-10-01 23:56:06 +02:00
2024-10-24 16:50:07 +08:00
2024-10-24 16:50:07 +08:00
2024-08-17 12:43:33 +03:00
2024-10-24 16:50:07 +08:00
2024-11-23 12:49:56 +01:00
2024-10-19 12:36:32 +02:00
2024-06-29 21:59:39 +02:00
2024-10-24 16:50:07 +08:00
2024-10-05 13:06:49 +03:00
2024-09-27 07:12:05 +02:00
2024-10-24 16:50:07 +08:00
2024-10-11 12:14:42 +02:00
2024-11-01 23:56:12 +01:00
2024-06-23 16:40:06 +02:00
2024-07-18 11:46:50 +02:00
2024-07-18 11:46:50 +02:00
2024-07-18 11:46:50 +02:00
2024-10-05 02:30:41 +02:00
2024-10-05 02:30:41 +02:00
2024-11-09 12:45:14 +02:00
2024-10-24 16:50:07 +08:00
2024-11-23 14:56:50 +01:00
2024-07-18 11:46:50 +02:00
2024-11-17 17:49:49 -05:00
2024-11-17 17:49:49 -05:00
2024-10-24 16:50:07 +08:00
2024-11-30 23:28:06 +01:00
2024-10-26 14:52:29 -04:00
2024-10-24 16:50:07 +08:00
2024-10-24 16:50:07 +08:00
2024-10-02 15:24:21 +08:00
2024-10-24 16:50:07 +08:00
2024-10-24 16:50:07 +08:00
2024-10-04 01:38:11 +02:00
2024-10-24 16:50:07 +08:00
2024-10-18 08:06:40 +02:00
2024-10-24 16:50:07 +08:00
2024-06-24 20:34:53 +02:00
2024-07-08 17:09:31 -04:00
2024-06-24 20:34:53 +02:00
2024-06-24 20:34:53 +02:00
2024-06-24 20:34:53 +02:00
2024-10-27 08:23:06 -04:00
2024-09-22 10:10:35 +02:00
2024-10-05 13:11:04 +03:00
2024-09-02 21:02:09 +02:00
2024-10-24 16:50:07 +08:00
2024-07-27 11:01:36 +02:00
2024-10-24 16:50:07 +08:00
2024-08-10 10:54:18 +03:00
2024-07-25 03:35:18 +02:00
2024-11-16 16:08:26 +02:00
2024-10-24 16:50:07 +08:00
2024-10-24 16:50:07 +08:00
2024-11-09 07:35:12 -05:00
2024-11-26 23:34:55 +02:00
2024-09-26 02:10:16 +02:00
2024-10-24 16:50:07 +08:00
2024-10-04 01:38:11 +02:00
2024-07-24 23:53:13 +02:00
2024-07-20 02:42:08 +02:00
2024-10-12 14:52:32 +03:00
2024-10-24 16:50:07 +08:00
2024-08-06 12:05:31 +02:00
2024-07-20 02:42:08 +02:00
2024-08-21 10:54:53 +02:00
2024-07-25 03:35:18 +02:00
2024-10-24 16:50:07 +08:00
2024-08-08 13:30:55 +03:00
2024-10-24 16:50:07 +08:00
2024-11-13 23:29:57 +01:00
2024-10-24 16:50:07 +08:00
2024-09-25 09:57:16 +03:00
2024-07-10 00:36:19 +02:00
2024-09-08 19:17:48 +03:00
2024-10-24 16:50:07 +08:00
2024-10-24 16:50:07 +08:00
2024-10-24 16:50:07 +08:00
2024-10-18 17:56:08 +02:00
2024-10-12 14:36:29 +03:00
2024-10-24 16:50:07 +08:00
2024-09-25 20:14:12 +03:00
2024-10-24 16:50:07 +08:00
2024-10-27 10:47:23 +01:00
2024-07-23 21:00:23 +03:00
2024-10-16 17:59:58 -04:00
2024-11-30 06:35:16 -05:00
2024-10-24 16:50:07 +08:00
2024-10-14 14:37:39 +03:00
2024-11-23 16:46:30 +01:00
2024-10-24 15:39:34 +08:00
2024-07-10 00:36:19 +02:00
2024-06-24 14:39:03 +02:00
2024-09-01 15:24:51 +02:00
2024-11-17 16:52:33 -05:00
2024-09-01 20:05:02 +03:00
2024-09-21 19:34:16 +02:00
2024-11-29 12:26:02 -05:00
2024-07-20 02:42:08 +02:00
2024-11-14 10:42:07 -05:00
2024-07-10 00:36:19 +02:00
2024-10-04 01:38:11 +02:00
2024-10-24 16:50:07 +08:00
2024-10-24 16:50:07 +08:00
2024-11-10 01:29:47 +01:00
2024-09-08 19:17:48 +03:00
2024-10-04 01:38:11 +02:00
2024-07-20 02:42:08 +02:00
2024-10-24 16:50:07 +08:00
2024-08-17 20:48:05 +03:00
2024-06-20 13:30:11 +02:00
2024-09-20 12:42:18 +02:00
2024-10-08 09:01:47 +02:00
2024-11-27 09:45:19 +02:00
2024-07-28 09:52:51 +03:00
2024-10-24 16:50:07 +08:00
2024-07-20 02:42:08 +02:00
2024-10-24 16:50:07 +08:00
2024-07-27 18:37:31 +02:00
2024-10-24 16:50:07 +08:00
2024-10-24 16:50:07 +08:00
2024-11-29 12:26:02 -05:00
2024-10-19 10:33:35 +03:00
2024-07-20 02:42:08 +02:00
2024-10-24 16:50:07 +08:00
2024-11-27 10:36:53 +08:00
2024-08-04 10:47:16 +03:00
2024-11-01 23:56:12 +01:00
2024-10-24 16:50:07 +08:00
2024-10-24 16:50:07 +08:00
2024-07-20 02:42:08 +02:00
2024-10-04 00:56:37 -04:00
2024-10-24 16:50:07 +08:00
2024-10-24 16:50:07 +08:00
2024-11-08 10:45:55 -08:00
2024-10-24 16:50:07 +08:00
2024-11-09 12:33:59 +02:00
2024-10-24 16:50:07 +08:00
2024-10-27 18:45:31 +08:00
2024-12-01 17:53:22 -08:00
2024-12-01 19:27:49 +02:00
2024-07-10 00:36:19 +02:00
2024-06-30 16:26:39 +08:00
2024-10-24 16:50:07 +08:00
2024-10-27 13:41:24 +02:00
2024-11-23 04:46:09 -05:00
2024-09-21 07:32:38 -04:00
2024-10-24 17:20:46 +08:00
2024-10-24 16:50:07 +08:00
2024-10-24 16:50:07 +08:00
2024-07-18 11:46:50 +02:00
2024-07-10 00:36:19 +02:00
2024-10-24 16:50:07 +08:00
2024-10-24 16:50:07 +08:00
2024-10-31 12:36:31 +02:00