Commit Graph

38 Commits

Author SHA1 Message Date
3b2caa7dcd feat(docker): add treesit support 2025-05-24 17:11:40 +02:00
7af7280f9e feat(json): add treesit support 2025-05-22 19:53:10 +02:00
f5a1af4bf6 feat(kotlin): add treesit support 2025-05-22 19:50:29 +02:00
c5dd2847ff feat(scala): add treesit support 2025-05-22 19:50:29 +02:00
5db361b474 fix(tree-sitter): remove redundant yaml source
Amend: 2556cb58f2
2025-05-22 18:32:04 +02:00
0c311a5172 feat(elixir): add treesit support 2025-05-22 18:32:03 +02:00
1670ce2767 feat!(cc): add treesit support
BREAKING CHANGE: Besides treesit support, this removes a few
fontification enhancements (in favor of tree-sitter).
2025-05-15 13:01:40 +02:00
46b87362f7 feat(julia): add treesit support 2025-05-15 13:01:40 +02:00
f002424106 feat(lua): add treesit support 2025-05-15 13:01:40 +02:00
445c982838 feat(ruby): add treesit support 2025-05-15 13:01:40 +02:00
a372eba7cd feat(python): add treesit support 2025-05-15 13:01:39 +02:00
1ac1b70d4e refactor!(tree-sitter): replace tree-sitter w/ treesit
BREAKING CHANGE: This rewrites the :tools tree-sitter module to use
treesit instead of tree-sitter.el. Users will need to adapt to treesit
and remove any tree-sitter-specific config in their dotfiles.

Ref: #7623
Ref: #7742
Ref: #8197
2025-05-15 13:01:29 +02:00
ad6a3d0f33 refactor: deprecate featurep! for modulep!
featurep! will be renamed modulep! in the future, so it's been
deprecated. They have identical interfaces, and can be replaced without
issue.

featurep! was never quite the right name for this macro. It implied that
it had some connection to featurep, which it doesn't (only that it was
similar in purpose; still, Doom modules are not features). To undo such
implications and be consistent with its namespace (and since we're
heading into a storm of breaking changes with the v3 release anyway),
now was the best opportunity to begin the transition.
2022-08-14 20:43:35 +02:00
8e68cd5ffd feat(tree-sitter): conditionally enable ts-hl-mode
Based on the new variable `+tree-sitter-hl-enabled-modes`

This allows for people to use tree sitters tools without having
to use it for highlighting.
Useful because some modes (such as web-mode and its derivatives) do a
better job than the tree sitter alternative in this respect.
2022-08-08 18:37:20 +02:00
76431f699e fix(tree-sitter): ensure load order
use-package's :after keyword introduces some load order behavior that
complicates the user's ability to target it with either after! or
with-eval-after-load. Best to avoid it.

Ref: jwiegley/use-package#829
2022-06-18 15:01:13 +02:00
e1056f0053 tweak(tree-sitter): rebind conditional nav key
Move the conditional bindings from `i` to `v` this is
to reflect the text object, the thinking being if users have to learn
one anti mnemonic then it should reflect all cases to make it easier to
swallow.
2022-05-27 00:04:56 +01:00
84d47016d0 fix(tree-sitter): no longer eager load tree sitter 2022-05-22 21:26:10 +01:00
45ed981b41 refactor(tree-sitter): put keys on ts-mode-map
- move map definition and binding into
  evil-textobj-tree-sitter :config body

- replace +tree-sitter-keys-mode  with
  tree-sitter-mode as bind site

