Meow III
This commit is contained in:
parent
a646e3e016
commit
55a7cb8b00
6 changed files with 0 additions and 202 deletions
|
@ -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
|
|
||||||
'';
|
|
||||||
})
|
|
|
@ -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; })
|
|
||||||
]
|
|
|
@ -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
|
|
||||||
'';
|
|
||||||
})
|
|
|
@ -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
|
|
||||||
|
|
||||||
'';
|
|
||||||
})
|
|
|
@ -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}
|
|
||||||
|
|
||||||
'';
|
|
||||||
})
|
|
|
@ -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"
|
|
||||||
'';
|
|
||||||
})
|
|
||||||
]
|
|
Loading…
Reference in a new issue