Commit graph

3879 commits

Author SHA1 Message Date
Henrik Lissner
9cb4c8b637
fix(:lang): ensure lsp! is always appended to hooks 2022-07-25 18:12:03 +02:00
Henrik Lissner
a70e634ebd
refactor(:lang): move tree-sitter init
Moved add-hook calls (for tree-sitter initialization) into their
respective modes' config blocks, or nearby, to be consistent with how
other, similar tools (like lsp!) are initialized, and does so at
runtime, rather than at expansion/compile time, which eval-when! caused.
2022-07-25 17:34:44 +02:00
Henrik Lissner
26b8383cbd
feat(nix): add +lsp
Fix: #6592
2022-07-25 16:00:39 +02:00
Henrik Lissner
e7d56f2ce7
feat(markdown): add toggle keybinds under <localleader> t
Close: #6308
Co-authored-by: iyefrat <iyefrat@users.noreply.github.com>
2022-07-23 16:42:29 +02:00
Dejan Benedik
5bbc299b8b docs(sh): add doctor check for shfmt 2022-07-23 16:32:16 +02:00
floyza
e478f597cb
bump: :lang lua
https://git.sr.ht/~technomancy/fennel-mode@50ef3c6246f3 -> https://git.sr.ht/~technomancy/fennel-mode@566435734946

A fix was added upstream to fix `fennel-repl` no longer returning the
repl buffer. This fixes `+eval-open-repl` in fennel-mode.
2022-07-23 16:31:26 +02:00
Matthieu Petiteau
3b3857d57a
fix(python): conflicting pyimport-remove-unused keybind
Binding for `pyimport-remove-unused` clashes with `py-isort-region`
2022-07-23 16:00:40 +02:00
Victor Carvalho
acd7db1410
feat(dart): add & improve keybinds for flutter 2022-07-23 15:55:12 +02:00
Rafael Varago
7f730cb5cb bump: :lang scala
scala/lsp-metals@b7f77de694 -> scala/lsp-metals@097d6021a4

Ref: emacs-lsp/lsp-metals#73
2022-07-23 14:04:01 +02:00
Henrik Lissner
acae9f9acb
bump: :tools lsp
emacs-lsp/lsp-mode@6b6afc00de -> emacs-lsp/lsp-mode@3fa645c039
joaotavora/eglot@e835996e16 -> joaotavora/eglot@bd970be047

