mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-05-19 14:17:26 +02:00
feat: helix - use stable version
This commit is contained in:
Generated
+3
-47
@@ -510,28 +510,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"helix": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"rust-overlay": "rust-overlay_2"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1773595579,
|
|
||||||
"narHash": "sha256-uYJz4zLOG694/TxUGWWJ6DFhjh8v5Pdh1l9vrgZl23o=",
|
|
||||||
"owner": "mattwparas",
|
|
||||||
"repo": "helix",
|
|
||||||
"rev": "dc1878823905060f54e50b47c946796cdd1e5210",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "mattwparas",
|
|
||||||
"ref": "steel-event-system",
|
|
||||||
"repo": "helix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"hercules-ci-effects": {
|
"hercules-ci-effects": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": [
|
"flake-parts": [
|
||||||
@@ -642,7 +620,7 @@
|
|||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"pre-commit": "pre-commit",
|
"pre-commit": "pre-commit",
|
||||||
"rust-overlay": "rust-overlay_3"
|
"rust-overlay": "rust-overlay_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765382359,
|
"lastModified": 1765382359,
|
||||||
@@ -1030,7 +1008,7 @@
|
|||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"rust-overlay": "rust-overlay_4"
|
"rust-overlay": "rust-overlay_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1731006591,
|
"lastModified": 1731006591,
|
||||||
@@ -1135,7 +1113,6 @@
|
|||||||
"disko": "disko",
|
"disko": "disko",
|
||||||
"ghostty": "ghostty",
|
"ghostty": "ghostty",
|
||||||
"haumea": "haumea",
|
"haumea": "haumea",
|
||||||
"helix": "helix",
|
|
||||||
"home-manager": "home-manager_3",
|
"home-manager": "home-manager_3",
|
||||||
"lanzaboote": "lanzaboote",
|
"lanzaboote": "lanzaboote",
|
||||||
"llm-agents": "llm-agents",
|
"llm-agents": "llm-agents",
|
||||||
@@ -1179,27 +1156,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-overlay_2": {
|
"rust-overlay_2": {
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"helix",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1770952264,
|
|
||||||
"narHash": "sha256-CjymNrJZWBtpavyuTkfPVPaZkwzIzGaf0E/3WgcwM14=",
|
|
||||||
"owner": "oxalica",
|
|
||||||
"repo": "rust-overlay",
|
|
||||||
"rev": "ec6a3d5cdf14bb5a1dd03652bd3f6351004d2188",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "oxalica",
|
|
||||||
"repo": "rust-overlay",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"rust-overlay_3": {
|
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"lanzaboote",
|
"lanzaboote",
|
||||||
@@ -1220,7 +1176,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-overlay_4": {
|
"rust-overlay_3": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
|||||||
@@ -137,13 +137,6 @@
|
|||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
helix = {
|
|
||||||
# Helix with steel as plugin system
|
|
||||||
# https://github.com/helix-editor/helix/pull/8675
|
|
||||||
url = "github:mattwparas/helix/steel-event-system";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
# AI coding agents
|
# AI coding agents
|
||||||
llm-agents.url = "github:numtide/llm-agents.nix";
|
llm-agents.url = "github:numtide/llm-agents.nix";
|
||||||
|
|
||||||
|
|||||||
@@ -1,30 +1,13 @@
|
|||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
config,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
helix,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
|
||||||
helixPackages = helix.packages.${pkgs.stdenv.hostPlatform.system};
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
# to make steel work, we need to git clone this repo to your home directory.
|
|
||||||
home.sessionVariables.HELIX_STEEL_CONFIG = "${config.home.homeDirectory}/nix-config/home/base/tui/editors/helix/steel";
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
steel
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.helix = {
|
programs.helix = {
|
||||||
enable = lib.mkForce false;
|
enable = true;
|
||||||
# enable steel as the plugin system
|
package = pkgs.helix;
|
||||||
# https://github.com/helix-editor/helix/pull/8675
|
|
||||||
# https://github.com/mattwparas/helix/blob/steel-event-system/STEEL.md
|
|
||||||
package = helixPackages.default.overrideAttrs (prevAttrs: {
|
|
||||||
cargoBuildFeatures = prevAttrs.cargoBuildFeatures or [ ] ++ [ "steel" ];
|
|
||||||
});
|
|
||||||
settings = {
|
settings = {
|
||||||
editor = {
|
editor = {
|
||||||
line-number = "relative";
|
line-number = "relative";
|
||||||
|
|||||||
@@ -1,40 +0,0 @@
|
|||||||
;; The helix.scm module will be loaded first before anything else,
|
|
||||||
;; the runtime will require this module, and any functions exported
|
|
||||||
;; will now be available to be used as typed commands, e.g. :git-add :open-helix-scm
|
|
||||||
|
|
||||||
(require "helix/editor.scm")
|
|
||||||
(require (prefix-in helix. "helix/commands.scm"))
|
|
||||||
(require (prefix-in helix.static. "helix/static.scm"))
|
|
||||||
|
|
||||||
(provide shell git-add open-helix-scm open-init-scm)
|
|
||||||
|
|
||||||
(define (current-path)
|
|
||||||
(let* ([focus (editor-focus)]
|
|
||||||
[focus-doc-id (editor->doc-id focus)])
|
|
||||||
(editor-document->path focus-doc-id)))
|
|
||||||
|
|
||||||
;;@doc
|
|
||||||
;; Specialized shell implementation, where % is a wildcard for the current file
|
|
||||||
(define (shell . args)
|
|
||||||
(helix.run-shell-command
|
|
||||||
(string-join
|
|
||||||
;; Replace the % with the current file
|
|
||||||
(map (lambda (x) (if (equal? x "%") (current-path) x)) args)
|
|
||||||
" ")))
|
|
||||||
|
|
||||||
;;@doc
|
|
||||||
;; Adds the current file to git
|
|
||||||
(define (git-add)
|
|
||||||
(shell "git" "add" "%"))
|
|
||||||
|
|
||||||
;;@doc
|
|
||||||
;; Open the helix.scm file
|
|
||||||
(define (open-helix-scm)
|
|
||||||
(helix.open (helix.static.get-helix-scm-path)))
|
|
||||||
|
|
||||||
;;@doc
|
|
||||||
;; Opens the init.scm file
|
|
||||||
(define (open-init-scm)
|
|
||||||
(helix.open (helix.static.get-init-scm-path)))
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
;; The init.scm file is run at the top level, immediately after the helix.scm module is required.
|
|
||||||
;; The helix context is available here, so you can interact with the editor.
|
|
||||||
|
|
||||||
;; configure the LSP for steel
|
|
||||||
(require "helix/configuration.scm")
|
|
||||||
(define-lsp "steel-language-server" (command "steel-language-server") (args '()))
|
|
||||||
(define-language "scheme"
|
|
||||||
(language-servers '("steel-language-server")))
|
|
||||||
|
|
||||||
;; show splash screen - when you open with no argument
|
|
||||||
(require "mattwparas-helix-package/splash.scm")
|
|
||||||
(when (equal? (command-line) '("hx"))
|
|
||||||
(show-splash))
|
|
||||||
|
|
||||||
;; Terminal & shell
|
|
||||||
(require "steel-pty/term.scm")
|
|
||||||
(set-default-shell! "nu")
|
|
||||||
|
|
||||||
;; File Watcher
|
|
||||||
(require "helix-file-watcher/file-watcher.scm")
|
|
||||||
(spawn-watcher)
|
|
||||||
|
|
||||||
;; File Tree
|
|
||||||
(require "mattwparas-helix-package/cogs/file-tree.scm")
|
|
||||||
@@ -158,9 +158,6 @@ in
|
|||||||
".local/share/nvim"
|
".local/share/nvim"
|
||||||
".local/state/nvim"
|
".local/state/nvim"
|
||||||
|
|
||||||
# helix & steel
|
|
||||||
".local/share/steel"
|
|
||||||
|
|
||||||
# Joplin
|
# Joplin
|
||||||
".config/joplin" # tui client
|
".config/joplin" # tui client
|
||||||
".config/Joplin" # joplin-desktop
|
".config/Joplin" # joplin-desktop
|
||||||
|
|||||||
Reference in New Issue
Block a user