-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(editors): Add initial helix config
- Loading branch information
1 parent
2a7aa5c
commit 03ae0da
Showing
2 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
config, | ||
options, | ||
lib, | ||
pkgs, | ||
... | ||
}: | ||
with lib; | ||
with lib.my; let | ||
cfg = config.modules.editors.helix; | ||
in { | ||
options.modules.editors.helix = {enable = mkBoolOpt false;}; | ||
|
||
config = mkIf cfg.enable { | ||
home-manager.users.emiller.programs.helix = { | ||
enable = true; | ||
extraPackages = [pkgs.marksman]; | ||
languages = { | ||
# the language-server option currently requires helix from the master branch at https://github.com/helix-editor/helix/ | ||
language-server.typescript-language-server = with pkgs.nodePackages; { | ||
command = "${typescript-language-server}/bin/typescript-language-server"; | ||
args = ["--stdio" "--tsserver-path=${typescript}/lib/node_modules/typescript/lib"]; | ||
}; | ||
|
||
language = [ | ||
{ | ||
name = "rust"; | ||
auto-format = false; | ||
} | ||
]; | ||
}; | ||
settings = { | ||
# theme = "STYLIX"; | ||
editor = { | ||
line-number = "relative"; | ||
lsp.display-messages = true; | ||
}; | ||
keys.normal = { | ||
space.space = "file_picker"; | ||
space.w = ":w"; | ||
space.q = ":q"; | ||
esc = ["collapse_selection" "keep_primary_selection"]; | ||
}; | ||
}; | ||
}; | ||
}; | ||
} |