- There are multiple issues in the lsp-mode
  repo (emacs-lsp/lsp-mode#2722), lsp-julia repo (gdkrmr/lsp-julia#23
  and gdkrmr/lsp-julia#35), and the LanguageServer.jl
  repo (julia-vscode/LanguageServer.jl#844) about crashes of the Julia
  LSP with lsp-mode due to errors caused by the folding capabilities
  announced by the client. One can work around these issues by enabling
  folding (see gdkrmr/lsp-julia#23) but that is only a hack and does not
  fix the underlying issue. The problem is caused by a violation of the
  LSP specs in lsp-mode which was fixed in emacs-lsp/lsp-mode#3593. The
  PR updates lsp-mode to the latest commit on the master branch which
  contains this fix (and some other unrelated fixes, CI passes
  successfully again), and hence the workaround for lsp-julia can be
  removed.

Ref: emacs-lsp/lsp-mode#3593
Ref: emacs-lsp/lsp-mode#2722
Ref: gdkrmr/lsp-julia#35
Ref: gdkrmr/lsp-julia#23
Ref: julia-vscode/LanguageServer.jl#844
Close: #6516
Co-authored-by: devmotion <devmotion@users.noreply.github.com>
2022-07-05 01:35:06 +02:00
Ellis Kenyő
facab56a5c
bump: :lang fsharp
fsharp/emacs-fsharp-mode@b3aa4c53fc -> fsharp/emacs-fsharp-mode@c1e58c61f9

- Fix issue causing the inferior-buffer to block when adding nuget
  packages.
2022-06-28 00:04:19 +02:00
Henrik Lissner
a570ffe16c
fix(org): end-of-file error while parsing +present
Ref: db3ca52ed6 (commitcomment-76886620)
2022-06-24 12:25:44 +02:00
Henrik Lissner
a4aab45656
fix(emacs-lisp): flycheck false positives in Doom configs 2022-06-22 23:04:00 +02:00
Henrik Lissner
170dadca5a
feat(emacs-lisp): register doomscript as elisp interpreter 2022-06-21 23:42:16 +02:00
Henrik Lissner
d014a7ae8b
docs(emacs-lisp): add fn!/lambda! to ToC & tweak header-args 2022-06-21 23:32:02 +02:00
Henrik Lissner
00c75eddf8
docs(emacs-lisp): add fn! & lambda! demos 2022-06-21 21:29:08 +02:00
Ellis Kenyő
ca73a689ab feat(fsharp): add ob-fsharp
Add org-babel support for F#
2022-06-21 20:27:50 +02:00
Henrik Lissner
1f4b9b73fc
fix(org): org-download-delete and [[download:...]] links
org-download-delete doesn't accommodate a non-standard value for
org-download-link-format. Now it does.

Close: #6202
Co-authored-by: zrquan <zrquan@users.noreply.github.com>
2022-06-21 18:46:26 +02:00
Brian Christian
db3ca52ed6 fix(org): wrong arg type when leaving present mode
When leaving org-tree-slide-mode, the window fringes are reset
fringe-mode has multiple possible types, including cons cell,
which cannot be passed directly to set-window-fringes
2022-06-21 18:31:59 +02:00
Henrik Lissner
9d1df5f298
nit: minor refactors & comment/docstring revisions 2022-06-21 14:40:15 +02:00
Henrik Lissner
773122f1ec
fix(python): syntax highlighting in 28.1
Python syntax highlighting was broken in the 28.1 release.

Close: #6414
Co-authored-by: dani84bs <dani84bs@users.noreply.github.com>
2022-06-21 14:32:13 +02:00
Henrik Lissner
d6d1e600c0
fix(org): org-protocol not triggering for its uris
A more elegant solution will have to wait until the CLI rewrite (where
modules can supply patches for its packages, then I could hoist
org-protocol-check-filename-for-protocol into the autoloads file using
autoload cookie magic).

Fix: #6481
Fix: #5997
2022-06-21 03:04:28 +02:00
Henrik Lissner
eb7329d912
fix(org): unbalanced parenthesis
Causing odd org related errors at startup or 'doom doctor'.

Amend: fb1c8eb11d
2022-06-20 03:45:46 +02:00
Henrik Lissner
fb1c8eb11d
fix(org): lazy loading of org-protocol
First, removal of the old org-protocol advice needed to be updated,
because org-protocol-detect-protocol-server was renamed to
org--protocol-detect-protocol-server upstream.

Second, I only noticed now that our lazy loader for org-protocol wasn't
active until Org was loaded, which was far too late, and meant
org-protocol wasn't working out of the box. This fixes that.
2022-06-20 01:55:21 +02:00
Henrik Lissner
92a5c28687
feat(rest): add +jq flag
Adds support for setting variables from results using jq expressions.

Ref: https://github.com/pashky/restclient.el
Ref: https://github.com/ljos/jq-mode
Close: #5238
2022-06-19 14:56:04 +02:00
Henrik Lissner
6c0b7e1530
refactor!(cli): rewrite CLI framework libraries
BREAKING CHANGE: this changes Doom's CLI framework in subtle ways, which
is listed in greater detail below. If you've never extended Doom's CLI,
then this won't affect you, but otherwise it'd be recommended you read
on below.

This commit focuses on the CLI framework itself and backports some
foundational changes to its DSL and how it resolves command line
arguments to CLIs, validates input, displays documentation, and persists
state across sessions -- and more. This is done in preparation for the
final stretch towarding completing the CLI rewrite (see #4273).

This is also an effort to generalize Doom's CLI (both its framework and
bin/doom), to increase it versatility and make it a viable dev tool for
other Doom projects (on our Github org) and beyond.

However, there is a *lot* to cover so I'll try to be brief:

- Refactor: generalize Doom's CLI framework by moving all bin/doom
  specific configuration/commands out of core-cli into bin/doom. This
  makes it easier to use bin/doom as a project-agnostic development
  tool (or for users to write their own).
- Refactor: change the namespace for CLI variables/functions from
  doom-cli-X to doom-X.
- Fix: subcommands being mistaken as arguments. "doom make index" will
  resolve to (defcli! (doom make index)) if it exists,
  otherwise (defcli! (doom make)) with "index" as an argument. Before
  this, it would resolve to the latter no matter what. &rest can
  override this; with (defcli! (doom make) (&rest args)), (defcli! (doom
  make index)) will never be invoked.
- Refactor!: redesign our output library (was core/autoload/output.el,
  is now core/autoload/print.el), and how our CLI framework buffers and
  logs output, and now merges logs across (exit! ...) restarts.
- Feat: add support for :before and :after pseudo commands. E.g.

    (defcli! (:before doom help) () ...)
    (defcli! (:after doom sync) () ...)

  Caveat: unlike advice, only one of each can be defined per-command.
- Feat: option arguments now have rudimentary type validation (see
  `doom-cli-option-arg-types`). E.g.

    (defcli! (doom foo) ((foo ("--foo" num))) ...)

  If NUM is not a numeric, it will throw a validation error.

  Any type that isn't in `doom-cli-option-arg-types` will be treated as a
  wildcard string type. `num` can also be replaced with a specification,
  e.g. "HOST[:PORT]", and can be formatted by using symbol quotes:
  "`HOST'[:`PORT']".
- Feat: it is no longer required that options *immediately* follow the command
  that defines them (but it must be somewhere after it, not before). E.g.
    With:
      (defcli! (:before doom foo) ((foo ("--foo"))) ...)
      (defcli! (doom foo baz) () ...)
    Before:
      FAIL: doom --foo foo baz
      GOOD: doom foo --foo baz
      FAIL: doom foo baz --foo
    After:
      FAIL: doom --foo foo baz
      GOOD: doom foo --foo baz
      GOOD: doom foo baz --foo
- Refactor: CLI session state is now kept in a doom-cli-context struct (which
  can be bound to a CLI-local variable with &context in the arglist):

    (defcli! (doom sync) (&context context)
      (print! "Command: " (doom-cli-context-command context)))

  These contexts are persisted across sessions (when restarted). This is
  necessary to support seamless script restarting (i.e. execve
  emulation) in post-3.0.
- Feat: Doom's CLI framework now understands "--". Everything after it will be
  treated as regular arguments, instead of sub-commands or options.
- Refactor!: the semantics of &rest for CLIs has changed. It used to be "all
  extra literal, non-option arguments". It now means *all* unprocessed
  arguments, and its use will suppress "unrecognized option" errors, and
  tells the framework not to process any further subcommands. Use &args
  if you just want "all literal arguments following this command".
- Feat: add new auxiliary keywords for CLI arglists: &context, &multiple,
  &flags, &args, &stdin, &whole, and &cli.
  - &context SYM: binds the currently running context to SYM (a
    `doom-cli-context` struct). Helpful for introspection or passing
    along state when calling subcommands by hand (with `call!`).
  - &stdin SYM: SYM will be bound to a string containing any input piped
    into the running script, or nil if none. Use
    `doom-cli-context-pipe-p` to detect whether the script has been
    piped into or out of.
  - &multiple OPTIONS...: allows all following OPTIONS to be repeated. E.g. "foo
    -x a -x b -x c" will pass (list ("-x" . "a") ("-x" . "b") ("-x" .
    "c")) as -x's value.
  - &flags OPTIONS...: All options after "&flags" get an implicit --no-* switch
    and cannot accept arguments. Will be set to :yes or :no depending on which flag is
    provided, and nil if the flag isn't provided. Otherwise, a default
    value can be specified in that options' arglist. E.g.

      (defcli! (doom foo) (&flags (foo ("--foo" :no))) ...)

    When called, this command sets FOO to :yes if --foo, :no if --no-foo, and
    defaults to :no otherwise.
  - &args SYM: this replaces what &rest used to be; it binds to SYM a
    list of all unprocessed (non-option) arguments.
  - &rest SYM: now binds SYM to a list of all unprocessed arguments, including
    options. This also suppresses "unrecognized option" errors, but will render
    any sub-commands inaccessible. E.g.

      (defcli! (doom make) (&rest rest) ...)
      ;; These are now inaccessible!
      (defcli! (doom make foo) (&rest rest) ...)
      (defcli! (doom make bar) (&rest rest) ...)
  - &cli SYM: binds SYM to the currently running `doom-cli` struct. Can also be
    obtained via `(doom-cli-get (doom-cli-context-command context))`. Possibly
    useful for introspection.
- feat: add defobsolete! macro for quickly defining obsolete commands.
- feat: add defalias! macro for quickly defining alias commands.
- feat: add defautoload! macro for defining an autoloaded command (won't
  be loaded until it is called for).
- refactor!: rename defcligroup! to defgroup! for consistency.
- fix: CLIs will now recursively inherit plist properties from parent
  defcli-group!'s (but will stack :prefix).
- refactor!: remove obsolete 'doom update':
- refactor!: further generalize 'doom ci'
  - In an effort to generalize 'doom ci' (so other Doom--or
    non-doom--projects can use it), all its subcommands have been
    changed to operate on the current working directory's repo instead
    of $EMACSDIR.
  - Doom-specific CI configuration was moved to .github/ci.el.
  - All 'doom ci' commands will now preload one of \$CURRENT_REPO_ROOT/ci.el or
    \$DOOMDIR/ci.el before executing.
- refactor!: changed 'doom env'
  - 'doom env {-c,--clear}' is now 'doom env {clear,c}'
  - -r/--reject and -a/--allow may now be specified multiple times
- refactor!: rewrote CLI help framework and error handling to be more
  sophisticated and detailed.
- feat: can now initiate $PAGER on output with (exit! :pager) (or use
  :pager? to only invoke pager is output is longer than the terminal is
  tall).
- refactor!: changed semantics+conventions for global bin/doom options
  - Single-character global options are now uppercased, to distinguish them from
    local options:
    - -d (for debug mode) is now -D
    - -y (to suppress prompts) is now -!
    - -l (to load elisp) is now -L
    - -h (short for --help) is now -?
  - Replace --yes/-y switches with --force/-!
  - -L/--load FILE: now silently ignores file errors.
  - Add --strict-load FILE: does the same as -L/--load, but throws an error if
    FILE does not exist/is unreadable.
  - Add -E/--eval FORM: evaluates arbitrary lisp before commands are processed.
  - -L/--load, --strict-load, and -E/--eval can now be used multiple times in
    one command.
  - Add --pager COMMAND to specify an explicit pager. Will also obey
    $DOOMPAGER envvar. Does not obey $PAGER.
- Fix #3746: which was likely caused by the generated post-script overwriting
  the old mid-execution. By salting the postscript filenames (with both an
  overarching session ID and a step counter).
- Docs: document websites, environment variables, and exit codes in
  'doom --help'
- Feat: add imenu support for def{cli,alias,obsolete}!

Ref: #4273
Fix: #3746
Fix: #3844
2022-06-18 23:53:12 +02:00
Henrik Lissner
6c5537b487
fix(emacs-lisp): eval forms from within the current buffer
This fix ensures that functions/macros that are evaluated with +eval/*
et co will remember where they were defined (if possible), so you don't
have to see this in their documentation again:

  FUNCTION is a function without a source file.

Ref: https://github.com/doomemacs/doomemacs/pull/6444#issuecomment-1159457888
2022-06-18 18:19:39 +02:00
NightMachinery
ff7ae66372
fix(org): make last arg of +org--follow-search-string-a optional
To accommodate the optional second argument of org-roam-id-open in
org-roam-v1.

Ref: 946a879a4a/org-roam.el (L1140)
2022-06-18 17:25:22 +02:00
Strikerlulu
1ed1064ce1
feat(nix): add generic completing-read support to +nix/lookup-option 2022-06-18 17:22:47 +02:00
Sam Jones
a8dabe1aec fix(go): exactly match test function name 2022-06-18 17:21:20 +02:00
Henrik Lissner
9fde385cdc
fix(emacs-lisp): void-function lisp--local-defform-body-p
I was too hasty adding this function in 15432cf. This function wasn't
introduced until Emacs 29.

Amend: 15432cf9d2
2022-06-18 16:57:17 +02:00
Henrik Lissner
2180d44a26
bump: :lang markdown
Fanael/edit-indirect@e3d86416bc -> Fanael/edit-indirect@f80f63822f
jrblevin/markdown-mode@521658eb32 -> jrblevin/markdown-mode@1f709778ac
seagle0128/grip-mode@6b427143a8 -> seagle0128/grip-mode@6d6ddbe0af
2022-06-18 16:57:17 +02:00
Henrik Lissner
438483c4eb
nit(markdown): reformat keybinds 2022-06-18 16:57:17 +02:00
Henrik Lissner
5eed2e9e61
fix(javascript): guard evil-textobj-tree-sitter setting
For non-evil users.
2022-06-18 15:01:13 +02:00
Henrik Lissner
e855c2d132
fix(org): update +org--export-lazy-load-library-h
org-babel-exp-src-block's signature changed upstream, in org-mode (to
accept one optional argument), so the advice must adapt.

Amend: 373386173a
2022-06-18 15:00:43 +02:00
Henrik Lissner
173396a963
merge: pull request #5401 from jeetelongname/tree-sitter 2022-06-17 22:55:42 +02:00
Henrik Lissner
7d8b7b4fc2
fix(clojure): adjust buffer-local hook, not global
Though the global side-effect likely had no effect, it's better that our
hacks don't overstep their bounds.
2022-06-17 21:58:54 +02:00
Henrik Lissner
15432cf9d2
fix(emacs-lisp): update custom lisp-indent-function
To reflect Emacs 28+ changes to the function it is
replacing (lisp-indent-function).
2022-06-17 21:58:05 +02:00
Henrik Lissner
52d0c92fea
bump: :lang emacs-lisp
jorgenschaefer/emacs-buttercup@f5cbf97e10 -> jorgenschaefer/emacs-buttercup@ceedad5efa
purcell/flycheck-package@ecd03f8379 -> purcell/flycheck-package@615c1ed8c6
xuchunyang/elisp-demos@924b07d28e -> xuchunyang/elisp-demos@01c301b516
2022-06-17 21:53:21 +02:00
Jeetaditya Chatterjee
908ea8de5f
docs(tree-sitter): add doc checks for langs
langs being:
- elixir
- nix
- zig
2022-06-17 20:08:42 +01:00
Henrik Lissner
89306cb0c6
fix(graphql): truncated pin
Amend: 92f3eb0476
2022-06-17 19:37:41 +02:00
Henrik Lissner
92f3eb0476
bump: :lang graphql
ifitzpatrick/graphql-doc.el@6ba7961fc9 -> ifitzpatrick/graphql-doc.el@d37140267e
timoweave/company-graphql@757dfa45ad -> thaenalpha/company-graphql@aed9f5109e

The source for company-graphql is temporarily changed because the
package was no longer available on MELPA.

Close: #6436
Ref: timoweave/company-graphql#1
Ref: timoweave/company-graphql#4
Co-authored-by: Nopanun Laochunhanun <thaenalpha@users.noreply.github.com>
2022-06-17 19:17:24 +02:00
Henrik Lissner
373386173a
bump: :lang org
awth13/org-appear@ffbd742267 -> awth13/org-appear@8dd1e56415
bastibe/org-journal@f121450610 -> bastibe/org-journal@839a2e1986
emacs-straight/org-mode@971eb6885e -> emacs-straight/org-mode@e9da29b6fa
emacsmirror/org-contrib@17f3c51435 -> emacsmirror/org-contrib@c1e0980fd7
emacsorphanage/ox-pandoc@b2e43b9362 -> emacsorphanage/ox-pandoc@0a35d0fbfa
hakimel/reveal.js@e281b3234e -> hakimel/reveal.js@039972c730
kaushalmodi/ox-hugo@65e349b306 -> kaushalmodi/ox-hugo@85d11219a5
magit/orgit-forge@36e57a0359 -> magit/orgit-forge@8baf1dee79
magit/orgit@42b7f682b3 -> magit/orgit@b33b916915
nnicandro/emacs-jupyter@0a7055d7b1 -> nnicandro/emacs-jupyter@7d20c0aee2
oer/org-re-reveal@e5bae22b9e -> oer/org-re-reveal@93ba4e91f1
org-roam/org-roam@36152590ad -> org-roam/org-roam@171a8db32f

- Fixes Roam's on-save errors when narrowed (#6315).

Close: #6315
Ref: org-roam/org-roam#2159
Co-authored-by: Colin Woodbury <fosskers@users.noreply.github.com>
2022-06-17 18:54:28 +02:00
Henrik Lissner
d4204616ba
bump: :lang clojure
borkdude/flycheck-clj-kondo@d8a6ee9a16 -> borkdude/flycheck-clj-kondo@ff7bed2315
clojure-emacs/cider@86dd3fee9d -> clojure-emacs/cider@b9e1cc26e2
clojure-emacs/clojure-mode@c339353f9e -> clojure-emacs/clojure-mode@b6f41d7490
clojure-emacs/parseclj@b04eae6738 -> clojure-emacs/parseclj@4d0e780e00

Upgrade to the latest version of emacs-cider (1.3.0 -> 1.4.1)

Close: #6447
Co-authored-by: Jo Øivind Gjernes <jodleif@users.noreply.github.com>
2022-06-17 18:54:27 +02:00
Filipe Regadas
7a164f9d4c
bump: :lang dhall
psibi/dhall-mode@ad259c8a22 -> psibi/dhall-mode@c77f1c1e75

Ref: psibi/dhall-mode#36
2022-06-17 18:47:23 +02:00
Nils "Linkpy" Reid
3ea4952f3f fix(zig): use zig ast-check for flycheck checker 2022-06-17 18:37:53 +02:00
tecosaur
f0f414ac67
fix(eval): type error in +emacs-lisp-eval
When evaluating from a buffer not visiting any file, file-truename would
error out since the argument it was fed is nil.

Fix: #6181
Close: #6404
Ref: 7290f85cfd
Co-authored-by: Yoav Marco <ymarco@users.noreply.github.com>
2022-06-17 18:36:10 +02:00
Henrik Lissner
77e9932966
bump: :core
Fuco1/smartparens@37f77bf2e2 -> Fuco1/smartparens@ec15aaa748
Wilfred/helpful@67cdd1030b -> Wilfred/helpful@209971ba9f
bbatsov/projectile@f3468e8d20 -> bbatsov/projectile@4d6da873ae
domtronn/all-the-icons.el@65c496d3d1 -> domtronn/all-the-icons.el@ca1ef30004
emacs-straight/project@4fe1eec803 -> emacs-straight/project@c52ec93689
jscheid/dtrt-indent@66fc30af02 -> jscheid/dtrt-indent@57f4072fa8
justbur/emacs-which-key@1217db8c63 -> justbur/emacs-which-key@1ab1d0cc88
raxod502/straight.el@e2de88ea0e -> radian-software/straight.el@0e204d418d

Includes a fix for #5207 (see radian-software/straight.el#955), which
occasionally caused arrayp errors when installing/upgrading packages.

Fix: #5207
Ref: radian-software/straight.el#955
2022-06-17 18:21:23 +02:00
Henrik Lissner
59d3d8e8da
tweak(org): remove redundant eldoc-mode activation 2022-06-17 18:21:23 +02:00
Henrik Lissner
d67dcf1940
docs(emacs-lisp): insert :added: properties in demos
To help identify when they (and future functions/macros) were added.
2022-06-17 18:21:23 +02:00