- remove +tree-sitter-keys-mode from tree-sitter! autodef
2022-05-22 21:26:09 +01:00
74fc2a87c9 tweak(tree-sitter): gate textobj maps 2022-05-22 21:26:08 +01:00
561eb533a8 nit(tree-sitter): remove defer, its redundant 2022-05-22 21:26:08 +01:00
9c00df72d6 fix(tree-sitter): feature gate +tree-sitter-keys-mode
As this has a dependency on evil it makes sense to only load it when
evil is used, the entire mode is only needed for evil textobj
tree-sitter anyway
2022-05-22 21:26:06 +01:00
795a17e664 feat!(tree-sitter): rebind text objs to other keys
BREAKING CHANGE: rebind the text objects parameter and conditional to
'A' and 'v' respectively, this is to make the defaults a little more
intuitive and not clobber existing text objects that are useful to
people
2022-05-22 21:26:06 +01:00
89f82428e6 feat(tree-sitter): goto functionality 2022-05-22 21:26:05 +01:00
7534ce8fa7 feat(tree-sitter): add parameter text object
this will replace evil-{inner,outer}-arg
2022-05-22 21:26:04 +01:00
2cd40f7aa7 fix(tree-sitter): properly gatekeep ts text objs
before today all text objects were bound in all modes, now they have
been properly gatekept and only appear when `+tree-sitter-keys-mode` is
enabled / hooked, this allows for more flexibility and the ability to
arbitrarily disable / enable tree sitter text objects (which is nice)
2022-05-22 21:26:03 +01:00
2a7442da74 nit(tree-sitter): cleanup
remove dead lines
remove old code comments
add in hack... thingy?
2022-05-22 21:26:02 +01:00
f39fb3afc1 fix(tree-sitter): adjust description for textobjs
Reduce the length of the description for evil text objects
2022-05-22 21:26:02 +01:00
8d27b2bf90 nit(tree-sitter): remove outdated comments 2022-05-22 21:26:01 +01:00
400d8d4116 feat(tree-sitter): bind textobjects to maps
Instead of binding all of the tree sitter text objects to every map
we only bind them to modes in the major-mode-language-alist
2022-05-22 21:26:00 +01:00
3fdd688356 feat(tree-sitter): ts-langs eagar loads on daemon
as ts-langs is quite heavy it makes sense to eagar load it when in
daemon mode to make the experience smoother overall
2022-05-22 21:26:00 +01:00
4eeb45f80b fix(tree-sitter): lazy load tree-sitter-langs
Some how for some reason tree-sitter-langs managed to load. If if put
its require in the block of a lazy loaded package. it would load.
If i were to set its use-package call to load it after a lazy loaded
package. it would load.

a hook (and disabling it) were the only reliable ways to get it to lazy
load
2022-05-22 21:26:00 +01:00
4552064a5a refactor(tree-sitter): move ts-langs into use-pkg
Move tree-sitter-langs into its own use-package call

This is to reflect an accepted code pattern seen in the rest of doom's
code.

This does not cause any user facing changes
2022-05-22 21:26:00 +01:00
cb269deed6 feat(tree-sitter): add function call text object
Changes:
- Bind `F` to the function call text object
- Add the text object to the table
- Realign table so it looks right to people who don't hide emphasis
markers
2022-05-22 21:25:59 +01:00
76d38ddc63 refactor(tree-sitter): remove doom-tree-sitter-fail-gracefully-a
Use turn-on-tree-sitter-mode instead of tree-sitter-mode directly
because the former now ignore errors.
2022-05-22 21:25:59 +01:00
727fcb2fcc nit(tree-sitter): add rationale for debug mode var 2022-05-22 21:25:58 +01:00
145d75eaaa fix(tree-sitter): bind text-objs to keys 2022-05-22 21:25:57 +01:00
74a444db00 fix(tree-sitter): feature gate evil-textobj-ts
where ts stands for tree sitter

Only install 'evil-textobj-treesitter' if :editor evil +everywhere is
enabled

Also Comment which text objs are not currently not working
2022-05-22 21:25:57 +01:00
862e7980d8 module: add :tools tree-sitter
This module installs 'tree-sitter' and 'tree-sitter-langs' as well as
the 'evil-textobj-treesitter' and configures them.

This module is based on the prototype module that @hlissner has started
and I am just fleshing out that work.

It also comes with a README file

Fix: #4151
2022-05-22 21:25:57 +01:00