87 lines
2 KiB
Nix
87 lines
2 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
# Usage:
|
|
# pkgs.tree-sitter.withPlugins (p: [ p.tree-sitter-c p.tree-sitter-java ... ])
|
|
#
|
|
# or for all grammars:
|
|
# pkgs.tree-sitter.withPlugins (_: allGrammars)
|
|
# which is equivalent to
|
|
# pkgs.tree-sitter.withPlugins (p: builtins.attrValues p)
|
|
{
|
|
home.packages = [
|
|
(pkgs.tree-sitter.withPlugins (p:
|
|
with p; [
|
|
tree-sitter-bash
|
|
tree-sitter-bibtex
|
|
tree-sitter-css
|
|
tree-sitter-dockerfile
|
|
tree-sitter-elisp
|
|
tree-sitter-fortran
|
|
tree-sitter-html
|
|
tree-sitter-javascript
|
|
tree-sitter-json
|
|
tree-sitter-latex
|
|
tree-sitter-llvm
|
|
tree-sitter-lua
|
|
tree-sitter-make
|
|
tree-sitter-markdown
|
|
tree-sitter-nix
|
|
tree-sitter-python
|
|
tree-sitter-regex
|
|
tree-sitter-rst
|
|
tree-sitter-rust
|
|
tree-sitter-scss
|
|
tree-sitter-toml
|
|
tree-sitter-typescript
|
|
tree-sitter-yaml
|
|
]))
|
|
];
|
|
xdg.configFile."tree-sitter/config.json".text = builtins.toJSON {
|
|
parser-directories = [ ];
|
|
theme = {
|
|
"type.builtin" = {
|
|
color = 23;
|
|
bold = true;
|
|
};
|
|
variable.parameter = { underline = true; };
|
|
comment = {
|
|
color = 245;
|
|
italic = true;
|
|
};
|
|
constructor = 136;
|
|
"string.special" = 30;
|
|
variable.builtin = { bold = true; };
|
|
"constant.builtin" = {
|
|
bold = true;
|
|
color = 94;
|
|
};
|
|
"function.builtin" = {
|
|
color = 26;
|
|
bold = true;
|
|
};
|
|
function = 26;
|
|
attribute = {
|
|
color = 124;
|
|
italic = true;
|
|
};
|
|
constant = 94;
|
|
punctuation.delimiter = 239;
|
|
type = 23;
|
|
operator = {
|
|
bold = true;
|
|
color = 239;
|
|
};
|
|
punctuation.bracket = 239;
|
|
keyword = 56;
|
|
string = 28;
|
|
property = 124;
|
|
number = {
|
|
bold = true;
|
|
color = 94;
|
|
};
|
|
embedded = null;
|
|
module = 136;
|
|
tag = 18;
|
|
};
|
|
};
|
|
}
|