Commit Graph

4623 Commits

Author SHA1 Message Date
Henrik Lissner
4abdf07507 docs(javascript): add/revise docstrings 2025-08-31 18:40:40 +02:00
Henrik Lissner
247b630cbd refactor(javascript): remove vestigial tide/skewer functions
Amend: bd0bee92cc
2025-08-31 18:39:18 +02:00
Henrik Lissner
3e7a20f972 fix(:lang): project minor mode detection in ts-modes 2025-08-31 16:33:32 +02:00
Henrik Lissner
09c01e04e6 fix(javascript): vestigial npm-mode reference
npm-mode was removed in bd0bee9.

Amend: bd0bee92cc
2025-08-31 16:31:30 +02:00
Henrik Lissner
1dae2bf916 fix(tree-sitter): remap to ts-mode w/o base mode
If the base major mode doesn't exist, let's assume we want no
fallthrough for this major mode (in the event the grammar isn't ready)
and simply push forward anyway, even if a missing grammar results in a
broken state.

This will particularly affect major modes like `typescript-mode` (which
simply won't be installed if +tree-sitter is enabled) and
`go-{mod,work}-ts-mode` (for which no base major modes exist).

The difference (generally) between most base and ts-modes is
performance, not features, so "gracefully failing back to the base mode"
makes sense UX-wise, but `typescript-mode` notably inferior to
`typescript-ts-mode` (particularly in its TSX support). Beginners may
misidentify its shortcomings as bugs, so it's better to simply error out
early so the user can be made aware of the problem sooner and less
ambiguously.
2025-08-31 16:20:14 +02:00
Henrik Lissner
5cda3ed25a merge: branch 'feature/treesit'
Fix: #7742
Fix: #7623
Fix: #7593
2025-08-31 14:55:37 +02:00
Henrik Lissner
571766e6ba fix(qt): eglot support
Also refactor module out of autoload.el into config.el (now that it's
non-trivial).

Ref: doomemacs/community#24
2025-08-31 14:47:03 +02:00
Henrik Lissner
86b6ba81ac fix(go): go-{mod,work}-ts-mode 2025-08-31 14:40:58 +02:00
Henrik Lissner
d545fccf47 fix(:lang): missing grammar recipes
I removed the grammar recipes in 3b58741 to avoid redundancy with the
upstream recipes, but didn't realize that those upstream recipes weren't
added until Emacs 31, so users on 30 and older would get errors when
trying to install any missing grammars.

This also establishes a hard dependency between :lang (php +tree-sitter)
and :lang ({javascript,web} +tree-sitter).

Amend: 3b58741522
2025-08-31 14:39:38 +02:00
Henrik Lissner
83eba01bff refactor(python): string= first, then executable-find
The latter is a little slower depending on the order of $PATH.
2025-08-31 09:50:05 +02:00
Henrik Lissner
7dd66cc3d7 fix(php): remove unused async dependency
No longer needed without php-extras (removed in 9e5e4cf).

Amend: 9e5e4cf78b
2025-08-30 15:48:29 +02:00
Henrik Lissner
6084404a07 docs(beancount): flesh out module readme 2025-08-30 11:58:22 +02:00
Henrik Lissner
d77d39ab46 refactor(scala): remove redundant config
Amend: c5dd2847ff
2025-08-30 10:30:26 +02:00
Henrik Lissner
bcb2c56dd9 fix(haskell): haskell-ts-mode: repl & eglot integration
Amend: 47fe11cd76
2025-08-30 10:30:26 +02:00
Henrik Lissner
0ba85c8f77 refactor(lua): DRY tree-sitter config 2025-08-30 10:30:26 +02:00
Henrik Lissner
ab4dace692 refactor(:lang): remove redudant mode-alist lines
Amend: 3b58741522
2025-08-30 10:30:26 +02:00
Henrik Lissner
2870697e1a fix(go,nix,zig): dynamic keymap interpolation errors
Amend: 7c6e1950e8
Amend: 5b37bfee23
Amend: 9acc5f48b6
2025-08-30 10:30:21 +02:00
Henrik Lissner
9e5e4cf78b refactor!(php): remove php-extras
BREAKING CHANGE: The PHP API data file no longer exists on php.net, and
there is no substitute, and php-extras is no longer maintained, so this
package is defunct and leaves php buffers in an error state. This
deprives non-LSP users from eldoc and naive code completion. The
alternative is to simply adopt LSP.
2025-08-30 00:56:03 +02:00
Henrik Lissner
3044812ac1 fix(clojure): remove vestiges of tree-sitter
Amend: 2adbdf1360
2025-08-29 18:23:18 +02:00
Henrik Lissner
31f5b60f5e fix(php): dynamic mode map interpolation error
Amend: 9073b24878
Close: #8448
Co-authored-by: ribaricplusplus <ribaricplusplus@users.noreply.github.com>
2025-08-29 17:56:55 +02:00
Henrik Lissner
bd0bee92cc feat!(javascript): add treesit support
BREAKING CHANGE: This commit removes a number of core packages and
features from this module and only replaces a handful of them, so that
we can lean more on LSP and tree-sitter. To be specific:

- We used to rely on `rjsx-mode` (derived from js2-mode) for total
  JS/JSX support (though imperfect; Emacs was starved for options at the
  time). This has now been replaced with `js-ts-mode` (built-in after
  Emacs 29), falling back to `js-mode` (very rudimentary, but a decent
  fallback).
- This also meant the removal of `js2-mode`, which `skewer-mode`,
  `js2-refactor`, and `xref-js2` depended on, so those were removed
  too, and have *somewhat* been replaced with LSP integration (offers
  jump-to-definition/references and *some* refactoring actions, but no
  replacement for skewer's functionality).
- Typescript support no longer relies on the jury-rigged, web-mode-derived
  major mode (because TSX support in the upstream `typescript-mode`
  isn't great). We now use `typescript-ts-mode` (built-in into Emacs
  29.1+), falling back to `typescript-mode`.
- JSX/TSX support now *requires* tree-sitter (and Emacs 29.1+), where
  `tsx-ts-mode` is available and outshines all the alternatives (at the
  time of writing).

Due to the absolute chaos that is webdev, this module sacrifices some of
the graceful-degradation I've implemented for other modules and creates
a hard requirement on tree-sitter and Emacs 29.1+ for JSX/TSX. It still
tries to degrade gracefully for plain JS and TS, but the module's doctor
and docs will actively recommend tree-sitter.

Close: #5278
Fix: #6172
Fix: #7042
Close: #8447
Co-authored-by: ribaricplusplus <ribaricplusplus@users.noreply.github.com>
2025-08-29 14:35:49 +02:00
Henrik Lissner
d20c5f1273 docs(haskell): mention haskell-ts-mode package
Amend: 47fe11cd76
2025-08-28 14:32:08 +02:00
Henrik Lissner
f782b79797 feat(graphql): add treesit support 2025-08-28 14:32:08 +02:00
Henrik Lissner
93c085fa13 feat(qt): add treesit (and lsp) support 2025-08-28 14:32:08 +02:00
Henrik Lissner
cfadd8f6a4 feat(sml): add treesit (and lsp) support 2025-08-28 14:00:59 +02:00
Henrik Lissner
5bf132a80f feat(web): add treesit support (for html/css) 2025-08-27 17:38:40 +02:00
Henrik Lissner
6b203d74c9 refactor(sh): remove tree-sitter support
bash-ts-mode is inferior to shell-script-mode's syntax highlighting and
no other *-ts-mode modes are available for other shells (though,
there *are* powershell and nushell ts-modes; I'll investigate those
later).
2025-08-27 17:32:56 +02:00
Henrik Lissner
07e7c699cf feat(java): add treesit support 2025-08-27 17:29:58 +02:00
Henrik Lissner
6ca155ea11 refactor(ess): remove tree-sitter support
No *-ts-mode exists for ess-r-mode (or any other ess mode, afaik). The
ess module will fall back to font-lock rules so this is not a breaking
changing.
2025-08-27 17:29:58 +02:00
Henrik Lissner
bf85767975 refactor(graphviz): remove tree-sitter support
No *-ts-mode exists for graphviz-dot-mode. The graphviz module will fall
back to font-lock rules so this is not a breaking changing.
2025-08-27 17:29:58 +02:00
Henrik Lissner
3d2abf8b05 feat(erlang): add treesit support 2025-08-27 17:29:58 +02:00
Henrik Lissner
bee45157c6 refactor(elm): remove tree-sitter support
No *-ts-mode exists for elm-mode. The elm module will fall back to
font-lock rules so this is not a breaking changing.
2025-08-27 17:29:58 +02:00
Henrik Lissner
c1ac8bc37a refactor(ocaml): remove tree-sitter support
No *-ts-mode exists for tuareg-mode. There *is* a ocaml-ts-mode, but
it's too rudimentary. The ocaml module will fall back to font-lock rules
so this is not a breaking changing.
2025-08-27 17:29:28 +02:00
Henrik Lissner
47fe11cd76 feat(haskell): add treesit support 2025-08-27 17:29:14 +02:00
Henrik Lissner
086a0d30d0 feat(rust): add treesit support 2025-08-27 16:57:39 +02:00
Henrik Lissner
3b58741522 refactor(tree-sitter): centralize grammar config & hacks
Easier to track and maintain.
2025-08-27 16:57:28 +02:00
Henrik Lissner
13ffb0fed3 refactor(org): remove +org-fix-newline-and-indent-in-src-blocks-a
Our rebinding of RET to +org/return in insert mode, already
accompolishes was this advice sets out to do.
2025-08-23 12:33:24 +02:00
Henrik Lissner
41876aa036 refactor(org): remove +org-fix-window-excursions-a
Changes upstream (to honour display-buffer-alist) seem to have addressed
what this advice was deployed for.

Ref: #6061
2025-08-23 12:31:11 +02:00
Henrik Lissner
5217ba75a2 refactor(org): remove +org--respect-org-auto-align-tags-a
`org-auto-align-tags` checks were added upstream in all editing
commands, so this advice is no longer needed.

Ref: emacs-straight/org-mode@aa71facf6d
2025-08-23 11:59:01 +02:00
Henrik Lissner
2129fffc79 bump: :lang beancount emacs-lisp markdown
Wilfred/elisp-def@1ad4baccbf -> Wilfred/elisp-def@2451ed6594
ardumont/markdown-toc@1b0c5ae7f3 -> ardumont/markdown-toc@e3429d3014
beancount/beancount-mode@ddd4b87257 -> beancount/beancount-mode@eb8b9b72a7
jorgenschaefer/emacs-buttercup@c467c659b2 -> jorgenschaefer/emacs-buttercup@cc5a2ab7c7
jrblevin/markdown-mode@90ad4af79a -> jrblevin/markdown-mode@d51c469133
seagle0128/grip-mode@96a927dce6 -> seagle0128/grip-mode@11fecd5b38
2025-08-21 16:47:37 +02:00
Daniel G Travieso
3ab397b520 bump: ob-restclient
alf/ob-restclient.el@8183f8af08 -> alf/ob-restclient.el@94dd9cd98f

newer `restclient` version (in use) sets to buffer to `view-mode`
ob-restclient works around this by exiting it manually

Fix: #8461
2025-08-21 14:50:27 +02:00
Alex Birdsall
4afe5ca09a fix(org,cli): tangle: load ob-* libs for noweb-usable blocks
For performance reasons, Doom CLI runs in a minimal environment wherein
no `ob-<language>` libraries are initially loaded; but tangling a
document with noweb-enabled blocks can trigger an org-babel evaluation
of any noweb-addressable block; and any such evaluation will fail
tangling with an error unless the correct `ob-<language>` library has
been loaded.

So. This changes the tangle CLI function to note any noweb-addressable
labels (i.e. any `#+NAME:` or `:noweb-ref` associated with a block) when
iterating through the source document's blocks; for each block where one
is found, it conditionally attempts to `require` the corresponding
`ob-<src-lang>` library.
2025-08-10 15:49:18 +02:00
Henrik Lissner
dd33275dc2 bump: :lang rest
emacsorphanage/restclient@e2a2b13482 -> emacsorphanage/restclient@bba663590f
ljos/jq-mode@eeb86b4d5a -> ljos/jq-mode@3275c3f53f

Fix: doomemacs/discussions#14
2025-08-10 15:34:44 +02:00
Tim Ruffing
9219fa7c08 fix(latex): disable smartparens pairs conflicting with AucTeX
This disables smartparens pairs for quotation marks, which are broken.
Before this commit, typing a LaTeX comment
    % "Foo"
inserted
    % ''Foo`|`''
where | indicates the position of the cursor (wtf!).

Let's better AucTeX's support for quotation marks for now and accept
that the user won't get automatic insertions of closing quotation marks.

This also removes a wrong comment mentioning the non-existing variable
`+latex-enable-plain-double-quotes'.
2025-08-09 22:58:37 +02:00
Tim Ruffing
ac530efe87 refactor(latex): reformat code for readability 2025-08-09 22:58:37 +02:00
Henrik Lissner
b6cbfea53d refactor(org): remove +org--follow-search-string-a
This was upstreamed.

Ref: https://cgit.git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=95554543b
2025-07-13 22:28:34 +02:00
Henrik Lissner
29ec1f40f3 feat(org): jupyter-repl: move cursor to prompt on self-insert-command
Ala 3384414, but for jupyter-repl, which isn't a comint-derived.

Ref: 3384414e957f
2025-07-13 22:28:34 +02:00
Henrik Lissner
6bd38e2c4d tweak(python): don't use basedpyright by default
Because of the python dev's propensity to use env managers, setting the
pyright executable globally doesn't make much sense, and could in fact
end up intrusively overriding a user's local settings.

A better approach may be to introduce an envvar here that can be set
from external .envrc or venv config files, or making
`lsp-pyright-langserver-command` a safe file-local variable (so it can
be set from .dir-locals.el or in the file-local variables of a python
file), but if I decide to do one or the other, I'd like to be consistent
about it across all python executables/external dependencies (and
possibly even to all :lang modules that depend on env managers), so I'll
defer implementing that until I have the time to give it more thought
and plan it better.

Amend: 1fa1eba5ac
2025-07-01 14:22:10 +02:00
Henrik Lissner
2adbdf1360 feat(clojure): add treesit support 2025-06-30 15:16:26 +02:00
pancho horrillo
fdc0fa3bec docs(markdown): doctor: allow for alternate grips
Note that we are pinned to the latest release of `seagle0128/grip-mode`,
which supports¹ alternate grip-like programs, namely `mdopen` and
`go-grip`. Although a specific one can be configured, `grip-mode` will
try and load any of the three (the two mentioned plus `grip`).

I’ve added them in the same order that `grip-mode` searches for them².

¹: https://github.com/seagle0128/grip-mode?tab=readme-ov-file#alternative-markdown-preview-without-accessing-github-api
²: 96a927dce6/grip-mode.el (L177-L179)
2025-06-29 23:59:50 +02:00