Commit graph

17626 commits

Author SHA1 Message Date
Jeetaditya Chatterjee
caa64e8324
feat(fold): change ts-fold replacement face
this is to make it similar to hideshow
2022-05-22 21:26:02 +01:00
Jeetaditya Chatterjee
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
Jeetaditya Chatterjee
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
Jeetaditya Chatterjee
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
Jeetaditya Chatterjee
83d22fe5ef
feat(fold): add ts-fold 2022-05-22 21:26:01 +01:00
Jeetaditya Chatterjee
8d27b2bf90
nit(tree-sitter): remove outdated comments 2022-05-22 21:26:01 +01:00
Jeetaditya Chatterjee
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
Jeetaditya Chatterjee
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
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
f937be2156
docs(tree-sitter): add entry to modules.org 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
Henrik Lissner
8a27eb99be
perf(org): optimize org-roam node listings
org-roam-get-keyword performs some file IO to read file keywords from
all nodes. This can be slow with long node lists. With
org-roam/org-roam#1963, file title is baked into the schema, so we don't
need to do this work anymore.

Ref: org-roam/org-roam#1963
Fix: #6382
2022-05-09 15:43:32 +02:00
Henrik Lissner
0e2fa0ba19
fix(lib): type error on doom/restart-and-restore
On Windows, restart-emacs doesn't escape its arguments properly (#6219).
56686f677a attempted to fix this, but ended up breaking it for
everyone else as well, causing the type error:

  Wrong type argument: listp, "--eval \"(add-hook 'window-setup-hook #'doom-load-session 100)\""

This commit fixes both the regression and the original issue.

Amend: 56686f677a
Fix: #6219
2022-05-09 15:36:20 +02:00
Henrik Lissner
80cd7557e1
fix(lib): doom-files-in's :map causing type errors
This regression was introduced in 10d00b7cc4, causing
"wrong-type-argument: stringp (X . Y)" errors. It is triggered when
doom-files-in is used with a non-nil :map on a nested directory
tree (like our module tree).

Fix: #6370
Amend: 10d00b7cc4
2022-05-05 20:32:54 +02:00
Henrik Lissner
98274f2558
dev(ci): update commit linter config
To adapt to efforts made in 00e0733 to generalize its API.

Also fixes a 'Keyword argument :X not one of (:type)' error.

Ref: 4bae9ffa47
2022-05-05 15:35:42 +02:00
Henrik Lissner
f281971206
feat(ci): generalize 'doom ci deploy-hooks'
By default, 'doom ci deploy-hooks' would deploy Doom's git hooks in
$EMACSDIR (~/.emacs.d/.git/hooks). Now it deploys in the local repo its
run in. This is part of an effort to generalize Doom's CI for use
outside this repo.

Ref: 4bae9ffa47
2022-05-05 15:35:33 +02:00
Henrik Lissner
4bae9ffa47
refactor(ci): generalize commit linter api
Continues from 47d1b82 as part of an effort to generalize Doom's CI for
use outside this repo:

- 'doom ci ...' commands now:
  - Run in the context of the local repo where they're run, rather than
    from Doom's install directory ($EMACSDIR).
  - Load the first of $REPO_ROOT/.github/ci.el, $DOOMDIR/cli.el, or
    $DOOMDIR/cli.el, before executing CI commands. This allows for
    per-project configuration, for example:
    - https://github.com/doomemacs/doomemacs/blob/master/.github/ci.el
    - https://github.com/doomemacs/themes/blob/master/.github/ci.el
    (Details may change post-3.0)
- Scopeless commit types are now enforced in `doom-cli-commit-scopes`,
  rather than `doom-cli-commit-rules`. This lets you specify exceptions,
  like 0597466261.
- `doom-cli-commit-scopes` now supports sub-lists, as an easy way to
  permit type-local scopes. E.g. To allow 'install' and 'faq' scopes
  only for 'docs:' commits.

    (add-to-list 'doom-cli-commit-scopes '(docs "install" "faq"))

  These sublists accepts predicates too.
