Commit graph

17177 commits

Author SHA1 Message Date
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
Henrik Lissner
c183aa7174
fix(everywhere): inhibit local-vars hooks
Indirectly suppresses LSP (and other) servers, which will likely not
function correctly in emacs-everywhere's temp buffers anyway.
2022-04-22 23:36:05 +02:00
Itai Y. Efrat
7640631300 docs(bidi): fix #+DATE field in readme 2022-04-22 16:01:42 +02:00
Henrik Lissner
3f5c111b42
dev: revise warnings in issue templates
Ref: #6322
2022-04-22 05:25:33 +02:00
iyefrat
d41cff489f
module: add :input bidi
* module: add :input bidi

Co-authored-by: Yoav Marco <yoavm448@gmail.com>

* docs(bidi): flesh out README.org

Co-authored-by: Itai Y. Efrat <itai3397@gmail.com>

* feat(bidi): add +bidi-global-mode

* docs(bidi): improve font setting instructions

* feat(bidi): add +bidi-(hebrew|arabic)-font

Since the Hebrew and Arabic unicode blocks cover the vast majority of
RTL languages used today, we provide these fonts so end users don't have
to bother with setting up the hooks themselves.

* feat(bidi): add smart fontify

Adds support for using the bidi fonts on surrounding whitespace and
punctuation through. On by default, customizable through
+bidi-want-smart-fontify and +bidi-smart-fontify-keywords.

Also adds face versions of the bidi fonts.

* docs(bidi): recommend known good nastaliq fonts

* fix(bidi): re-set bidi faces after changing fonts

* feat(bidi): add +bidi-paragraph-direction

This allows users to choose what bidi-paragraph-direction is set to when
+bidi-mode is on, so they can choose if they want per paragraph
alignment (the default) or to force everything to be aligned RTL

* docs(bidi): conform to verbatim/code conventions

* docs(bidi): add font overview to Features

* docs(bidi): warn on rtl forced alignment footgun

+bidi-paragraph-direction is a nice variable to have if you primarily
use +bidi-mode for rtl text buffers, but it shouldn't be used in
conjunction with +bidi-global-mode since it messes up English buffers.

Co-authored-by: Yoav Marco <yoavm448@gmail.com>
2022-04-22 00:21:32 +02:00
Henrik Lissner
fbfc635300
fix(cli): GIT_CONFIG* envvars leaking child processes
When launching Doom via 'doom run', the child process inherits
bin/doom's environment. This change restricts this sub-environment to
the intended target: straight and its use of git.

Fix: #6320
2022-04-21 22:36:36 +02:00
Henrik Lissner
8c03fa0e3d
fix: set face :font instead of frame font parameter
Information is lost when converting font-spec's to xlfd strings (mainly,
DPI), in order to make them compatible with the face frame parameter. To
avoid this, we set the faces' :font attribute instead, which natively
accept font specs, xlfd strings, font objects, and xft strings; no
conversion necessary.

Fix: #6131
2022-04-21 22:36:36 +02:00
pancho horrillo
f51a2cdd3a
fix(python): usage of obsolete alias letf
Amend: 04b76fd0ce
2022-04-18 18:14:16 +02:00