From 9ed3cde274c5ab6cd2fbbd1ca795353fd98bbcaa Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Wed, 3 Apr 2024 19:04:00 +0200 Subject: [PATCH] configure helix --- modules/shell/helix.nix | 51 +++-------------------------------------- 1 file changed, 3 insertions(+), 48 deletions(-) diff --git a/modules/shell/helix.nix b/modules/shell/helix.nix index c18bad5..e018746 100644 --- a/modules/shell/helix.nix +++ b/modules/shell/helix.nix @@ -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 = {