From 32b448eda6d3e89c23b9a5a3ada23658d0563619 Mon Sep 17 00:00:00 2001 From: chayleaf Date: Thu, 29 Jun 2023 08:17:19 +0700 Subject: [PATCH] home/{kakoune,helix}: small maintenance --- home/common/helix.nix | 9 +++++-- home/common/kakoune.nix | 57 +++++++++++++++++++++++------------------ 2 files changed, 39 insertions(+), 27 deletions(-) diff --git a/home/common/helix.nix b/home/common/helix.nix index dcabd6f..cfe9502 100644 --- a/home/common/helix.nix +++ b/home/common/helix.nix @@ -1,6 +1,6 @@ { pkgs, lib, ... }: let - wrapHelix = { extraPackages ? [ ], withPython3 ? true, extraPython3Packages ? (_: []) }: + wrapHelix = { extraPackages ? [ ], withPython3 ? true, extraPython3Packages ? (_: [ ]) }: pkgs.symlinkJoin { postBuild = '' rm $out/bin/hx @@ -28,9 +28,14 @@ in { ]; extraPython3Packages = (pypkgs: with pypkgs; [ python-lsp-server ]); }; - # languages = []; + # languages = [ ]; settings = { theme = "base16_terminal"; + editor.cursor-shape = { + insert = "bar"; + normal = "block"; + select = "block"; + }; }; }; } diff --git a/home/common/kakoune.nix b/home/common/kakoune.nix index 376bb92..0390767 100644 --- a/home/common/kakoune.nix +++ b/home/common/kakoune.nix @@ -1,6 +1,6 @@ { pkgs, lib, ... }: let - wrapKakoune = { extraPackages ? [ ], withPython3 ? true, extraPython3Packages ? (_: []) }: + wrapKakoune = { extraPackages ? [ ], withPython3 ? true, extraPython3Packages ? (_: [ ]) }: pkgs.symlinkJoin { postBuild = '' rm $out/bin/kak @@ -40,28 +40,35 @@ in { ''; plugins = with pkgs.kakounePlugins; [ kak-lsp smarttab-kak tabs-kak ]; }; - xdg.configFile."kak-lsp/kak-lsp.toml".text = '' - # bash, clangd, json, html, css, python work out of the box - [language.rust] - filetypes = ["rust"] - roots = ["rust-toolchain.toml", "rust-toolchain", "Cargo.toml"] - command = "rust-analyzer" - [language.typescript] - filetypes = ["typescript"] - roots = ["package.json"] - command = "typescript-language-server" - args = ["--stdio"] - [language.nix] - filetypes = ["nix"] - roots = ["flake.nix"] - command = "nil" - [language.markdown] - filetypes = ["markdown"] - roots = [] - command = "marksman" - [language.toml] - filetypes = ["toml"] - roots = [] - command = "taplo" - ''; + xdg.configFile."kak-lsp/kak-lsp.toml".source = (pkgs.formats.toml { }).generate "kak-lsp.toml" { + language = { + # bash, clangd, json, html, css, python work out of the box + rust = { + filetypes = [ "rust" ]; + roots = [ "rust-toolchain.toml" "rust-toolchain" "Cargo.toml" ]; + command = "rust-analyzer"; + }; + typescript = { + filetypes = [ "typescript" ]; + roots = [ "package.json" ]; + command = "typescript-language-server"; + args = [ "--stdio" ]; + }; + nix = { + filetypes = [ "nix" ]; + roots = [ "flake.nix" ]; + command = "nil"; + }; + markdown = { + filetypes = [ "markdown" ]; + roots = [ ]; + command = "marksman"; + }; + toml = { + filetypes = [ "toml" ]; + roots = [ ]; + command = "taplo"; + }; + }; + }; }