Commit graph

67 commits

Author SHA1 Message Date
Henrik Lissner
49f4ec3b10
feat(tree-sitter): add set-tree-sitter-lang! autodef 2022-09-10 18:36:24 +02:00
Henrik Lissner
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
Jeetaditya Chatterjee
1b56675819 docs(tree-sitter): update highlights configuration 2022-08-08 18:37:20 +02:00
Jeetaditya Chatterjee
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
Henrik Lissner
1abcf913aa
revert: fix(docs): set mode in file-local vars
emacs-straight/org-mode@e22b4eb7aa introduced a breaking change that
made it impossible to rely on .dir-locals.el to change org-mode buffers
in $EMACSDIR to doom-docs-org-mode (without infinite recursion), so we
used file-local variables in 7e400ab.

emacs-straight/org-mode@215de6176b reverted that change, so we can use
.dir-locals.el again, and this is my preference, since it requires less
boilerplate across our hundreds of org files.

Ref: emacs-straight/org-mode@215de6176b
Ref: emacs-straight/org-mode@e22b4eb7aa
Revert: 7e400abdc0
2022-08-07 19:08:07 +02:00
Henrik Lissner
304774cf39
docs(biblio,tree-sitter): update READMEs to new format
Also preforms minor spelling, grammar, and formatting corrections.
2022-08-04 01:16:13 +02:00
Colin Woodbury
a5cc803ad4 docs(tree-sitter): improve README formatting 2022-07-24 13:09:18 +02:00
Jeetaditya Chatterjee
53452f43b7 bump: :tools tree-sitter
emacs-tree-sitter/elisp-tree-sitter@3cfab8a0e9 -> emacs-tree-sitter/elisp-tree-sitter@c3fe96a103
meain/evil-textobj-tree-sitter@0bf5bbbfec -> meain/evil-textobj-tree-sitter@9dce8dab68

This *should* fix issues with pulling down parsers for M1 macs
2022-07-23 16:26:06 +02:00
Jeetaditya Chatterjee
da628a7870 docs(tree-sitter): remove mention of keys mode
This is no longer in the module

also change highlighting link
2022-07-23 16:26:06 +02:00
Henrik Lissner
c06040338a
fix(lsp,tree-sitter): void-function lsp!/tree-sitter! errors
These are autodefs, meaning they should be defined whether or not the
containing module is enabled, but they should no-op when it's disabled,
by defining a no-op macro with the same name. However, lsp! and
tree-sitter! are meant to be used as hooks, and you can't use macros as
hooks, so you get void-function errors when they are used as such.

This ensures they are properly defined as no-op functions in those
cases. I.e.

  ;;;###autodef FORM

FORM is used instead of a no-op macro if the parent module is disabled.
2022-06-22 20:35:52 +02:00
Henrik Lissner
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
Jeetaditya Chatterjee
7105292eed
docs(tree-sitter): add mention on how to enable
On a language level
2022-06-17 20:05:16 +01:00
Jeetaditya Chatterjee
349247fb3e
docs(tree-sitter): update goto bind table 2022-05-27 00:05:19 +01:00
Jeetaditya Chatterjee
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
Jeetaditya Chatterjee
de052a7a92
docs(tree-sitter): add goto binding table 2022-05-24 15:38:31 +01:00
Jeetaditya Chatterjee
33de147b8f
bump: :tools tree-sitter
emacs-tree-sitter/tree-sitter-langs@0dd5e56e2f -> emacs-tree-sitter/tree-sitter-langs@deb2d8674b
meain/evil-textobj-tree-sitter@bfdef5a292 -> meain/evil-textobj-tree-sitter@0bf5bbbfec
2022-05-23 20:01:59 +01:00
Jeetaditya Chatterjee
84d47016d0
fix(tree-sitter): no longer eager load tree sitter 2022-05-22 21:26:10 +01:00
Jeetaditya Chatterjee
984564ea6c
bump: :tools tree-sitter
emacs-tree-sitter/elisp-tree-sitter@5e1091658d -> emacs-tree-sitter/elisp-tree-sitter@3cfab8a0e9
meain/evil-textobj-tree-sitter@e5fda8eca9 -> meain/evil-textobj-tree-sitter@bfdef5a292
2022-05-22 21:26:09 +01:00
Jeetaditya Chatterjee
65207ab3dc
docs(tree-sitter): add rebinding keys section 2022-05-22 21:26:09 +01:00
Jeetaditya Chatterjee
def8c05371
bump: :tools tree-sitter
emacs-tree-sitter/tree-sitter-langs@f4effc81fc -> emacs-tree-sitter/tree-sitter-langs@0dd5e56e2f
meain/evil-textobj-tree-sitter@f3b3e9554e -> meain/evil-textobj-tree-sitter@e5fda8eca9
2022-05-22 21:26:09 +01:00
Jeetaditya Chatterjee
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
Jeetaditya Chatterjee
74fc2a87c9
tweak(tree-sitter): gate textobj maps 2022-05-22 21:26:08 +01:00
Jeetaditya Chatterjee
561eb533a8
nit(tree-sitter): remove defer, its redundant 2022-05-22 21:26:08 +01:00
Jeetaditya Chatterjee
56d0f02f31
feat(tree-sitter): add tree-sitter! autodef 2022-05-22 21:26:07 +01:00
Jeetaditya Chatterjee
c6a006dd68
docs(tree-sitter): replace {add,remove}-hook!
these are redundant in these contexts
2022-05-22 21:26:07 +01:00
Jeetaditya Chatterjee
869aefb523
docs(tree-sitter): remove no textobj found entry
This is no longer needed as this has been resolved upstream
2022-05-22 21:26:07 +01:00
Jeetaditya Chatterjee
12bf2e0b2f
bump: :tools tree-sitter
emacs-tree-sitter/tree-sitter-langs@599570cd2a -> emacs-tree-sitter/tree-sitter-langs@f4effc81fc
meain/evil-textobj-tree-sitter@ff733576d1 -> meain/evil-textobj-tree-sitter@f3b3e9554e
2022-05-22 21:26:07 +01:00
Jeetaditya Chatterjee
372565af0d
bump: :tools tree-sitter
emacs-tree-sitter/elisp-tree-sitter@771239bace -> emacs-tree-sitter/elisp-tree-sitter@5e1091658d
emacs-tree-sitter/tree-sitter-langs@a9b0390a75 -> emacs-tree-sitter/tree-sitter-langs@599570cd2a
meain/evil-textobj-tree-sitter@607b71f38a -> meain/evil-textobj-tree-sitter@ff733576d1
2022-05-22 21:26:06 +01:00
Jeetaditya Chatterjee
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
Jeetaditya Chatterjee
93b6f8adfb
docs(tree-sitter): update text obj table 2022-05-22 21:26:06 +01:00
Jeetaditya Chatterjee
3ccfc3d847
docs(tree-sitter): remove m1 warning
also remove unneeded apostroph
2022-05-22 21:26:06 +01:00
Jeetaditya Chatterjee
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
Jeetaditya Chatterjee
a9bc2f08dc
bump: :tools tree-sitter
emacs-tree-sitter/elisp-tree-sitter@48b06796a3 -> emacs-tree-sitter/elisp-tree-sitter@771239bace
emacs-tree-sitter/tree-sitter-langs@3c0c82f9fb -> emacs-tree-sitter/tree-sitter-langs@a9b0390a75

this is to support both the new M1 macs and adding the haskell grammer
2022-05-22 21:26:05 +01:00
Jeetaditya Chatterjee
084d0a6918
docs(tree-sitter): mention typescript-tsx support 2022-05-22 21:26:05 +01:00
Jeetaditya Chatterjee
e3b5798a58
docs(tree-sitter): mention goto 2022-05-22 21:26:05 +01:00
Jeetaditya Chatterjee
89f82428e6
feat(tree-sitter): goto functionality 2022-05-22 21:26:05 +01:00
Jeetaditya Chatterjee
75897af036
bump: :tools tree-sitter evil-textobj-tree-sitter
meain/evil-textobj-tree-sitter@08823ff972 -> meain/evil-textobj-tree-sitter@607b71f38a
2022-05-22 21:26:05 +01:00
Jeetaditya Chatterjee
4e870be9ab
docs(tree-sitter): add no text object found error 2022-05-22 21:26:04 +01:00
Jeetaditya Chatterjee
c1bea42fa0
bump: :tools tree-sitter
emacs-tree-sitter/elisp-tree-sitter@8bbbfa4fc5 -> emacs-tree-sitter/elisp-tree-sitter@48b06796a3
emacs-tree-sitter/tree-sitter-langs@86a894a617 -> emacs-tree-sitter/tree-sitter-langs@3c0c82f9fb
meain/evil-textobj-tree-sitter@4d79ea7121 -> meain/evil-textobj-tree-sitter@08823ff972

- This fixes the java issue where switch expressions were erroring,
- Roll back evil text obj tree sitter as ruby text objects became un
- usable, see https://github.com/emacs-tree-sitter/elisp-tree-sitter/issues/180
2022-05-22 21:26:04 +01:00
Jeetaditya Chatterjee
e01e58c773
docs(tree-sitter): add param to text obj table 2022-05-22 21:26:04 +01:00
Jeetaditya Chatterjee
7534ce8fa7
feat(tree-sitter): add parameter text object
this will replace evil-{inner,outer}-arg
2022-05-22 21:26:04 +01:00
Jeetaditya Chatterjee
e756d0b447
docs(tree-sitter): add m1 warning to readme
also fix small spelling mistake
2022-05-22 21:26:04 +01:00
Jeetaditya Chatterjee
1f5618f02b
docs(tree-sitter): add documentation sections
also add a line to the quote
2022-05-22 21:26:03 +01:00
Jeetaditya Chatterjee
6508579595
docs(tree-sitter): add docs for disabling text-obj
for certain modes, this also removes the hacks section as it was not
needed
2022-05-22 21:26:03 +01:00
Jeetaditya Chatterjee
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
Jeetaditya Chatterjee
66012fb413
bump: :tools tree-sitter
emacs-tree-sitter/elisp-tree-sitter@4d9871d239 -> emacs-tree-sitter/elisp-tree-sitter@8bbbfa4fc5
emacs-tree-sitter/tree-sitter-langs@fa47b55f7b -> emacs-tree-sitter/tree-sitter-langs@86a894a617
meain/evil-textobj-tree-sitter@eedc1f5461 -> meain/evil-textobj-tree-sitter@4d79ea7121
2022-05-22 21:26:03 +01:00
Jeetaditya Chatterjee
2a7442da74
nit(tree-sitter): cleanup
remove dead lines
remove old code comments
add in hack... thingy?
2022-05-22 21:26:02 +01:00
Ellis Kenyo
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
Jeetaditya Chatterjee
8d27b2bf90
nit(tree-sitter): remove outdated comments 2022-05-22 21:26:01 +01:00
Jeetaditya Chatterjee
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