nixos/roles/home/helix.nix
2023-05-28 07:21:31 +02:00

125 lines
2.6 KiB
Nix

{ config, pkgs, ... }:
{
home = {
sessionVariables = {
EDITOR = "hx";
VISUAL = "hx";
};
file.".config/helix/config.toml".text = ''
theme = "monokai_pro_spectrum"
[editor]
cursorline = true
true-color = true
[editor.cursor-shape]
insert = "bar"
normal = "block"
select = "underline"
[editor.lsp]
display-messages = true
[editor.indent-guides]
render = true
'';
file.".config/helix/languages.toml".text = ''
[[language]]
name = "nix"
formatter = { command = "nixpkgs-fmt" }
[[language]]
name = "python"
formatter = { command = "black", args = [ "-" ] }
[[language]]
name = "souffle"
scope = "source.souffle"
roots = []
file-types = [ "dl" ]
comment-token = "//"
indent = { tab-width = 2, unit = " " }
[[grammar]]
name = "souffle"
source = { git = "https://github.com/langston-barrett/tree-sitter-souffle", rev = "8cc32019f6aa8d7ef98ff5abc643c8f35dfc1099" }
'';
file.".config/helix/runtime/queries/souffle/highlights.scm".text = ''
[
(pragma) @keyword
(functor_decl) @keyword
(component_decl) @keyword
(component_init) @keyword
(directive) @keyword
(monotonic_rule) @keyword
(subsumptive_rule) @keyword
(fact) @keyword
(relation_decl) @keyword
(type_decl) @keyword
(legacy_type_decl) @keyword
] @keyword
[
(primitive_type) @type
(type_synonym) @type
(subtype) @type
(type_union) @type
(type_record) @type
(adt) @type
(legacy_bare_type_decl) @type
] @type
[
(block_comment) @comment
(line_comment) @comment
] @comment
[
(string) @string
] @string
[
(number) @constant.numeric
(integer) @constant.numeric
(decimal) @constant.numeric
(unsigned) @constant.numeric
(hex) @constant.numeric
(binary) @constant.numeric
(float) @constant.numeric
(ipv4) @constant.numeric
] @constant.numeric
[
(ident) @variable
] @variable
[
(qualified_name) @entity
] @entity
[
(intrinsic_functor) @operator
] @operator
'';
packages = with pkgs.unstablePkgs; [
black
helix
clang-tools
rust-analyzer
nil
python310Packages.python-lsp-server
texlab
nodePackages.vscode-langservers-extracted
nodePackages.typescript
nodePackages.svelte-language-server
nixpkgs-fmt
];
};
}