mirror of
https://forge.katzen.cafe/schrottkatze/nix-configs.git
synced 2024-11-25 06:18:44 +01:00
configure helix
This commit is contained in:
parent
c1d4aba9c3
commit
9ed3cde274
|
@ -3,14 +3,7 @@
|
|||
pkgs-unstable-small,
|
||||
...
|
||||
}: {
|
||||
home-manager.users.jade = {pkgs, ...}: let
|
||||
typstGrammar = pkgs.fetchFromGitHub {
|
||||
owner = "uben0";
|
||||
repo = "tree-sitter-typst";
|
||||
rev = "baddc325e858afff90501dbefa00ecfa28528931";
|
||||
sha256 = "sha256-XZAgnpb1B8EZ2WXPj/JYSZGsmpKsnDiBFCDF0XjunOM";
|
||||
};
|
||||
in {
|
||||
home-manager.users.jade = {pkgs, ...}: {
|
||||
home = {
|
||||
sessionVariables.EDITOR = "hx";
|
||||
packages = [
|
||||
|
@ -21,11 +14,6 @@
|
|||
pkgs.typst-lsp
|
||||
];
|
||||
};
|
||||
home.file = {
|
||||
".config/helix/runtime/queries" = {
|
||||
source = "${typstGrammar}/queries";
|
||||
};
|
||||
};
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
package = pkgs-unstable-small.helix;
|
||||
|
@ -40,6 +28,8 @@
|
|||
display-messages = true;
|
||||
display-inlay-hints = true;
|
||||
};
|
||||
completion-replace = true;
|
||||
popup-border = "popup";
|
||||
shell = ["nu" "-c"];
|
||||
statusline.left = [
|
||||
"mode"
|
||||
|
@ -147,22 +137,11 @@
|
|||
args = ["--language-server"];
|
||||
};
|
||||
"typst-lsp" = {
|
||||
command = "typst-lsp";
|
||||
config = {
|
||||
exportPdf = "onType";
|
||||
};
|
||||
};
|
||||
};
|
||||
grammar = [
|
||||
{
|
||||
name = "typst";
|
||||
source = {
|
||||
git = "https://github.com/uben0/tree-sitter-typst";
|
||||
rev = "baddc325e858afff90501dbefa00ecfa28528931";
|
||||
# path = "${typstGrammar}";
|
||||
};
|
||||
}
|
||||
];
|
||||
language = [
|
||||
{
|
||||
name = "nu";
|
||||
|
@ -172,30 +151,6 @@
|
|||
name = "php";
|
||||
language-servers = ["psalm"];
|
||||
}
|
||||
{
|
||||
name = "typst";
|
||||
scope = "source.typst";
|
||||
file-types = ["typ" "typst"];
|
||||
injection-regex = "typ(st)?";
|
||||
comment-token = "//";
|
||||
indent = {
|
||||
tab-width = 2;
|
||||
unit = " ";
|
||||
};
|
||||
roots = ["typst.toml"];
|
||||
formatter = {
|
||||
command = "${pkgs.typstfmt}/bin/typstfmt";
|
||||
};
|
||||
auto-format = true;
|
||||
language-servers = ["typst-lsp"];
|
||||
auto-pairs = {
|
||||
"(" = ")";
|
||||
"{" = "}";
|
||||
"[" = "]";
|
||||
"$" = "$";
|
||||
"\"" = "\"";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "nix";
|
||||
formatter = {
|
||||
|
|
Loading…
Reference in a new issue