Commit Graph

26 Commits

Author SHA1 Message Date
836d229636 fix(nix): remove :mode hook for nix-drv-mode
The nix-mode package already does this and it shadows other entries for the .drv files in auto-mode-alist (namely Guix derivations).

Ref: 34d51e2731/nix-drv-mode.el (L48)
2022-09-10 23:37:50 +02:00
ad6a3d0f33 refactor: deprecate featurep! for modulep!
featurep! will be renamed modulep! in the future, so it's been
deprecated. They have identical interfaces, and can be replaced without
issue.

featurep! was never quite the right name for this macro. It implied that
it had some connection to featurep, which it doesn't (only that it was
similar in purpose; still, Doom modules are not features). To undo such
implications and be consistent with its namespace (and since we're
heading into a storm of breaking changes with the v3 release anyway),
now was the best opportunity to begin the transition.
2022-08-14 20:43:35 +02:00
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
26b8383cbd feat(nix): add +lsp
Fix: #6592
2022-07-25 16:00:39 +02:00
6d10e205dd feat(tree-sitter): add support to zig and nix 2022-05-23 20:02:22 +01:00
589e5a37af Associate flake.lock with json-mode/js-mode 2021-01-27 03:35:47 -05:00
a110b6ab5f Disable idle completion in nix-mode
company-nixos-options is dreadfully slow, so we make code completion
manual in nix-mode.

Closes #3927
2020-10-22 14:49:21 -04:00
876d08fc3b Add nix bin path to tramp-remote-path 2020-10-15 18:13:42 -04:00
07b2883bc3 lang/nix: add popup rule for nixos-options-doc 2020-10-05 17:10:57 -04:00
4841062db9 lang/nix: add a repl handler 2020-08-20 02:30:06 -04:00
483a7caf0f Fix (cached-)nix-shell interpreter-mode-alist entries
By combining them. Also emit a more helpful message if the
sub-interpreter cannot be read.
2020-04-14 15:38:05 -04:00
49c7cf8172 Resolve major mode for (cached)-nix-shell scripts 2020-02-08 07:14:54 -05:00
6f9b7a2889 lang/nix: add ivy version of helm-nixos-options
And make it nix-mode's lookup-documentation handler, so pressing `K` on
an option will prefill the ivy search.
2019-09-21 13:57:26 -04:00
76cacb5bfe 💥 Rename def-package! -> use-package!
Calling this pivotal macro "def-package!" has frequently been a source
of confusion. It is a thin wrapper around use-package, and it should be
obvious that it is so. For this reason, and to match the naming
convention used with other convenience macros/wrappers, it is now
use-package!.

Also changes def-package-hook! -> use-package-hook!

The old macros are now marked obsolete and will be removed when straight
integration is merged.
2019-07-23 12:50:45 +02:00
3bbd4e3008 use default nix-indent-function
See https://github.com/NixOS/nix-mode/pull/79
2019-06-15 15:37:32 +03:00
8e4635bdc8 set nix-indent-function to #'nix-indent-line 2019-01-22 10:44:05 +11:00
3f195614d9 Normalize :leader/:localleader keybinds
Evil states no longer apply to them. Also removes x-alt-keysym.
2018-12-23 23:54:27 -05:00
e0f2c260a1 Update lang/nix to reflect changes upstream
+ Restore nix-mode entry in auto-mode-alist
+ Add .drv entry to auto-mode-alist
+ Minor refactor for def-package! blocks
2018-08-13 21:47:55 +02:00
7a81f46b39 Refactor lang/nix
+ Move set-company-backend! out of conditional (it is an autodef, meaning it will simply no-op if the company module is disabled)
+ Removed helm-nixos-options config, because `helm-nixos-options` is already autoloaded by the package
+ Simplify map! usage
+ Move nix-mode to the top, as it is the focal package of this module
2018-07-17 13:23:33 +02:00
0aa351842c clean-up + add helm-nixos-options 2018-07-17 09:56:52 +02:00
1dac12c9c0 Add bindings for nix-mode 2018-07-16 17:10:57 +02:00
bdbe942fb9 Make available nix-repl-show 2018-07-16 17:10:18 +02:00
d3c24e51f1 Add support for nix-update 2018-07-16 17:09:28 +02:00
39419dee17 Added company backend for nixos-options 2018-07-16 15:49:11 +02:00
09cb4f6716 Major refactor & optimization of how modules load their packages
Now that we are loading package autoloads files (as part of the
generated doom-package-autoload-file when running make autoloads), many
:commands properties are redundant. In fact, many def-package! blocks
are redundant.

In some cases, we can do without a config.el file entirely, and can move
into the autoloads file or rely entirely on package autoloads.

Also, many settings have been moved in their module's autoloads files,
which makes them available ASAP; their use no longer depends on module
load order.

This gained me a modest ~10% boost in startup speed.
2018-05-25 00:46:16 +02:00
89223e0a2f lang/nix: initial commit 2017-12-02 00:05:51 +00:00