From 55a7cb8b00499459d787578aa281cd84a985b8f1 Mon Sep 17 00:00:00 2001 From: Riley Apeldoorn Date: Mon, 16 May 2022 17:59:44 +0200 Subject: [PATCH] Meow III --- modules/kak/colors/common.nix | 19 ------- modules/kak/colors/default.nix | 8 --- modules/kak/colors/haskell.nix | 21 -------- modules/kak/colors/nix.nix | 19 ------- modules/kak/colors/rust.nix | 45 ----------------- modules/kak/lsp.nix | 90 ---------------------------------- 6 files changed, 202 deletions(-) delete mode 100644 modules/kak/colors/common.nix delete mode 100644 modules/kak/colors/default.nix delete mode 100644 modules/kak/colors/haskell.nix delete mode 100644 modules/kak/colors/nix.nix delete mode 100644 modules/kak/colors/rust.nix delete mode 100644 modules/kak/lsp.nix diff --git a/modules/kak/colors/common.nix b/modules/kak/colors/common.nix deleted file mode 100644 index 9633e89..0000000 --- a/modules/kak/colors/common.nix +++ /dev/null @@ -1,19 +0,0 @@ -# Haskell text faces and other stuff related to syntax highlighting -# for Haskell in Kakoune, because I prefer different color arrangements -# per language. - -{ theme, pkgs, ... }: pkgs.writeTextFile (rec { - name = "common.kak"; - destination = "/share/kak/colors/${name}"; - text = with theme; '' - face global value rgb:${yellow.bright} - face global string rgb:${green.normal} - face global variable +a - face global module rgb:${green.normal} - face global operator rgb:${cyan.bright} - face global type rgb:${yellow.normal} - face global function rgb:${cyan.bright} - face global keyword rgb:${blue.normal}+b - face global builtin +b - ''; -}) diff --git a/modules/kak/colors/default.nix b/modules/kak/colors/default.nix deleted file mode 100644 index 3ef790e..0000000 --- a/modules/kak/colors/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -# Import syntax themes - -{ lib, theme, pkgs, ... }: [ - (import ./haskell.nix { inherit lib theme pkgs; }) - (import ./rust.nix { inherit lib theme pkgs; }) - (import ./nix.nix { inherit lib theme pkgs; }) - (import ./common.nix { inherit lib theme pkgs; }) -] diff --git a/modules/kak/colors/haskell.nix b/modules/kak/colors/haskell.nix deleted file mode 100644 index f21739d..0000000 --- a/modules/kak/colors/haskell.nix +++ /dev/null @@ -1,21 +0,0 @@ -# Haskell text faces and other stuff related to syntax highlighting -# for Haskell in Kakoune, because I prefer different color arrangements -# per language. - -{ theme, pkgs, ... }: pkgs.writeTextFile (rec { - name = "haskell.kak"; - destination = "/share/kak/colors/${name}"; - text = with theme; '' - face global value rgb:${green.bright} - face global string rgb:${green.bright} - face global variable +b - face global module rgb:${green.normal} - face global meta rgb:${misc.lime} - face global operator rgb:${cyan.bright} - face global type rgb:${yellow.normal} - face global function rgb:${cyan.bright} - face global attribute rgb:${blue.normal} - face global keyword rgb:${blue.normal} - face global builtin +b - ''; -}) diff --git a/modules/kak/colors/nix.nix b/modules/kak/colors/nix.nix deleted file mode 100644 index 8e2bafd..0000000 --- a/modules/kak/colors/nix.nix +++ /dev/null @@ -1,19 +0,0 @@ -# Haskell text faces and other stuff related to syntax highlighting -# for Haskell in Kakoune, because I prefer different color arrangements -# per language. - -{ theme, pkgs, ... }: pkgs.writeTextFile (rec { - name = "nix.kak"; - destination = "/share/kak/colors/${name}"; - text = with theme; '' - - add-highlighter buffer/ regex '\b\s*(=)' 1:operator - - face global string rgb:${green.normal} - face global operator rgb:${yellow.bright}+b - face global keyword rgb:${blue.normal}+b - face global meta rgb:${purple.bright} - face global builtin rgb:${blue.bright}+b - - ''; -}) diff --git a/modules/kak/colors/rust.nix b/modules/kak/colors/rust.nix deleted file mode 100644 index c560fd3..0000000 --- a/modules/kak/colors/rust.nix +++ /dev/null @@ -1,45 +0,0 @@ -# Haskell text faces and other stuff related to syntax highlighting -# for Haskell in Kakoune, because I prefer different color arrangements -# per language. - -{ theme, pkgs, ... }: pkgs.writeTextFile (rec { - name = "rust.kak"; - destination = "/share/kak/colors/${name}"; - text = with theme; '' - - # Types - face global variant rgb:${blue.normal}+b - face global enum rgb:${blue.normal}+b - face global struct rgb:${blue.normal}+b - face global alias rgb:${blue.normal}+b - face global primitive rgb:${blue.normal}+b - face global union rgb:${blue.normal}+b - face global trait rgb:${purple.bright}+b - - # Other Rust-specific syntax elements - face global lifetime rgb:${cyan.bright} - face global macro rgb:${green.bright}+b - face global format macro - - # Keywords - face global keyword rgb:${green.normal} - - # Literals - face global literal rgb:${misc.lime} - face global string literal - - # Items - # face global function rgb:ff70cd - face global function rgb:fc7cf8 - face global method function - face global module rgb:${misc.blueGrey} - - # Other stuff - face global attribute comment - face global variable rgb:f5f5f5 - face global property rgb:${misc.lime} - face global operator rgb:${yellow.normal} - face global punctuation rgb:${foreground.normal} - - ''; -}) diff --git a/modules/kak/lsp.nix b/modules/kak/lsp.nix deleted file mode 100644 index 16541dc..0000000 --- a/modules/kak/lsp.nix +++ /dev/null @@ -1,90 +0,0 @@ -{ config, pkgs, lib, ... }: with pkgs; - -let lsp-config = (writeTextFile (rec { - name = "kak-lsp.toml"; - destination = "/share/kak-lsp/${name}"; - text = let semTok = (name: value: '' - [[semantic_tokens]] - token = "${name}" - face = "${value}" - ''); in '' - - [language.rust] - filetypes = [ "rust" ] - roots = [ "Cargo.toml" ] - command = "rust-analyzer" - [language.rust.settings.rust-analyzer] - semanticTokens = true - diagnostics.enabled = [ "unresolved-proc-macro" ] - cargo.loadOutDirsFromCheck = true - procMacro.enable = false - - [language.haskell] - filetypes = [ "haskell" ] - roots = [ "Setup.hs", "stack.yaml", "*.cabal" ] - command = "haskell-language-server-wrapper" - args = [ "--lsp" ] - - [language.nix] - filetypes = [ "nix" ] - roots = [ "flake.nix", "shell.nix", ".git", ".hg" ] - command = "rnix-lsp" - - ${lib.concatStringsSep "\n" (lib.mapAttrsToList semTok { - "enumMember" = "variant"; - "enum" = "enum"; - "union" = "union"; - "struct" = "struct"; - "typeAlias" = "alias"; - "builtinType" = "primitive"; - "trait" = "trait"; - "interface" = "trait"; - "method" = "method"; - "function" = "function"; - "namespace" = "module"; - "boolean" = "literal"; - "character" = "literal"; - "number" = "literal"; - "string" = "string"; - "keyword" = "keyword"; - "documentation" = "comment"; - "comment" = "comment"; - "escapeSequence" = "format"; - "formatSpecifier" = "format"; - "operator" = "operator"; - "arithmetic" = "operator"; - "bitwise" = "operator"; - "comparison" = "operator"; - "logical" = "operator"; - "macro" = "macro"; - "lifetime" = "lifetime"; - "variable" = "variable"; - "attribute" = "attribute"; - "punctuation" = "punctuation"; - }) } - ''; - })); - -in [ - # Kakoune language server support - (symlinkJoin { - paths = with kakounePlugins; [ - - # The language server client - kak-lsp - - # Include default language servers - rnix-lsp - haskell-language-server - - # Overwrite kak-lsp.toml - lsp-config - - ]; - name = "kak-lsp-${kak-lsp.version}"; - nativeBuildInputs = [ makeWrapper ]; - postBuild = '' - wrapProgram $out/bin/kak-lsp --add-flags "--config $out/share/kak-lsp/kak-lsp.toml" - ''; - }) -]