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
Jeetaditya Chatterjee
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
Jeetaditya Chatterjee
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
Jeetaditya Chatterjee
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
Jeetaditya Chatterjee
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
Jeetaditya Chatterjee
c0637e9e00
bump: :tools tree-sitter
...
emacs-tree-sitter/elisp-tree-sitter@588170ffbd -> emacs-tree-sitter/elisp-tree-sitter@4d9871d239
emacs-tree-sitter/tree-sitter-langs@81adcdc06a -> emacs-tree-sitter/tree-sitter-langs@fa47b55f7b
meain/evil-textobj-tree-sitter@fe4d738486 -> meain/evil-textobj-tree-sitter@eedc1f5461
2022-05-22 21:25:59 +01:00
Jeetaditya Chatterjee
9a34308246
bump: :tools tree-sitter
...
emacs-tree-sitter/elisp-tree-sitter@c7a1c34549 -> emacs-tree-sitter/elisp-tree-sitter@588170ffbd
emacs-tree-sitter/tree-sitter-langs@e7b8db7c40 -> emacs-tree-sitter/tree-sitter-langs@81adcdc06a
meain/evil-textobj-tree-sitter@f20598676f -> meain/evil-textobj-tree-sitter@fe4d738486
2022-05-22 21:25:59 +01:00
Jeetaditya Chatterjee
e72930c433
docs(tree-sitter): add better wording to readme
2022-05-22 21:25:59 +01:00
Daanturo
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
Jeetaditya Chatterjee
56432f1649
test(tree-sitter): remove test.js
...
It does not belong in the module or the repo
2022-05-22 21:25:59 +01:00
Jeetaditya Chatterjee
6dd678a53c
docs(tree-sitter): mention text object bindings
2022-05-22 21:25:58 +01:00
Jeetaditya Chatterjee
727fcb2fcc
nit(tree-sitter): add rationale for debug mode var
2022-05-22 21:25:58 +01:00
Jeetaditya Chatterjee
afb1694b2b
docs(tree-sitter): add links to support in feature
...
- Add two feature subsections discussing with links to
- languages that have parsers
- languages that have highlighting support
- languages that have text object support and what text objects they
- have support for
- Fix capitalisation
2022-05-22 21:25:58 +01:00
Jeetaditya Chatterjee
9251ea9db7
docs(tree-sitter): add doctor check for modules
...
modules support it required by tree sitter to work.
2022-05-22 21:25:58 +01:00
Jeetaditya Chatterjee
b610b47b90
docs(tree-sitter): make wording more verbose
...
include 'like other text objects' to draw similarities and make the use
case clear
2022-05-22 21:25:57 +01:00
Jeetaditya Chatterjee
145d75eaaa
fix(tree-sitter): bind text-objs to keys
2022-05-22 21:25:57 +01:00
Jeetaditya Chatterjee
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
Jeetaditya Chatterjee
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