- Fixed the link to git conventions in the linter's failure/warning
  output, to point to our Discourse post.

Ref: https://github.com/doomemacs/doomemacs/blob/master/.github/ci.el
Ref: https://github.com/doomemacs/themes/blob/master/.github/ci.el
Ref: 0597466261
Amend: 47d1b82382
2022-05-05 15:32:35 +02:00
Henrik Lissner
10d00b7cc4
fix(lib): unused :map property in doom-files-in 2022-05-05 15:20:07 +02:00
Itai Y. Efrat
258104f750 refactor(lsp): remove emacs 26 workarounds 2022-05-05 02:19:52 +02:00
Abdelhak Bougouffa
64b0e42260 docs: update repo links in readme 2022-05-05 02:18:41 +02:00
Henrik Lissner
03bed00fd3
dev: remove pull request template
So it falls back to our org default template.

Ref: https://github.com/doomemacs/.github/blob/main/.github/PULL_REQUEST_TEMPLATE.md
2022-05-05 02:10:52 +02:00
Henrik Lissner
ab138c0b32
dev(ci): read scopes from local modules/docs
Instead of (only) reading the workflow's internal doomemacs install.

Amend: 0f6a653a13
2022-05-04 23:26:37 +02:00
Henrik Lissner
47d1b82382
tweak(ci): generalize commit linter defaults
So Doom can be used for general CI/CD (as part of doomemacs/ci). These
settings can be configured in .github/ci.el by default.

Ref: 0f6a653a13
2022-05-04 22:44:28 +02:00
Henrik Lissner
0f6a653a13
dev(ci): use doomemacs/ci commit linter
And move repo-specific linter config into .github/ci.el
2022-05-04 22:41:42 +02:00
Henrik Lissner
0db9014e89
dev: fix link to third party resources 2022-05-04 18:26:56 +02:00
Henrik Lissner
dcf3e873bf
dev: update labels in issue templates
Our labels were recently redesigned for consistency across our org
repos.
2022-05-04 17:06:58 +02:00
Henrik Lissner
7a30582505
dev: use doomemacs/ci@legacy 2022-05-03 18:38:21 +02:00
Henrik Lissner
47269c506c
dev: auto-add issues to project board
With this we can slowly transition away from the unhelpful deluge of
Github status labels.

Ref: https://github.com/orgs/doomemacs/projects/2/views/1
2022-05-03 03:02:31 +02:00
Henrik Lissner
3b789752a3
fix: user/system git config breaking straight installer
Fix: #6346
2022-05-02 02:12:59 +02:00
Henrik Lissner
0597466261
release(modules): 22.05.0-dev
Ref: 2b39e41368
2022-05-02 01:39:15 +02:00
Henrik Lissner
56686f677a
fix(lib): improper quoting in restart-emacs command
Should be addressed upstream, but restart-emacs hasn't been updated in
nearly two years, so I temporarily fix it here.

Fix: #6219
2022-05-02 01:39:10 +02:00
Colin Woodbury
6bf725837d fix(fortran): account for spaces in filenames 2022-04-26 03:58:14 +02:00
Samuel Tschiedel
488ad07cc5 fix(evil): define *-any-quote directly
Defining `*-any-quote` objects via the exiting `*-block` helpers leads
to incorrect behaviour, where the trailing boundary is also included as
part of the selection (cursor on `|`, selection between `|`):

```
start: "te|st"
v i q: "|test"|
```

The expected behaviour is the same as `v i "`:
```
start: "te|st"
v i q: "|test|"
```

Fix: #5698
2022-04-25 16:38:40 +02:00
Henrik Lissner
65ff263668
fix(vertico): backspace keybind for tty users
The input event, [backspace], is only emitted in GUI Emacs, not TTY
Emacs.

Ref: https://discourse.doomemacs.org/t/2491/3
2022-04-22 23:36:05 +02:00