Retab kak config
This commit is contained in:
parent
f398775552
commit
11e08fc437
3 changed files with 157 additions and 167 deletions
|
@ -17,15 +17,15 @@ in
|
|||
|
||||
with lib; {
|
||||
|
||||
options.riley = {
|
||||
options.riley.kak = {
|
||||
|
||||
kak.enable = (mkEnableOption "kakoune editor") // { default = true; };
|
||||
enable = (mkEnableOption "kakoune editor") // { default = true; };
|
||||
|
||||
kak.rust = mkEnableOption "Rust support in Kakoune";
|
||||
kak.ts = mkEnableOption "TypeScript support in Kakoune";
|
||||
kak.haskell = mkEnableOption "Haskell support in Kakoune";
|
||||
kak.python = mkEnableOption "Python 3.9 support in Kakoune";
|
||||
kak.nix = (mkEnableOption "Nix support in Kakoune") // { default = true; };
|
||||
rust = mkEnableOption "Rust support in Kakoune";
|
||||
ts = mkEnableOption "TypeScript support in Kakoune";
|
||||
haskell = mkEnableOption "Haskell support in Kakoune";
|
||||
python = mkEnableOption "Python 3.9 support in Kakoune";
|
||||
nix = (mkEnableOption "Nix support in Kakoune") // { default = true; };
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -99,6 +99,9 @@ let semantic-tokens =
|
|||
|
||||
in (symlinkJoin {
|
||||
|
||||
name = "kak-lsp-${kak-lsp.version}";
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
paths = with kakounePlugins; [
|
||||
|
||||
# The language server client
|
||||
|
@ -113,9 +116,8 @@ in (symlinkJoin {
|
|||
++ (optional python python39Packages.python-lsp-server)
|
||||
++ (optional rust rust-analyzer);
|
||||
|
||||
name = "kak-lsp-${kak-lsp.version}";
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/kak-lsp --add-flags "--config $out/share/kak-lsp/kak-lsp.toml"
|
||||
'';
|
||||
|
||||
})
|
||||
|
|
|
@ -30,14 +30,8 @@ let keybinds = ''
|
|||
|
||||
lsp-inlay-diagnostics-enable window
|
||||
|
||||
hook window ModeChange .*:.*:insert %{
|
||||
remove-highlighter window/lsp_diagnostics
|
||||
}
|
||||
|
||||
hook window ModeChange .*:insert:normal %{
|
||||
lsp-inlay-diagnostics-enable window
|
||||
}
|
||||
|
||||
hook window ModeChange .*:.*:insert %{ remove-highlighter window/lsp_diagnostics }
|
||||
hook window ModeChange .*:insert:normal %{ lsp-inlay-diagnostics-enable window }
|
||||
'';
|
||||
|
||||
# Implies `ide-init`. Adds code actions and hover.
|
||||
|
@ -59,9 +53,7 @@ let keybinds = ''
|
|||
hook window -group semtok NormalIdle .* lsp-semantic-tokens
|
||||
hook window -group semtok InsertIdle .* lsp-semantic-tokens
|
||||
|
||||
hook -once -always window WinSetOption filetype=.* %{
|
||||
remove-hooks window semtok
|
||||
}
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window semtok }
|
||||
|
||||
map global normal <a-down> ': lsp-next-function<ret>'
|
||||
map global normal <a-up> ': lsp-previous-function<ret>'
|
||||
|
@ -148,13 +140,11 @@ in pkgs.writeTextFile (rec {
|
|||
name = "kakrc.kak";
|
||||
destination = "/share/kak/autoload/${name}";
|
||||
text = ''
|
||||
|
||||
colorscheme colors;
|
||||
set global tabstop 4
|
||||
|
||||
add-highlighter global/ number-lines -separator ' │ ' -hlcursor
|
||||
|
||||
set global tabstop 4
|
||||
|
||||
face global InlayHint rgb:828282
|
||||
face global InlayDiagnosticWarning rgb:a39e31+f
|
||||
face global InlayDiagnosticError rgb:ad494f+f
|
||||
|
@ -169,8 +159,6 @@ in pkgs.writeTextFile (rec {
|
|||
${rust-config}
|
||||
${nix-config}
|
||||
|
||||
hook global KakBegin .* %{
|
||||
cursorline
|
||||
}
|
||||
hook global KakBegin .* %{ cursorline }
|
||||
'';
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue