home/{kakoune,helix}: small maintenance

This commit is contained in:
chayleaf 2023-06-29 08:17:19 +07:00
parent f1f95891c7
commit 32b448eda6
2 changed files with 39 additions and 27 deletions

View file

@ -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";
};
};
};
}

View file

@ -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 = ''
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
[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"
'';
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";
};
};
};
}