Commit Graph

17222 Commits

Author SHA1 Message Date
7a7565cedf nit(sh): revert formatting
snuck in when running the formatter
2022-05-22 21:26:08 +01:00
4334eb285f nit(fold): fix non idiomatic code
- remove final t in cond
- replace cond with if
- replace seq-filter with cl-remove-if-not
2022-05-22 21:26:08 +01:00
cd6cb8c499 fix(tree-sitter): check tree-sitter-mode is bound
and-true-p
2022-05-22 21:26:08 +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
56d0f02f31 feat(tree-sitter): add tree-sitter! autodef 2022-05-22 21:26:07 +01:00
c6a006dd68 docs(tree-sitter): replace {add,remove}-hook!
these are redundant in these contexts
2022-05-22 21:26:07 +01:00
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
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
cc238dd666 bump: :editor fold ts-fold
jcs090218/ts-fold@d6fbca3748 -> jcs090218/ts-fold@01d6485398
2022-05-22 21:26:07 +01:00
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
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
955e2d461b nit(javascript): add hook to end of rjsx-mode 2022-05-22 21:26:06 +01:00
93b6f8adfb docs(tree-sitter): update text obj table 2022-05-22 21:26:06 +01:00
3ccfc3d847 docs(tree-sitter): remove m1 warning
also remove unneeded apostroph
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
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
084d0a6918 docs(tree-sitter): mention typescript-tsx support 2022-05-22 21:26:05 +01:00
e9f98001c1 feat(tree-sitter): support typescript-tsx-mode 2022-05-22 21:26:05 +01:00
e3b5798a58 docs(tree-sitter): mention goto 2022-05-22 21:26:05 +01:00
89f82428e6 feat(tree-sitter): goto functionality 2022-05-22 21:26:05 +01:00
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
4e870be9ab docs(tree-sitter): add no text object found error 2022-05-22 21:26:04 +01:00
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
e01e58c773 docs(tree-sitter): add param to text obj table 2022-05-22 21:26:04 +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
e756d0b447 docs(tree-sitter): add m1 warning to readme
also fix small spelling mistake
2022-05-22 21:26:04 +01:00
f73c7915d2 docs(tree-sitter): add module to example init
also add the wittism to the modules.org file
2022-05-22 21:26:03 +01:00
1f5618f02b docs(tree-sitter): add documentation sections
also add a line to the quote
2022-05-22 21:26:03 +01:00
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
0c2f986708 feat(:lang): enable ts text objs in modes 2022-05-22 21:26:03 +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
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
2a7442da74 nit(tree-sitter): cleanup
remove dead lines
remove old code comments
add in hack... thingy?
2022-05-22 21:26:02 +01:00
32bf2ee4cf fix(tree-sitter): message raised when jumping up
as opposed to a nasty error,
the error was raised because I was not using the abs of count
this commit also comes with general code cleanup,
this includes
- removal of the eval quasiquote antipattern when an apply would work
better
- use of the :key keyword instead of the lambda
2022-05-22 21:26:02 +01:00
6127692848 fix(fold): handle bounding error
This basically stops the "not overlay" error we were getting when you
tried to jump to many times. this does have the disadvantage of not
jumping at all if the amount of jumps is higher than the amount of
overlays but this can be fixed in a future commit if necessary.
2022-05-22 21:26:02 +01:00
c16e16e92b feat(fold): define ts-fold movement logic
As ts-fold does not provide fold movement logic I made my own. This can
and probably should be upstreamed but the details for that are not clear
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
caa64e8324 feat(fold): change ts-fold replacement face
this is to make it similar to hideshow
2022-05-22 21:26:02 +01:00
7b9d00d661 feat(tree-sitter): add ts to open/close all
also refactor +fold-open-all, +fold-close-all to use cond instead of the
when case for vimish fold.
2022-05-22 21:26:01 +01:00
c3e360eeaa tweak(tree-sitter): add tree sitter check to foldp
instead of just checking if ts-fold is enabled I also check i
tree-sitter mode is actually enabled if not it will move onto hidehshow
2022-05-22 21:26:01 +01:00
c1f640209a feat(fold): add ts-fold support to wrappers
Changes:
- add +fold--ts-fold-p which only checks if the feature is around
- add ts-fold into +fold/toggle, +fold/open, +fold/close
- update doc strings
2022-05-22 21:26:01 +01:00
83d22fe5ef feat(fold): add ts-fold 2022-05-22 21:26:01 +01:00
8d27b2bf90 nit(tree-sitter): remove outdated comments 2022-05-22 21:26:01 +01:00
547860e847 docs(tree-sitter): add doctor checks for flag
add in a check ala lsp, this has been applied to every module with tree
sitter support
2022-05-22 21:26:00 +01:00
06ed5ade3f refactor!(tree-sitter): add +tree-sitter flag
BREAKING CHANGE: break the global nature of the tree sitter
module by adding a +tree-sitter flag to every applicable module

In the background this hooks turn-on-tree-sitter-mode
to the major-mode-hook of the language.
This may also solve the eager loading of tree sitter
2022-05-22 21:26:00 +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