mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-12 13:52:36 +02:00
Merge branch 'main' into lib
This commit is contained in:
commit
8748b953c3
58 changed files with 2871 additions and 419 deletions
41
flake.nix
41
flake.nix
|
@ -35,11 +35,50 @@
|
||||||
(system:
|
(system:
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs { inherit system; };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
|
extractRustAnalyzer = { stdenv, pkgs }: stdenv.mkDerivation {
|
||||||
|
pname = "extract_rust_analyzer";
|
||||||
|
version = "master";
|
||||||
|
|
||||||
|
dontUnpack = true;
|
||||||
|
dontBuild = true;
|
||||||
|
|
||||||
|
buildInputs = [ pkgs.python3 ];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
ls -la
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp ${./helpers/extract_rust_analyzer.py} $out/bin/extract_rust_analyzer.py
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
extractRustAnalyzerPkg = pkgs.callPackage extractRustAnalyzer { };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
packages.docs = pkgs.callPackage (import ./docs.nix) {
|
packages = {
|
||||||
|
docs = pkgs.callPackage (import ./docs.nix) {
|
||||||
modules = nixvimModules;
|
modules = nixvimModules;
|
||||||
};
|
};
|
||||||
|
runUpdates = pkgs.callPackage
|
||||||
|
({ pkgs, stdenv }: stdenv.mkDerivation {
|
||||||
|
pname = "run-updates";
|
||||||
|
version = pkgs.rust-analyzer.version;
|
||||||
|
|
||||||
|
src = pkgs.rust-analyzer.src;
|
||||||
|
|
||||||
|
nativeBuildInputs = with pkgs; [extractRustAnalyzerPkg alejandra nixpkgs-fmt];
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
extract_rust_analyzer.py editors/code/package.json |
|
||||||
|
alejandra --quiet |
|
||||||
|
nixpkgs-fmt > rust-analyzer-config.nix
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/share
|
||||||
|
cp rust-analyzer-config.nix $out/share
|
||||||
|
'';
|
||||||
|
})
|
||||||
|
{ };
|
||||||
|
};
|
||||||
legacyPackages = rec {
|
legacyPackages = rec {
|
||||||
makeNixvimWithModule = import ./wrappers/standalone.nix pkgs modules;
|
makeNixvimWithModule = import ./wrappers/standalone.nix pkgs modules;
|
||||||
makeNixvim = configuration: makeNixvimWithModule {
|
makeNixvim = configuration: makeNixvimWithModule {
|
||||||
|
|
229
helpers/extract_rust_analyzer.py
Executable file
229
helpers/extract_rust_analyzer.py
Executable file
|
@ -0,0 +1,229 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import json
|
||||||
|
|
||||||
|
ra_package_json = sys.argv[1]
|
||||||
|
with open(ra_package_json) as f:
|
||||||
|
ra_package = json.load(f)
|
||||||
|
|
||||||
|
config = ra_package["contributes"]["configuration"]["properties"]
|
||||||
|
|
||||||
|
config_dict = {}
|
||||||
|
|
||||||
|
in_common_block = False
|
||||||
|
|
||||||
|
|
||||||
|
def py_to_nix(obj):
|
||||||
|
if obj is None:
|
||||||
|
return "null"
|
||||||
|
|
||||||
|
if obj is False:
|
||||||
|
return "false"
|
||||||
|
|
||||||
|
if obj is True:
|
||||||
|
return "true"
|
||||||
|
|
||||||
|
if isinstance(obj, str):
|
||||||
|
s = f'"{obj}"'
|
||||||
|
if "${" in s:
|
||||||
|
s = s.replace("${", "$\\{")
|
||||||
|
return s
|
||||||
|
|
||||||
|
if isinstance(obj, int):
|
||||||
|
return f"{obj}"
|
||||||
|
|
||||||
|
if isinstance(obj, dict):
|
||||||
|
val = "{"
|
||||||
|
for key in obj:
|
||||||
|
key_val = py_to_nix(obj[key])
|
||||||
|
val += f'"{key}" = {key_val};\n'
|
||||||
|
val += "}"
|
||||||
|
|
||||||
|
return val
|
||||||
|
|
||||||
|
if isinstance(obj, list):
|
||||||
|
return "[" + " ".join(py_to_nix(val) for val in obj) + "]"
|
||||||
|
|
||||||
|
print(f"Unhandled value: {obj}")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
def ty_to_nix(ty):
|
||||||
|
if ty == "boolean":
|
||||||
|
return "types.bool"
|
||||||
|
|
||||||
|
if ty == "string":
|
||||||
|
return "types.str"
|
||||||
|
|
||||||
|
# This is an object without any additional properties
|
||||||
|
if ty == "object":
|
||||||
|
return "types.attrsOf types.anything"
|
||||||
|
|
||||||
|
if isinstance(ty, list) and ty[0] == "null":
|
||||||
|
if len(ty) > 2:
|
||||||
|
print("Unhandled type", ty)
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
|
nullable_ty = ty_to_nix(ty[1])
|
||||||
|
return f"types.nullOr ({nullable_ty})"
|
||||||
|
|
||||||
|
if isinstance(ty, list):
|
||||||
|
either_types = (ty_to_nix(t) for t in ty)
|
||||||
|
either_types = " ".join(f"({t})" for t in either_types)
|
||||||
|
return f"types.oneOf ([{either_types}])"
|
||||||
|
|
||||||
|
print(f"Unhandled type: {ty}")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
def prop_ty_to_nix(prop_info):
|
||||||
|
if "type" in prop_info:
|
||||||
|
if "enum" in prop_info:
|
||||||
|
enum = "[" + " ".join(f'"{member}"' for member in prop_info["enum"]) + "]"
|
||||||
|
if prop_info["type"] == "string":
|
||||||
|
return f"types.enum {enum}"
|
||||||
|
|
||||||
|
print("TODO: with unknown enum type", prop_info["type"])
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
|
if "additionalProperties" in prop_info or "properties" in prop_info:
|
||||||
|
print("TODO: with (additional)Properties", prop_info)
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
|
if "minimum" in prop_info or "maximum" in prop_info:
|
||||||
|
can_be_null = False
|
||||||
|
if "null" in prop_info["type"]:
|
||||||
|
can_be_null = True
|
||||||
|
if len(prop_info["type"]) > 2:
|
||||||
|
print("Unhandled int type", prop_info["type"])
|
||||||
|
sys.exit()
|
||||||
|
prop_info["type"] = prop_info["type"][1]
|
||||||
|
|
||||||
|
if prop_info["type"] == "number":
|
||||||
|
int_ty = "types.number"
|
||||||
|
elif prop_info["type"] == "integer":
|
||||||
|
int_ty = "types.int"
|
||||||
|
else:
|
||||||
|
print("Unhandled int type", prop_info["type"])
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
|
if "minimum" in prop_info and "maximum" in prop_info:
|
||||||
|
min = prop_info["minimum"]
|
||||||
|
max = prop_info["maximum"]
|
||||||
|
int_ty = f"{int_ty}s.between {min} {max}"
|
||||||
|
elif "minimum" in prop_info:
|
||||||
|
min = prop_info["minimum"]
|
||||||
|
int_ty = f"types.addCheck {int_ty} (x: x >= {min})"
|
||||||
|
else:
|
||||||
|
print("TODO: max number", prop_info)
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
|
if can_be_null:
|
||||||
|
return f"types.nullOr ({int_ty})"
|
||||||
|
else:
|
||||||
|
return int_ty
|
||||||
|
|
||||||
|
if "array" in prop_info["type"] or prop_info["type"] == "array":
|
||||||
|
if "items" not in prop_info:
|
||||||
|
print("Array without items")
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
|
items_ty = prop_ty_to_nix(prop_info["items"])
|
||||||
|
array_ty = f"types.listOf ({items_ty})"
|
||||||
|
if prop_info["type"] == "array":
|
||||||
|
return array_ty
|
||||||
|
elif prop_info["type"] == ["null", "array"]:
|
||||||
|
return f"types.nullOr ({array_ty})"
|
||||||
|
else:
|
||||||
|
print("Unhandled array type", prop_info)
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
|
return ty_to_nix(prop_info["type"])
|
||||||
|
elif "anyOf" in prop_info:
|
||||||
|
can_be_null = False
|
||||||
|
if {"type": "null"} in prop_info["anyOf"]:
|
||||||
|
can_be_null = True
|
||||||
|
prop_info["anyOf"].remove({"type": "null"})
|
||||||
|
|
||||||
|
types = (prop_ty_to_nix(prop) for prop in prop_info["anyOf"])
|
||||||
|
one_of = " ".join(f"({ty})" for ty in types)
|
||||||
|
one_of_ty = f"types.oneOf ([{one_of}])"
|
||||||
|
|
||||||
|
if can_be_null:
|
||||||
|
return f"types.nullOr ({one_of_ty})"
|
||||||
|
else:
|
||||||
|
return one_of_ty
|
||||||
|
else:
|
||||||
|
print("TODO: no *type*", prop_info)
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
|
|
||||||
|
for opt in config:
|
||||||
|
if opt.startswith("$"):
|
||||||
|
in_common_block = True
|
||||||
|
continue
|
||||||
|
|
||||||
|
if not in_common_block:
|
||||||
|
continue
|
||||||
|
|
||||||
|
opt_path = opt.split(".")
|
||||||
|
if opt_path[0] != "rust-analyzer":
|
||||||
|
print("ERROR: expected all options to start with 'rust-analyzer'")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
path = opt_path[1:-1]
|
||||||
|
option = opt_path[-1]
|
||||||
|
|
||||||
|
top_dict = config_dict
|
||||||
|
|
||||||
|
for p in path:
|
||||||
|
if not p in top_dict:
|
||||||
|
top_dict[p] = {}
|
||||||
|
top_dict = top_dict[p]
|
||||||
|
|
||||||
|
prop_info = config[opt]
|
||||||
|
|
||||||
|
is_optional = False
|
||||||
|
|
||||||
|
ty = prop_ty_to_nix(prop_info)
|
||||||
|
|
||||||
|
default = py_to_nix(prop_info["default"])
|
||||||
|
|
||||||
|
if "markdownDescription" in prop_info:
|
||||||
|
desc = prop_info["markdownDescription"]
|
||||||
|
else:
|
||||||
|
desc = prop_info["description"]
|
||||||
|
|
||||||
|
desc += f"\n\ndefault value is: \n```nix\n {default}\n```"
|
||||||
|
|
||||||
|
top_dict[
|
||||||
|
option
|
||||||
|
] = """
|
||||||
|
mkOption {{
|
||||||
|
type = types.nullOr ({ty});
|
||||||
|
default = null;
|
||||||
|
description = ''
|
||||||
|
{desc}
|
||||||
|
'';
|
||||||
|
}}
|
||||||
|
""".format(
|
||||||
|
ty=ty, default=default, desc=desc
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def print_dict(d):
|
||||||
|
print("{")
|
||||||
|
for key in d:
|
||||||
|
print(f'"{key}" = ')
|
||||||
|
if isinstance(d[key], str):
|
||||||
|
print(d[key])
|
||||||
|
else:
|
||||||
|
print_dict(d[key])
|
||||||
|
print(";")
|
||||||
|
print("}")
|
||||||
|
|
||||||
|
|
||||||
|
print("# THIS FILE IS AUTOGENERATED DO NOT EDIT")
|
||||||
|
print("lib: with lib;")
|
||||||
|
print_dict(config_dict)
|
|
@ -14,7 +14,8 @@ rec {
|
||||||
else
|
else
|
||||||
"{" + (concatStringsSep ","
|
"{" + (concatStringsSep ","
|
||||||
(mapAttrsToList
|
(mapAttrsToList
|
||||||
(n: v: if head (stringToCharacters n) == "@" then
|
(n: v:
|
||||||
|
if head (stringToCharacters n) == "@" then
|
||||||
toLuaObject v
|
toLuaObject v
|
||||||
else "[${toLuaObject n}] = " + (toLuaObject v))
|
else "[${toLuaObject n}] = " + (toLuaObject v))
|
||||||
(filterAttrs (n: v: !isNull v && toLuaObject v != "{}") args))) + "}"
|
(filterAttrs (n: v: !isNull v && toLuaObject v != "{}") args))) + "}"
|
||||||
|
@ -36,8 +37,10 @@ rec {
|
||||||
else "";
|
else "";
|
||||||
|
|
||||||
# Generates maps for a lua config
|
# Generates maps for a lua config
|
||||||
genMaps = mode: maps: let
|
genMaps = mode: maps:
|
||||||
normalized = builtins.mapAttrs (key: action:
|
let
|
||||||
|
normalized = builtins.mapAttrs
|
||||||
|
(key: action:
|
||||||
if builtins.isString action then
|
if builtins.isString action then
|
||||||
{
|
{
|
||||||
silent = false;
|
silent = false;
|
||||||
|
@ -48,8 +51,11 @@ rec {
|
||||||
nowait = false;
|
nowait = false;
|
||||||
action = action;
|
action = action;
|
||||||
}
|
}
|
||||||
else action) maps;
|
else action)
|
||||||
in builtins.attrValues (builtins.mapAttrs (key: action:
|
maps;
|
||||||
|
in
|
||||||
|
builtins.attrValues (builtins.mapAttrs
|
||||||
|
(key: action:
|
||||||
{
|
{
|
||||||
action = action.action;
|
action = action.action;
|
||||||
config = lib.filterAttrs (_: v: v) {
|
config = lib.filterAttrs (_: v: v) {
|
||||||
|
@ -57,7 +63,8 @@ rec {
|
||||||
};
|
};
|
||||||
key = key;
|
key = key;
|
||||||
mode = mode;
|
mode = mode;
|
||||||
}) normalized);
|
})
|
||||||
|
normalized);
|
||||||
|
|
||||||
# Creates an option with a nullable type that defaults to null.
|
# Creates an option with a nullable type that defaults to null.
|
||||||
mkNullOrOption = type: desc: lib.mkOption {
|
mkNullOrOption = type: desc: lib.mkOption {
|
||||||
|
@ -66,22 +73,41 @@ rec {
|
||||||
description = desc;
|
description = desc;
|
||||||
};
|
};
|
||||||
|
|
||||||
mkPlugin = { config, lib, ... }: {
|
defaultNullOpts = rec {
|
||||||
name,
|
mkNullable = type: default: desc: mkNullOrOption type (
|
||||||
description,
|
let
|
||||||
package ? null,
|
defaultDesc = "default: `${default}`";
|
||||||
extraPlugins ? [],
|
in
|
||||||
extraPackages ? [],
|
if desc == "" then defaultDesc else ''
|
||||||
options ? {},
|
${desc}
|
||||||
...
|
|
||||||
}: let
|
${defaultDesc}
|
||||||
|
''
|
||||||
|
);
|
||||||
|
|
||||||
|
mkInt = default: mkNullable lib.types.int (toString default);
|
||||||
|
mkBool = default: mkNullable lib.types.bool (toString default);
|
||||||
|
mkStr = default: mkNullable lib.types.str ''"${default}"'';
|
||||||
|
};
|
||||||
|
|
||||||
|
mkPlugin = { config, lib, ... }: { name
|
||||||
|
, description
|
||||||
|
, package ? null
|
||||||
|
, extraPlugins ? [ ]
|
||||||
|
, extraPackages ? [ ]
|
||||||
|
, options ? { }
|
||||||
|
, ...
|
||||||
|
}:
|
||||||
|
let
|
||||||
cfg = config.plugins.${name};
|
cfg = config.plugins.${name};
|
||||||
# TODO support nested options!
|
# TODO support nested options!
|
||||||
pluginOptions = mapAttrs (k: v: v.option) options;
|
pluginOptions = mapAttrs (k: v: v.option) options;
|
||||||
globals = mapAttrs' (name: opt: {
|
globals = mapAttrs'
|
||||||
|
(name: opt: {
|
||||||
name = opt.global;
|
name = opt.global;
|
||||||
value = if cfg.${name} != null then opt.value cfg.${name} else null;
|
value = if cfg.${name} != null then opt.value cfg.${name} else null;
|
||||||
}) options;
|
})
|
||||||
|
options;
|
||||||
# does this evaluate package?
|
# does this evaluate package?
|
||||||
packageOption = if package == null then { } else {
|
packageOption = if package == null then { } else {
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
|
@ -90,7 +116,8 @@ rec {
|
||||||
description = "Plugin to use for ${name}";
|
description = "Plugin to use for ${name}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.plugins.${name} = {
|
options.plugins.${name} = {
|
||||||
enable = mkEnableOption description;
|
enable = mkEnableOption description;
|
||||||
} // packageOption // pluginOptions;
|
} // packageOption // pluginOptions;
|
||||||
|
@ -102,7 +129,8 @@ rec {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
globalVal = val: if builtins.isBool val then
|
globalVal = val:
|
||||||
|
if builtins.isBool val then
|
||||||
(if val == false then 0 else 1)
|
(if val == false then 0 else 1)
|
||||||
else val;
|
else val;
|
||||||
|
|
||||||
|
|
|
@ -15,10 +15,21 @@ with lib;
|
||||||
};
|
};
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
match = mkOption {
|
||||||
|
type = types.attrsOf types.str;
|
||||||
|
default = { };
|
||||||
|
description = "Define match groups";
|
||||||
|
example = ''
|
||||||
|
match = {
|
||||||
|
ExtraWhitespace = '\\s\\+$';
|
||||||
|
};
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf (config.highlight != { }) {
|
config = mkIf (config.highlight != { } || config.match != { }) {
|
||||||
extraConfigLuaPost = ''
|
extraConfigLuaPost = (optionalString (config.highlight != { }) ''
|
||||||
-- Highlight groups {{
|
-- Highlight groups {{
|
||||||
do
|
do
|
||||||
local highlights = ${helpers.toLuaObject config.highlight}
|
local highlights = ${helpers.toLuaObject config.highlight}
|
||||||
|
@ -28,6 +39,18 @@ with lib;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- }}
|
-- }}
|
||||||
'';
|
'') +
|
||||||
|
(optionalString (config.match != { }) ''
|
||||||
|
-- Match groups {{
|
||||||
|
do
|
||||||
|
local match = ${helpers.toLuaObject config.match}
|
||||||
|
|
||||||
|
for k,v in pairs(match) do
|
||||||
|
vim.fn.matchadd(k, v)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- }}
|
||||||
|
'');
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.plugins.barbar = {
|
options.plugins.barbar = {
|
||||||
enable = mkEnableOption "Enable barbar.nvim";
|
enable = mkEnableOption "barbar.nvim";
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
|
@ -32,13 +32,13 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
icons = mkOption {
|
icons = mkOption {
|
||||||
type = with types; nullOr (oneOf [bool (enum ["numbers both"])]);
|
type = with types; nullOr (oneOf [ bool (enum [ "numbers both" ]) ]);
|
||||||
default = null;
|
default = null;
|
||||||
description = "Enable/disable icons";
|
description = "Enable/disable icons";
|
||||||
};
|
};
|
||||||
|
|
||||||
iconCustomColors = mkOption {
|
iconCustomColors = mkOption {
|
||||||
type = with types; nullOr (oneOf [bool str]);
|
type = with types; nullOr (oneOf [ bool str ]);
|
||||||
default = null;
|
default = null;
|
||||||
description = "Sets the icon highlight group";
|
description = "Sets the icon highlight group";
|
||||||
};
|
};
|
||||||
|
@ -56,7 +56,8 @@ in
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
extraPlugins = with pkgs.vimPlugins; [
|
extraPlugins = with pkgs.vimPlugins; [
|
||||||
cfg.package nvim-web-devicons
|
cfg.package
|
||||||
|
nvim-web-devicons
|
||||||
];
|
];
|
||||||
|
|
||||||
# maps = genMaps cfg.keys;
|
# maps = genMaps cfg.keys;
|
||||||
|
|
|
@ -33,7 +33,7 @@ in
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
plugins.bufferline = {
|
plugins.bufferline = {
|
||||||
enable = mkEnableOption "Enable bufferline";
|
enable = mkEnableOption "bufferline";
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
description = "Plugin to use for bufferline";
|
description = "Plugin to use for bufferline";
|
||||||
|
|
|
@ -7,7 +7,7 @@ in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
colorschemes.base16 = {
|
colorschemes.base16 = {
|
||||||
enable = mkEnableOption "Enable base16";
|
enable = mkEnableOption "base16";
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
|
|
|
@ -7,7 +7,7 @@ in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
colorschemes.gruvbox = {
|
colorschemes.gruvbox = {
|
||||||
enable = mkEnableOption "Enable gruvbox";
|
enable = mkEnableOption "gruvbox";
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
|
@ -15,10 +15,10 @@ in
|
||||||
description = "Plugin to use for gruvbox";
|
description = "Plugin to use for gruvbox";
|
||||||
};
|
};
|
||||||
|
|
||||||
italics = mkEnableOption "Enable italics";
|
italics = mkEnableOption "italics";
|
||||||
bold = mkEnableOption "Enable bold";
|
bold = mkEnableOption "bold";
|
||||||
underline = mkEnableOption "Enable underlined text";
|
underline = mkEnableOption "underlined text";
|
||||||
undercurl = mkEnableOption "Enable undercurled text";
|
undercurl = mkEnableOption "undercurled text";
|
||||||
|
|
||||||
contrastDark = mkOption {
|
contrastDark = mkOption {
|
||||||
type = types.nullOr (types.enum [ "soft" "medium" "hard" ]);
|
type = types.nullOr (types.enum [ "soft" "medium" "hard" ]);
|
||||||
|
@ -110,9 +110,9 @@ in
|
||||||
description = "Improved warnings";
|
description = "Improved warnings";
|
||||||
};
|
};
|
||||||
|
|
||||||
transparentBg = mkEnableOption "Transparent background";
|
transparentBg = mkEnableOption "transparent background";
|
||||||
|
|
||||||
trueColor = mkEnableOption "Enable true color support";
|
trueColor = mkEnableOption "true color support";
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -6,7 +6,7 @@ in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
colorschemes.nord = {
|
colorschemes.nord = {
|
||||||
enable = mkEnableOption "Enable nord";
|
enable = mkEnableOption "nord";
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
|
|
|
@ -6,7 +6,7 @@ in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
colorschemes.one = {
|
colorschemes.one = {
|
||||||
enable = mkEnableOption "Enable vim-one";
|
enable = mkEnableOption "vim-one";
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
|
|
|
@ -6,7 +6,7 @@ in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
colorschemes.onedark = {
|
colorschemes.onedark = {
|
||||||
enable = mkEnableOption "Enable onedark";
|
enable = mkEnableOption "onedark";
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
|
|
|
@ -8,7 +8,7 @@ in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
colorschemes.tokyonight = {
|
colorschemes.tokyonight = {
|
||||||
enable = mkEnableOption "Enable tokyonight";
|
enable = mkEnableOption "tokyonight";
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
default = pkgs.vimPlugins.tokyonight-nvim;
|
default = pkgs.vimPlugins.tokyonight-nvim;
|
||||||
|
@ -24,8 +24,7 @@ in
|
||||||
default = true;
|
default = true;
|
||||||
description = "Configure the colors used when opening a :terminal in Neovim";
|
description = "Configure the colors used when opening a :terminal in Neovim";
|
||||||
};
|
};
|
||||||
transparent =
|
transparent = mkEnableOption "disable setting the background color";
|
||||||
mkEnableOption "Enable this to disable setting the background color";
|
|
||||||
styles =
|
styles =
|
||||||
let
|
let
|
||||||
mkBackgroundStyle = name: mkOption {
|
mkBackgroundStyle = name: mkOption {
|
||||||
|
|
|
@ -6,7 +6,7 @@ in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
plugins.copilot = {
|
plugins.copilot = {
|
||||||
enable = mkEnableOption "Enable copilot";
|
enable = mkEnableOption "copilot";
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
description = "The copilot plugin package to use";
|
description = "The copilot plugin package to use";
|
||||||
|
|
|
@ -9,7 +9,7 @@ in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
plugins.coq-nvim = {
|
plugins.coq-nvim = {
|
||||||
enable = mkEnableOption "Enable coq-nvim";
|
enable = mkEnableOption "coq-nvim";
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
|
|
|
@ -15,7 +15,7 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.plugins.nvim-cmp = {
|
options.plugins.nvim-cmp = {
|
||||||
enable = mkEnableOption "Enable nvim-cmp";
|
enable = mkEnableOption "nvim-cmp";
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
|
@ -215,6 +215,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
auto_enable_sources = mkOption {
|
auto_enable_sources = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = ''
|
description = ''
|
||||||
Scans the sources array and installs the plugins if they are known to nixvim.
|
Scans the sources array and installs the plugins if they are known to nixvim.
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
./languages/ledger.nix
|
./languages/ledger.nix
|
||||||
./languages/nix.nix
|
./languages/nix.nix
|
||||||
./languages/plantuml-syntax.nix
|
./languages/plantuml-syntax.nix
|
||||||
|
./languages/rust.nix
|
||||||
./languages/treesitter.nix
|
./languages/treesitter.nix
|
||||||
./languages/treesitter-context.nix
|
./languages/treesitter-context.nix
|
||||||
./languages/treesitter-refactor.nix
|
./languages/treesitter-refactor.nix
|
||||||
|
@ -34,6 +35,7 @@
|
||||||
./nvim-lsp
|
./nvim-lsp
|
||||||
./nvim-lsp/lspsaga.nix
|
./nvim-lsp/lspsaga.nix
|
||||||
./nvim-lsp/lsp-lines.nix
|
./nvim-lsp/lsp-lines.nix
|
||||||
|
./nvim-lsp/nvim-lightbulb.nix
|
||||||
./nvim-lsp/trouble.nix
|
./nvim-lsp/trouble.nix
|
||||||
|
|
||||||
./pluginmanagers/packer.nix
|
./pluginmanagers/packer.nix
|
||||||
|
@ -56,6 +58,7 @@
|
||||||
./utils/mark-radar.nix
|
./utils/mark-radar.nix
|
||||||
./utils/notify.nix
|
./utils/notify.nix
|
||||||
./utils/nvim-autopairs.nix
|
./utils/nvim-autopairs.nix
|
||||||
|
./utils/nvim-colorizer.nix
|
||||||
./utils/nvim-tree.nix
|
./utils/nvim-tree.nix
|
||||||
./utils/project-nvim.nix
|
./utils/project-nvim.nix
|
||||||
./utils/specs.nix
|
./utils/specs.nix
|
||||||
|
|
|
@ -7,7 +7,7 @@ in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
plugins.gitgutter = {
|
plugins.gitgutter = {
|
||||||
enable = mkEnableOption "Enable gitgutter";
|
enable = mkEnableOption "gitgutter";
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
{
|
{ config
|
||||||
config,
|
, lib
|
||||||
lib,
|
, pkgs
|
||||||
pkgs,
|
, helpers
|
||||||
helpers,
|
, ...
|
||||||
...
|
|
||||||
}:
|
}:
|
||||||
with lib; let
|
with lib; let
|
||||||
signOptions = defaults:
|
signOptions = defaults:
|
||||||
|
@ -28,7 +27,7 @@ with lib; let
|
||||||
description = "Specifies the highlight group to use for the line";
|
description = "Specifies the highlight group to use for the line";
|
||||||
default = defaults.linehl;
|
default = defaults.linehl;
|
||||||
};
|
};
|
||||||
showCount = mkEnableOption "Enable showing count of hunk, e.g. number of deleted lines";
|
showCount = mkEnableOption "showing count of hunk, e.g. number of deleted lines";
|
||||||
};
|
};
|
||||||
signSetupOptions = values: {
|
signSetupOptions = values: {
|
||||||
inherit (values) hl text numhl linehl;
|
inherit (values) hl text numhl linehl;
|
||||||
|
@ -41,7 +40,8 @@ with lib; let
|
||||||
description = "Lua function definition";
|
description = "Lua function definition";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.plugins.gitsigns = {
|
options.plugins.gitsigns = {
|
||||||
enable = mkEnableOption "Enable gitsigns plugin";
|
enable = mkEnableOption "Enable gitsigns plugin";
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
|
@ -87,7 +87,8 @@ in {
|
||||||
linehl = "GitSignsAddLn";
|
linehl = "GitSignsAddLn";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
worktrees = let
|
worktrees =
|
||||||
|
let
|
||||||
worktreeModule = {
|
worktreeModule = {
|
||||||
options = {
|
options = {
|
||||||
toplevel = mkOption {
|
toplevel = mkOption {
|
||||||
|
@ -166,29 +167,30 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
numhl = mkEnableOption ''
|
numhl = mkEnableOption ''
|
||||||
Enable/disable line number highlights.
|
line number highlights.
|
||||||
|
|
||||||
When enabled the highlights defined in `signs.*.numhl` are used. If
|
When enabled the highlights defined in `signs.*.numhl` are used. If
|
||||||
the highlight group does not exist, then it is automatically defined
|
the highlight group does not exist, then it is automatically defined
|
||||||
and linked to the corresponding highlight group in `signs.*.hl`.
|
and linked to the corresponding highlight group in `signs.*.hl`.
|
||||||
'';
|
'';
|
||||||
linehl = mkEnableOption ''
|
linehl = mkEnableOption ''
|
||||||
Enable/disable line highlights.
|
line highlights.
|
||||||
|
|
||||||
When enabled the highlights defined in `signs.*.linehl` are used. If
|
When enabled the highlights defined in `signs.*.linehl` are used. If
|
||||||
the highlight group does not exist, then it is automatically defined
|
the highlight group does not exist, then it is automatically defined
|
||||||
and linked to the corresponding highlight group in `signs.*.hl`.
|
and linked to the corresponding highlight group in `signs.*.hl`.
|
||||||
'';
|
'';
|
||||||
showDeleted = mkEnableOption ''
|
showDeleted = mkEnableOption ''
|
||||||
Show the old version of hunks inline in the buffer (via virtual lines).
|
showing the old version of hunks inline in the buffer (via virtual lines).
|
||||||
|
|
||||||
Note: Virtual lines currently use the highlight `GitSignsDeleteVirtLn`.
|
Note: Virtual lines currently use the highlight `GitSignsDeleteVirtLn`.
|
||||||
'';
|
'';
|
||||||
diffOpts = let
|
diffOpts =
|
||||||
|
let
|
||||||
diffOptModule = {
|
diffOptModule = {
|
||||||
options = {
|
options = {
|
||||||
algorithm = mkOption {
|
algorithm = mkOption {
|
||||||
type = types.enum ["myers" "minimal" "patience" "histogram"];
|
type = types.enum [ "myers" "minimal" "patience" "histogram" ];
|
||||||
default = "myers";
|
default = "myers";
|
||||||
description = "Diff algorithm to use";
|
description = "Diff algorithm to use";
|
||||||
};
|
};
|
||||||
|
@ -307,7 +309,7 @@ in {
|
||||||
description = "Whether to show a virtual text blame annotation";
|
description = "Whether to show a virtual text blame annotation";
|
||||||
};
|
};
|
||||||
virtTextPos = mkOption {
|
virtTextPos = mkOption {
|
||||||
type = types.enum ["eol" "overlay" "right_align"];
|
type = types.enum [ "eol" "overlay" "right_align" ];
|
||||||
default = "eol";
|
default = "eol";
|
||||||
description = "Blame annotation position";
|
description = "Blame annotation position";
|
||||||
};
|
};
|
||||||
|
@ -352,7 +354,7 @@ in {
|
||||||
window.
|
window.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
yadm.enable = mkEnableOption "Enable YADM support";
|
yadm.enable = mkEnableOption "YADM support";
|
||||||
wordDiff = mkEnableOption ''
|
wordDiff = mkEnableOption ''
|
||||||
Highlight intra-line word differences in the buffer.
|
Highlight intra-line word differences in the buffer.
|
||||||
Requires `config.diff_opts.internal = true`.
|
Requires `config.diff_opts.internal = true`.
|
||||||
|
@ -363,24 +365,26 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
config = let
|
config =
|
||||||
|
let
|
||||||
cfg = config.plugins.gitsigns;
|
cfg = config.plugins.gitsigns;
|
||||||
in
|
in
|
||||||
mkIf cfg.enable {
|
mkIf cfg.enable {
|
||||||
extraPlugins = with pkgs.vimPlugins; [
|
extraPlugins = with pkgs.vimPlugins; [
|
||||||
cfg.package
|
cfg.package
|
||||||
];
|
];
|
||||||
extraConfigLua = let
|
extraConfigLua =
|
||||||
|
let
|
||||||
luaFnOrStrToObj = val:
|
luaFnOrStrToObj = val:
|
||||||
if builtins.isString val
|
if builtins.isString val
|
||||||
then val
|
then val
|
||||||
else {__raw = val.function;};
|
else { __raw = val.function; };
|
||||||
setupOptions = {
|
setupOptions = {
|
||||||
inherit (cfg) worktrees signcolumn numhl linehl trouble yadm;
|
inherit (cfg) worktrees signcolumn numhl linehl trouble yadm;
|
||||||
signs = mapAttrs (_: signSetupOptions) cfg.signs;
|
signs = mapAttrs (_: signSetupOptions) cfg.signs;
|
||||||
on_attach =
|
on_attach =
|
||||||
if cfg.onAttach != null
|
if cfg.onAttach != null
|
||||||
then {__raw = cfg.onAttach.function;}
|
then { __raw = cfg.onAttach.function; }
|
||||||
else null;
|
else null;
|
||||||
watch_gitdir = {
|
watch_gitdir = {
|
||||||
inherit (cfg.watchGitDir) enable interval;
|
inherit (cfg.watchGitDir) enable interval;
|
||||||
|
@ -395,13 +399,16 @@ in {
|
||||||
inherit (cfg.diffOpts) algorithm internal vertical linematch;
|
inherit (cfg.diffOpts) algorithm internal vertical linematch;
|
||||||
indent_heuristic = cfg.diffOpts.indentHeuristic;
|
indent_heuristic = cfg.diffOpts.indentHeuristic;
|
||||||
};
|
};
|
||||||
count_chars = let
|
count_chars =
|
||||||
|
let
|
||||||
isStrInt = s: (builtins.match "[0-9]+" s) != null;
|
isStrInt = s: (builtins.match "[0-9]+" s) != null;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
__raw =
|
__raw =
|
||||||
"{"
|
"{"
|
||||||
+ (concatStringsSep "," (
|
+ (concatStringsSep "," (
|
||||||
lib.mapAttrsToList (
|
lib.mapAttrsToList
|
||||||
|
(
|
||||||
name: value:
|
name: value:
|
||||||
if isStrInt name
|
if isStrInt name
|
||||||
then "[${name}] = ${helpers.toLuaObject value}"
|
then "[${name}] = ${helpers.toLuaObject value}"
|
||||||
|
@ -411,15 +418,17 @@ in {
|
||||||
))
|
))
|
||||||
+ "}";
|
+ "}";
|
||||||
};
|
};
|
||||||
status_formatter = {__raw = cfg.statusFormatter.function;};
|
status_formatter = { __raw = cfg.statusFormatter.function; };
|
||||||
max_file_length = cfg.maxFileLength;
|
max_file_length = cfg.maxFileLength;
|
||||||
preview_config = cfg.previewConfig;
|
preview_config = cfg.previewConfig;
|
||||||
attach_to_untracked = cfg.attachToUntracked;
|
attach_to_untracked = cfg.attachToUntracked;
|
||||||
update_debounce = cfg.updateDebounce;
|
update_debounce = cfg.updateDebounce;
|
||||||
current_line_blame = cfg.currentLineBlame;
|
current_line_blame = cfg.currentLineBlame;
|
||||||
current_line_blame_opts = let
|
current_line_blame_opts =
|
||||||
|
let
|
||||||
cfgCl = cfg.currentLineBlameOpts;
|
cfgCl = cfg.currentLineBlameOpts;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
inherit (cfgCl) delay;
|
inherit (cfgCl) delay;
|
||||||
virt_text = cfgCl.virtText;
|
virt_text = cfgCl.virtText;
|
||||||
virt_text_pos = cfgCl.virtTextPos;
|
virt_text_pos = cfgCl.virtTextPos;
|
||||||
|
@ -431,7 +440,8 @@ in {
|
||||||
word_diff = cfg.wordDiff;
|
word_diff = cfg.wordDiff;
|
||||||
debug_mode = cfg.debugMode;
|
debug_mode = cfg.debugMode;
|
||||||
};
|
};
|
||||||
in ''
|
in
|
||||||
|
''
|
||||||
require('gitsigns').setup(${helpers.toLuaObject setupOptions})
|
require('gitsigns').setup(${helpers.toLuaObject setupOptions})
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
@ -16,7 +16,7 @@ in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
plugins.neogit = {
|
plugins.neogit = {
|
||||||
enable = mkEnableOption "Enable neogit";
|
enable = mkEnableOption "neogit";
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
args: import ../lib/helpers.nix args
|
args: import ../lib/helpers.nix args
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
{
|
{ pkgs
|
||||||
pkgs,
|
, lib
|
||||||
lib,
|
, config
|
||||||
config,
|
, ...
|
||||||
...
|
|
||||||
}:
|
}:
|
||||||
with lib; {
|
with lib; {
|
||||||
options.plugins.plantuml-syntax = {
|
options.plugins.plantuml-syntax = {
|
||||||
enable = mkEnableOption "Enable plantuml syntax support";
|
enable = mkEnableOption "plantuml syntax support";
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
|
@ -26,7 +25,8 @@ with lib; {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = let
|
config =
|
||||||
|
let
|
||||||
cfg = config.plugins.plantuml-syntax;
|
cfg = config.plugins.plantuml-syntax;
|
||||||
in
|
in
|
||||||
mkIf cfg.enable {
|
mkIf cfg.enable {
|
||||||
|
|
229
plugins/languages/rust.nix
Normal file
229
plugins/languages/rust.nix
Normal file
|
@ -0,0 +1,229 @@
|
||||||
|
{ pkgs
|
||||||
|
, config
|
||||||
|
, lib
|
||||||
|
, helpers
|
||||||
|
, ...
|
||||||
|
}:
|
||||||
|
with lib; {
|
||||||
|
options.plugins.rust-tools =
|
||||||
|
let
|
||||||
|
mkNullableOptionWithDefault =
|
||||||
|
{ type
|
||||||
|
, description
|
||||||
|
, default
|
||||||
|
,
|
||||||
|
}:
|
||||||
|
mkOption {
|
||||||
|
type = types.nullOr type;
|
||||||
|
default = null;
|
||||||
|
description = ''
|
||||||
|
${description}
|
||||||
|
|
||||||
|
default: `${default}`
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
mkNullableBoolDefault = default: description:
|
||||||
|
mkNullableOptionWithDefault {
|
||||||
|
inherit description;
|
||||||
|
type = types.bool;
|
||||||
|
default = toString default;
|
||||||
|
};
|
||||||
|
|
||||||
|
mkNullableStrDefault = default: description:
|
||||||
|
mkNullableOptionWithDefault {
|
||||||
|
inherit description;
|
||||||
|
type = types.str;
|
||||||
|
default = ''"${default}"'';
|
||||||
|
};
|
||||||
|
|
||||||
|
mkNullableIntDefault = default: description:
|
||||||
|
mkNullableOptionWithDefault {
|
||||||
|
inherit description;
|
||||||
|
type = types.int;
|
||||||
|
default = toString default;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
enable = mkEnableOption "rust tools plugins";
|
||||||
|
package = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = pkgs.vimPlugins.rust-tools-nvim;
|
||||||
|
description = "Package to use for rust-tools";
|
||||||
|
};
|
||||||
|
|
||||||
|
executor = mkNullableOptionWithDefault {
|
||||||
|
type = types.enum [ "termopen" "quickfix" ];
|
||||||
|
default = ''"termopen"'';
|
||||||
|
description = "how to execute terminal commands";
|
||||||
|
};
|
||||||
|
|
||||||
|
onIntialized = mkOption {
|
||||||
|
type = types.nullOr types.str;
|
||||||
|
default = null;
|
||||||
|
description = ''
|
||||||
|
Callback to execute once rust-analyzer is done initializing the workspace
|
||||||
|
The callback receives one parameter indicating the `health` of the server:
|
||||||
|
"ok" | "warning" | "error"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
reloadWorkspaceFromCargoToml = mkNullableBoolDefault true ''
|
||||||
|
Automatically call RustReloadWorkspace when writing to a Cargo.toml file.
|
||||||
|
'';
|
||||||
|
|
||||||
|
inlayHints = {
|
||||||
|
auto = mkNullableBoolDefault true "automatically set inlay hints (type hints)";
|
||||||
|
|
||||||
|
onlyCurrentLine = mkNullableBoolDefault false "Only show for current line";
|
||||||
|
|
||||||
|
showParameterHints =
|
||||||
|
mkNullableBoolDefault true
|
||||||
|
"whether to show parameter hints with the inlay hints or not";
|
||||||
|
|
||||||
|
parameterHintsPrefix = mkNullableStrDefault "<- " "prefix for parameter hints";
|
||||||
|
otherHintsPrefix = mkNullableStrDefault "=> " "prefix for all the other hints (type, chaining)";
|
||||||
|
|
||||||
|
maxLenAlign =
|
||||||
|
mkNullableBoolDefault false
|
||||||
|
"whether to align to the length of the longest line in the file";
|
||||||
|
|
||||||
|
maxLenAlignPadding = mkNullableIntDefault 1 "padding from the left if max_len_align is true";
|
||||||
|
|
||||||
|
rightAlign = mkNullableBoolDefault false "whether to align to the extreme right or not";
|
||||||
|
rightAlignPadding = mkNullableIntDefault 7 "padding from the right if right_align is true";
|
||||||
|
|
||||||
|
highlight = mkNullableStrDefault "Comment" "The color of the hints";
|
||||||
|
};
|
||||||
|
|
||||||
|
hoverActions = {
|
||||||
|
border = mkOption {
|
||||||
|
type = types.nullOr types.anything;
|
||||||
|
default = null;
|
||||||
|
description = ''
|
||||||
|
the border that is used for the hover window. see vim.api.nvim_open_win()
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
maxWidth = mkOption {
|
||||||
|
type = types.nullOr types.int;
|
||||||
|
default = null;
|
||||||
|
description = "Maximal width of the hover window. Nil means no max.";
|
||||||
|
};
|
||||||
|
maxHeight = mkOption {
|
||||||
|
type = types.nullOr types.int;
|
||||||
|
default = null;
|
||||||
|
description = "Maximal height of the hover window. Nil means no max.";
|
||||||
|
};
|
||||||
|
|
||||||
|
autoFocus = mkNullableBoolDefault false "whether the hover action window gets automatically focused";
|
||||||
|
};
|
||||||
|
|
||||||
|
crateGraph = {
|
||||||
|
backend = mkNullableStrDefault "x11" ''
|
||||||
|
Backend used for displaying the graph
|
||||||
|
see: https://graphviz.org/docs/outputs/
|
||||||
|
'';
|
||||||
|
|
||||||
|
output = mkOption {
|
||||||
|
type = types.nullOr types.str;
|
||||||
|
default = null;
|
||||||
|
description = "where to store the output, nil for no output stored";
|
||||||
|
};
|
||||||
|
|
||||||
|
full = mkNullableBoolDefault true ''
|
||||||
|
true for all crates.io and external crates, false only the local crates
|
||||||
|
'';
|
||||||
|
|
||||||
|
enabledGraphvizBackends = mkOption {
|
||||||
|
type = types.nullOr (types.listOf types.str);
|
||||||
|
default = null;
|
||||||
|
description = ''
|
||||||
|
List of backends found on: https://graphviz.org/docs/outputs/
|
||||||
|
Is used for input validation and autocompletion
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
server =
|
||||||
|
{
|
||||||
|
standalone = mkNullableBoolDefault true ''
|
||||||
|
standalone file support
|
||||||
|
setting it to false may improve startup time
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
// (import ../nvim-lsp/rust-analyzer-config.nix lib);
|
||||||
|
};
|
||||||
|
config =
|
||||||
|
let
|
||||||
|
cfg = config.plugins.rust-tools;
|
||||||
|
in
|
||||||
|
mkIf cfg.enable {
|
||||||
|
extraPlugins = with pkgs.vimPlugins; [ nvim-lspconfig cfg.package ];
|
||||||
|
|
||||||
|
plugins.lsp.postConfig =
|
||||||
|
let
|
||||||
|
setupOptions = {
|
||||||
|
tools = {
|
||||||
|
executor =
|
||||||
|
if cfg.executor != null
|
||||||
|
then { __raw = ''require("rust-tools.executors").${cfg.executor}''; }
|
||||||
|
else null;
|
||||||
|
|
||||||
|
on_initialized =
|
||||||
|
if cfg.onIntialized != null
|
||||||
|
then { __raw = cfg.onIntialized; }
|
||||||
|
else null;
|
||||||
|
|
||||||
|
reload_workspace_from_cargo_toml = cfg.reloadWorkspaceFromCargoToml;
|
||||||
|
inlay_hints =
|
||||||
|
let
|
||||||
|
cfgIH = cfg.inlayHints;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
auto = cfgIH.auto;
|
||||||
|
only_current_line = cfgIH.onlyCurrentLine;
|
||||||
|
show_parameter_hints = cfgIH.showParameterHints;
|
||||||
|
parameter_hints_prefix = cfgIH.parameterHintsPrefix;
|
||||||
|
other_hints_prefix = cfgIH.otherHintsPrefix;
|
||||||
|
max_len_align = cfgIH.maxLenAlign;
|
||||||
|
max_len_align_padding = cfgIH.maxLenAlignPadding;
|
||||||
|
right_align = cfgIH.rightAlign;
|
||||||
|
right_align_padding = cfgIH.rightAlignPadding;
|
||||||
|
highlight = cfgIH.highlight;
|
||||||
|
};
|
||||||
|
|
||||||
|
hover_actions =
|
||||||
|
let
|
||||||
|
cfgHA = cfg.hoverActions;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
border = cfgHA.border;
|
||||||
|
max_width = cfgHA.maxWidth;
|
||||||
|
max_height = cfgHA.maxHeight;
|
||||||
|
auto_focus = cfgHA.autoFocus;
|
||||||
|
};
|
||||||
|
|
||||||
|
crate_graph =
|
||||||
|
let
|
||||||
|
cfgCG = cfg.crateGraph;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
backend = cfgCG.backend;
|
||||||
|
output = cfgCG.output;
|
||||||
|
full = cfgCG.full;
|
||||||
|
enabled_graphviz_backends = cfgCG.enabledGraphvizBackends;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
server = {
|
||||||
|
standalone = cfg.server.standalone;
|
||||||
|
settings.rust-analyzer = lib.filterAttrs (n: v: n != "standalone") cfg.server;
|
||||||
|
on_attach = { __raw = "__lspOnAttach"; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
''
|
||||||
|
require('rust-tools').setup(${helpers.toLuaObject setupOptions})
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
|
@ -5,7 +5,7 @@
|
||||||
}:
|
}:
|
||||||
with lib; {
|
with lib; {
|
||||||
options.plugins.treesitter-context = {
|
options.plugins.treesitter-context = {
|
||||||
enable = mkEnableOption "Enable nvim-treesitter-context";
|
enable = mkEnableOption "nvim-treesitter-context";
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
|
|
|
@ -15,7 +15,7 @@ with lib; {
|
||||||
{
|
{
|
||||||
enable =
|
enable =
|
||||||
mkEnableOption
|
mkEnableOption
|
||||||
"Enable treesitter-refactor (requires plugins.treesitter.enable to be true)";
|
"treesitter-refactor (requires plugins.treesitter.enable to be true)";
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
|
@ -39,7 +39,7 @@ with lib; {
|
||||||
};
|
};
|
||||||
highlightCurrentScope = {
|
highlightCurrentScope = {
|
||||||
inherit disable;
|
inherit disable;
|
||||||
enable = mkEnableOption "Highlights the block from the current scope where the cursor is.";
|
enable = mkEnableOption "highlights the block from the current scope where the cursor is.";
|
||||||
};
|
};
|
||||||
smartRename = {
|
smartRename = {
|
||||||
inherit disable;
|
inherit disable;
|
||||||
|
|
|
@ -7,7 +7,7 @@ in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
plugins.treesitter = {
|
plugins.treesitter = {
|
||||||
enable = mkEnableOption "Enable tree-sitter syntax highlighting";
|
enable = mkEnableOption "tree-sitter syntax highlighting";
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
|
@ -66,7 +66,7 @@ in
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
enable = mkEnableOption "Incremental selection based on the named nodes from the grammar";
|
enable = mkEnableOption "incremental selection based on the named nodes from the grammar";
|
||||||
keymaps = {
|
keymaps = {
|
||||||
initSelection = keymap "gnn";
|
initSelection = keymap "gnn";
|
||||||
nodeIncremental = keymap "grn";
|
nodeIncremental = keymap "grn";
|
||||||
|
@ -75,13 +75,13 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
indent = mkEnableOption "Enable tree-sitter based indentation";
|
indent = mkEnableOption "tree-sitter based indentation";
|
||||||
|
|
||||||
folding = mkEnableOption "Enable tree-sitter based folding";
|
folding = mkEnableOption "tree-sitter based folding";
|
||||||
|
|
||||||
grammarPackages = mkOption {
|
grammarPackages = mkOption {
|
||||||
type = with types; listOf package;
|
type = with types; listOf package;
|
||||||
default = pkgs.tree-sitter.allGrammars;
|
default = cfg.package.passthru.allGrammars;
|
||||||
description = "Grammar packages to install";
|
description = "Grammar packages to install";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ in
|
||||||
];
|
];
|
||||||
|
|
||||||
options.plugins.null-ls = {
|
options.plugins.null-ls = {
|
||||||
enable = mkEnableOption "Enable null-ls";
|
enable = mkEnableOption "null-ls";
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
mkServer =
|
mkServer =
|
||||||
{ name
|
{ name
|
||||||
, sourceType
|
, sourceType
|
||||||
, description ? "Enable ${name} source, for null-ls."
|
, description ? "${name} source, for null-ls."
|
||||||
, package ? null
|
, package ? null
|
||||||
, extraPackages ? [ ]
|
, extraPackages ? [ ]
|
||||||
, ...
|
, ...
|
||||||
|
|
|
@ -4,6 +4,9 @@ let
|
||||||
serverData = {
|
serverData = {
|
||||||
code_actions = {
|
code_actions = {
|
||||||
gitsigns = { };
|
gitsigns = { };
|
||||||
|
shellcheck = {
|
||||||
|
package = pkgs.shellcheck;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
completion = { };
|
completion = { };
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
|
@ -13,6 +16,12 @@ let
|
||||||
shellcheck = {
|
shellcheck = {
|
||||||
package = pkgs.shellcheck;
|
package = pkgs.shellcheck;
|
||||||
};
|
};
|
||||||
|
cppcheck = {
|
||||||
|
package = pkgs.cppcheck;
|
||||||
|
};
|
||||||
|
gitlint = {
|
||||||
|
package = pkgs.gitlint;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
formatting = {
|
formatting = {
|
||||||
phpcbf = {
|
phpcbf = {
|
||||||
|
@ -36,6 +45,18 @@ let
|
||||||
fnlfmt = {
|
fnlfmt = {
|
||||||
package = pkgs.fnlfmt;
|
package = pkgs.fnlfmt;
|
||||||
};
|
};
|
||||||
|
stylua = {
|
||||||
|
package = pkgs.stylua;
|
||||||
|
};
|
||||||
|
cbfmt = {
|
||||||
|
package = pkgs.cbfmt;
|
||||||
|
};
|
||||||
|
shfmt = {
|
||||||
|
package = pkgs.shfmt;
|
||||||
|
};
|
||||||
|
taplo = {
|
||||||
|
package = pkgs.taplo;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
# Format the servers to be an array of attrs like the following example
|
# Format the servers to be an array of attrs like the following example
|
||||||
|
|
|
@ -3,6 +3,12 @@ with lib;
|
||||||
let
|
let
|
||||||
helpers = import ./helpers.nix args;
|
helpers = import ./helpers.nix args;
|
||||||
servers = [
|
servers = [
|
||||||
|
{
|
||||||
|
name = "astro";
|
||||||
|
description = "Enable astrols, for Astro";
|
||||||
|
package = pkgs.nodePackages."@astrojs/language-server";
|
||||||
|
cmd = cfg: [ "${cfg.package}/bin/astro-ls" "--stdio" ];
|
||||||
|
}
|
||||||
{
|
{
|
||||||
name = "bashls";
|
name = "bashls";
|
||||||
description = "Enable bashls, for bash.";
|
description = "Enable bashls, for bash.";
|
||||||
|
@ -23,7 +29,7 @@ let
|
||||||
name = "dartls";
|
name = "dartls";
|
||||||
description = "Enable dart language-server, for dart";
|
description = "Enable dart language-server, for dart";
|
||||||
package = pkgs.dart;
|
package = pkgs.dart;
|
||||||
extraOptions = {
|
settingsOptions = {
|
||||||
analysisExcludedFolders = mkOption {
|
analysisExcludedFolders = mkOption {
|
||||||
type = types.nullOr (types.listOf types.str);
|
type = types.nullOr (types.listOf types.str);
|
||||||
default = null;
|
default = null;
|
||||||
|
@ -152,7 +158,7 @@ let
|
||||||
name = "nil_ls";
|
name = "nil_ls";
|
||||||
description = "Enable nil, for Nix";
|
description = "Enable nil, for Nix";
|
||||||
package = pkgs.nil;
|
package = pkgs.nil;
|
||||||
extraOptions = {
|
settingsOptions = {
|
||||||
formatting.command = mkOption {
|
formatting.command = mkOption {
|
||||||
type = types.nullOr (types.listOf types.str);
|
type = types.nullOr (types.listOf types.str);
|
||||||
default = null;
|
default = null;
|
||||||
|
@ -197,6 +203,9 @@ let
|
||||||
name = "rust-analyzer";
|
name = "rust-analyzer";
|
||||||
description = "Enable rust-analyzer, for Rust.";
|
description = "Enable rust-analyzer, for Rust.";
|
||||||
serverName = "rust_analyzer";
|
serverName = "rust_analyzer";
|
||||||
|
|
||||||
|
settingsOptions = import ./rust-analyzer-config.nix lib;
|
||||||
|
settings = cfg: { rust-analyzer = cfg; };
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "sumneko-lua";
|
name = "sumneko-lua";
|
||||||
|
|
|
@ -11,7 +11,7 @@ in
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
plugins.lsp = {
|
plugins.lsp = {
|
||||||
enable = mkEnableOption "Enable neovim's built-in LSP";
|
enable = mkEnableOption "neovim's built-in LSP";
|
||||||
|
|
||||||
enabledServers = mkOption {
|
enabledServers = mkOption {
|
||||||
type = with types; listOf (oneOf [
|
type = with types; listOf (oneOf [
|
||||||
|
@ -51,6 +51,12 @@ in
|
||||||
description = "Code to be run before loading the LSP. Useful for requiring plugins";
|
description = "Code to be run before loading the LSP. Useful for requiring plugins";
|
||||||
default = "";
|
default = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
postConfig = mkOption {
|
||||||
|
type = types.lines;
|
||||||
|
description = "Code to be run after loading the LSP. This is an internal option";
|
||||||
|
default = "";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -92,6 +98,8 @@ in
|
||||||
require('lspconfig')[server.name].setup(options)
|
require('lspconfig')[server.name].setup(options)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
${cfg.postConfig}
|
||||||
end
|
end
|
||||||
-- }}}
|
-- }}}
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
, extraPackages ? { }
|
, extraPackages ? { }
|
||||||
, cmd ? (cfg: null)
|
, cmd ? (cfg: null)
|
||||||
, settings ? (cfg: { })
|
, settings ? (cfg: { })
|
||||||
, extraOptions ? { }
|
, settingsOptions ? { }
|
||||||
, ...
|
, ...
|
||||||
}:
|
}:
|
||||||
# returns a module
|
# returns a module
|
||||||
|
@ -30,7 +30,8 @@
|
||||||
options = {
|
options = {
|
||||||
plugins.lsp.servers.${name} = {
|
plugins.lsp.servers.${name} = {
|
||||||
enable = mkEnableOption description;
|
enable = mkEnableOption description;
|
||||||
} // packageOption // extraOptions;
|
settings = settingsOptions;
|
||||||
|
} // packageOption;
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable
|
config = mkIf cfg.enable
|
||||||
|
@ -42,7 +43,7 @@
|
||||||
name = serverName;
|
name = serverName;
|
||||||
extraOptions = {
|
extraOptions = {
|
||||||
cmd = cmd cfg;
|
cmd = cmd cfg;
|
||||||
settings = settings cfg;
|
settings = settings cfg.settings;
|
||||||
};
|
};
|
||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
|
|
|
@ -7,7 +7,7 @@ in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
plugins.lspsaga = {
|
plugins.lspsaga = {
|
||||||
enable = mkEnableOption "Enable lspsava.nvim";
|
enable = mkEnableOption "lspsaga.nvim";
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
|
@ -111,13 +111,15 @@ in
|
||||||
description = "Maximum finder preview lines";
|
description = "Maximum finder preview lines";
|
||||||
};
|
};
|
||||||
|
|
||||||
keys = let
|
keys =
|
||||||
|
let
|
||||||
defaultKeyOpt = desc: mkOption {
|
defaultKeyOpt = desc: mkOption {
|
||||||
description = desc;
|
description = desc;
|
||||||
type = types.nullOr types.str;
|
type = types.nullOr types.str;
|
||||||
default = null;
|
default = null;
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
finderAction = {
|
finderAction = {
|
||||||
open = defaultKeyOpt "Open from finder";
|
open = defaultKeyOpt "Open from finder";
|
||||||
vsplit = defaultKeyOpt "Vertical split in finder";
|
vsplit = defaultKeyOpt "Vertical split in finder";
|
||||||
|
@ -147,9 +149,10 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = let
|
config =
|
||||||
|
let
|
||||||
notDefault = default: opt: if (opt != default) then opt else null;
|
notDefault = default: opt: if (opt != default) then opt else null;
|
||||||
notEmpty = opt: if ((filterAttrs (_: v: v != null) opt) != {}) then opt else null;
|
notEmpty = opt: if ((filterAttrs (_: v: v != null) opt) != { }) then opt else null;
|
||||||
notNull = opt: opt;
|
notNull = opt: opt;
|
||||||
lspsagaConfig = {
|
lspsagaConfig = {
|
||||||
use_saga_diagnostic_sign = notDefault true cfg.signs.use;
|
use_saga_diagnostic_sign = notDefault true cfg.signs.use;
|
||||||
|
@ -175,14 +178,18 @@ in
|
||||||
|
|
||||||
rename_prompt_prefix = notNull cfg.renamePromptPrefix;
|
rename_prompt_prefix = notNull cfg.renamePromptPrefix;
|
||||||
|
|
||||||
border_style = let
|
border_style =
|
||||||
borderStyle = if cfg.borderStyle == "thin" then 1
|
let
|
||||||
|
borderStyle =
|
||||||
|
if cfg.borderStyle == "thin" then 1
|
||||||
else if cfg.borderStyle == "rounded" then 2
|
else if cfg.borderStyle == "rounded" then 2
|
||||||
else if cfg.borderStyle == "thick" then 3
|
else if cfg.borderStyle == "thick" then 3
|
||||||
else null;
|
else null;
|
||||||
in borderStyle;
|
in
|
||||||
|
borderStyle;
|
||||||
|
|
||||||
finder_action_keys = let
|
finder_action_keys =
|
||||||
|
let
|
||||||
keys = {
|
keys = {
|
||||||
open = notNull cfg.keys.finderAction.open;
|
open = notNull cfg.keys.finderAction.open;
|
||||||
vsplit = notNull cfg.keys.finderAction.vsplit;
|
vsplit = notNull cfg.keys.finderAction.vsplit;
|
||||||
|
@ -191,16 +198,21 @@ in
|
||||||
scroll_down = notNull cfg.keys.finderAction.scrollDown;
|
scroll_down = notNull cfg.keys.finderAction.scrollDown;
|
||||||
scroll_up = notNull cfg.keys.finderAction.scrollUp;
|
scroll_up = notNull cfg.keys.finderAction.scrollUp;
|
||||||
};
|
};
|
||||||
in notEmpty keys;
|
in
|
||||||
|
notEmpty keys;
|
||||||
|
|
||||||
code_action_keys = let
|
code_action_keys =
|
||||||
|
let
|
||||||
keys = {
|
keys = {
|
||||||
quit = notNull cfg.keys.codeAction.quit;
|
quit = notNull cfg.keys.codeAction.quit;
|
||||||
exec = notNull cfg.keys.codeAction.exec;
|
exec = notNull cfg.keys.codeAction.exec;
|
||||||
};
|
};
|
||||||
in notEmpty keys;
|
in
|
||||||
|
notEmpty keys;
|
||||||
};
|
};
|
||||||
in mkIf cfg.enable {
|
in
|
||||||
|
mkIf cfg.enable {
|
||||||
|
|
||||||
extraPlugins = [ cfg.package ];
|
extraPlugins = [ cfg.package ];
|
||||||
|
|
||||||
extraConfigLua = ''
|
extraConfigLua = ''
|
||||||
|
|
95
plugins/nvim-lsp/nvim-lightbulb.nix
Normal file
95
plugins/nvim-lsp/nvim-lightbulb.nix
Normal file
|
@ -0,0 +1,95 @@
|
||||||
|
{ pkgs
|
||||||
|
, lib
|
||||||
|
, config
|
||||||
|
, ...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
helpers = import ../helpers.nix { inherit lib; };
|
||||||
|
in
|
||||||
|
with lib; {
|
||||||
|
options.plugins.nvim-lightbulb = {
|
||||||
|
enable = mkEnableOption "nvim-lightbulb, showing available code actions";
|
||||||
|
|
||||||
|
package = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = pkgs.vimPlugins.nvim-lightbulb;
|
||||||
|
description = "Plugin to use for nvim-lightbulb";
|
||||||
|
};
|
||||||
|
|
||||||
|
ignore = helpers.defaultNullOpts.mkNullable (types.listOf types.str) "[]" ''
|
||||||
|
LSP client names to ignore
|
||||||
|
'';
|
||||||
|
|
||||||
|
sign = {
|
||||||
|
enabled = helpers.defaultNullOpts.mkBool true "";
|
||||||
|
priority = helpers.defaultNullOpts.mkInt 10 "";
|
||||||
|
};
|
||||||
|
|
||||||
|
float = {
|
||||||
|
enabled = helpers.defaultNullOpts.mkBool false "";
|
||||||
|
|
||||||
|
text = helpers.defaultNullOpts.mkStr "💡" "Text to show in the popup float";
|
||||||
|
|
||||||
|
winOpts = helpers.defaultNullOpts.mkNullable (types.attrsOf types.anything) "{}" ''
|
||||||
|
Options for the floating window (see |vim.lsp.util.open_floating_preview| for more information)
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
virtualText = {
|
||||||
|
enabled = helpers.defaultNullOpts.mkBool false "";
|
||||||
|
|
||||||
|
text = helpers.defaultNullOpts.mkStr "💡" "Text to show at virtual text";
|
||||||
|
|
||||||
|
hlMode = helpers.defaultNullOpts.mkStr "replace" ''
|
||||||
|
highlight mode to use for virtual text (replace, combine, blend), see
|
||||||
|
:help nvim_buf_set_extmark() for reference
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
statusText = {
|
||||||
|
enabled = helpers.defaultNullOpts.mkBool false "";
|
||||||
|
|
||||||
|
text = helpers.defaultNullOpts.mkStr "💡" "Text to provide when code actions are available";
|
||||||
|
|
||||||
|
textUnavailable = helpers.defaultNullOpts.mkStr "" ''
|
||||||
|
Text to provide when no actions are available
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
autocmd = {
|
||||||
|
enabled = helpers.defaultNullOpts.mkBool false "";
|
||||||
|
|
||||||
|
pattern = helpers.defaultNullOpts.mkNullable (types.listOf types.str) ''["*"]'' "";
|
||||||
|
|
||||||
|
events =
|
||||||
|
helpers.defaultNullOpts.mkNullable (types.listOf types.str)
|
||||||
|
''["CursorHold" "CursorHoldI"]'' "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config =
|
||||||
|
let
|
||||||
|
cfg = config.plugins.nvim-lightbulb;
|
||||||
|
setupOptions = {
|
||||||
|
inherit (cfg) ignore sign autocmd;
|
||||||
|
float = {
|
||||||
|
inherit (cfg.float) enabled text;
|
||||||
|
win_opts = cfg.float.winOpts;
|
||||||
|
};
|
||||||
|
virtual_text = {
|
||||||
|
inherit (cfg.virtualText) enabled text;
|
||||||
|
hl_mode = cfg.virtualText.hlMode;
|
||||||
|
};
|
||||||
|
status_text = {
|
||||||
|
inherit (cfg.statusText) enabled text;
|
||||||
|
text_unavailable = cfg.statusText.textUnavailable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
mkIf cfg.enable {
|
||||||
|
extraPlugins = [ cfg.package ];
|
||||||
|
extraConfigLua = ''
|
||||||
|
require("nvim-lightbulb").setup(${helpers.toLuaObject setupOptions})
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
1560
plugins/nvim-lsp/rust-analyzer-config.nix
Normal file
1560
plugins/nvim-lsp/rust-analyzer-config.nix
Normal file
File diff suppressed because it is too large
Load diff
13
plugins/nvim-lsp/update_ra.md
Normal file
13
plugins/nvim-lsp/update_ra.md
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# Updating rust-analyzer options
|
||||||
|
|
||||||
|
Because there a large number of rust-analyzer options it's difficult to handle them by hand.
|
||||||
|
|
||||||
|
The options can be fetched from the [rust-analyzer package.json](https://github.com/rust-lang/rust-analyzer/blob/master/editors/code/package.json).
|
||||||
|
|
||||||
|
There is a derivation on the top-level flake that allows to build it easily, you just have to run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
nix build .#rustAnalyzerOptions
|
||||||
|
```
|
||||||
|
|
||||||
|
You can then copy the `result/share/rust-analyzer-config.nix` to the correct location.
|
|
@ -7,7 +7,7 @@ in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
plugins.packer = {
|
plugins.packer = {
|
||||||
enable = mkEnableOption "Enable packer.nvim";
|
enable = mkEnableOption "packer.nvim";
|
||||||
|
|
||||||
plugins = mkOption {
|
plugins = mkOption {
|
||||||
type = types.listOf (types.oneOf [
|
type = types.listOf (types.oneOf [
|
||||||
|
|
|
@ -14,7 +14,7 @@ in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
plugins.airline = {
|
plugins.airline = {
|
||||||
enable = mkEnableOption "Enable airline";
|
enable = mkEnableOption "airline";
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
|
|
|
@ -7,7 +7,7 @@ in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
plugins.lightline = {
|
plugins.lightline = {
|
||||||
enable = mkEnableOption "Enable lightline";
|
enable = mkEnableOption "lightline";
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
|
|
|
@ -56,7 +56,7 @@ in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
plugins.lualine = {
|
plugins.lualine = {
|
||||||
enable = mkEnableOption "Enable lualine";
|
enable = mkEnableOption "lualine";
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
|
|
|
@ -16,7 +16,7 @@ in
|
||||||
# TODO:add support for aditional filetypes. This requires autocommands!
|
# TODO:add support for aditional filetypes. This requires autocommands!
|
||||||
|
|
||||||
options.plugins.telescope = {
|
options.plugins.telescope = {
|
||||||
enable = mkEnableOption "Enable telescope.nvim";
|
enable = mkEnableOption "telescope.nvim";
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
|
@ -68,12 +68,14 @@ in
|
||||||
let $BAT_THEME = '${cfg.highlightTheme}'
|
let $BAT_THEME = '${cfg.highlightTheme}'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
extraConfigLua = let
|
extraConfigLua =
|
||||||
|
let
|
||||||
options = {
|
options = {
|
||||||
extensions = cfg.extensionConfig;
|
extensions = cfg.extensionConfig;
|
||||||
defaults = cfg.defaults;
|
defaults = cfg.defaults;
|
||||||
} // cfg.extraOptions;
|
} // cfg.extraOptions;
|
||||||
in ''
|
in
|
||||||
|
''
|
||||||
do
|
do
|
||||||
local __telescopeExtensions = ${helpers.toLuaObject cfg.enabledExtensions}
|
local __telescopeExtensions = ${helpers.toLuaObject cfg.enabledExtensions}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.plugins.telescope.extensions.frecency = {
|
options.plugins.telescope.extensions.frecency = {
|
||||||
enable = mkEnableOption "Enable frecency";
|
enable = mkEnableOption "frecency";
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
|
@ -50,7 +50,8 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = let
|
config =
|
||||||
|
let
|
||||||
configuration = {
|
configuration = {
|
||||||
db_root = cfg.dbRoot;
|
db_root = cfg.dbRoot;
|
||||||
default_workspace = cfg.defaultWorkspace;
|
default_workspace = cfg.defaultWorkspace;
|
||||||
|
@ -60,7 +61,8 @@ in
|
||||||
show_unindexed = cfg.showUnindexed;
|
show_unindexed = cfg.showUnindexed;
|
||||||
devicons_disabled = cfg.deviconsDisabled;
|
devicons_disabled = cfg.deviconsDisabled;
|
||||||
};
|
};
|
||||||
in mkIf cfg.enable {
|
in
|
||||||
|
mkIf cfg.enable {
|
||||||
extraPackages = [ pkgs.sqlite ];
|
extraPackages = [ pkgs.sqlite ];
|
||||||
extraPlugins = with pkgs.vimPlugins; [
|
extraPlugins = with pkgs.vimPlugins; [
|
||||||
cfg.package
|
cfg.package
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
{ pkgs, config, lib, ...}:
|
{ pkgs, config, lib, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.plugins.telescope.extensions.project-nvim;
|
cfg = config.plugins.telescope.extensions.project-nvim;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.plugins.telescope.extensions.project-nvim = {
|
options.plugins.telescope.extensions.project-nvim = {
|
||||||
enable = mkEnableOption "Enable project-nvim telescope extension";
|
enable = mkEnableOption "project-nvim telescope extension";
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ in
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
plugins.commentary = {
|
plugins.commentary = {
|
||||||
enable = mkEnableOption "Enable commentary";
|
enable = mkEnableOption "commentary";
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
|
|
|
@ -8,7 +8,7 @@ in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
plugins.dashboard = {
|
plugins.dashboard = {
|
||||||
enable = mkEnableOption "Enable dashboard";
|
enable = mkEnableOption "dashboard";
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
|
|
|
@ -7,7 +7,7 @@ in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
plugins.floaterm = {
|
plugins.floaterm = {
|
||||||
enable = mkEnableOption "Enable floaterm";
|
enable = mkEnableOption "floaterm";
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.plugins.comment-nvim;
|
cfg = config.plugins.intellitab;
|
||||||
defs = import ../plugin-defs.nix { inherit pkgs; };
|
defs = import ../plugin-defs.nix { inherit pkgs; };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
|
@ -8,7 +8,7 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.plugins.mark-radar = {
|
options.plugins.mark-radar = {
|
||||||
enable = mkEnableOption "Enable mark-radar";
|
enable = mkEnableOption "mark-radar";
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
|
|
|
@ -10,7 +10,7 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.plugins.notify = {
|
options.plugins.notify = {
|
||||||
enable = mkEnableOption "Enable notify";
|
enable = mkEnableOption "notify";
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
|
|
|
@ -6,7 +6,7 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.plugins.nvim-autopairs = {
|
options.plugins.nvim-autopairs = {
|
||||||
enable = mkEnableOption "Enable nvim-autopairs";
|
enable = mkEnableOption "nvim-autopairs";
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
|
|
161
plugins/utils/nvim-colorizer.nix
Normal file
161
plugins/utils/nvim-colorizer.nix
Normal file
|
@ -0,0 +1,161 @@
|
||||||
|
{ pkgs, config, lib, ... }:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
|
||||||
|
cfg = config.plugins.nvim-colorizer;
|
||||||
|
helpers = import ../helpers.nix { inherit lib; };
|
||||||
|
|
||||||
|
colorizer-options = {
|
||||||
|
RGB = mkOption {
|
||||||
|
description = "#RGB hex codes";
|
||||||
|
type = types.nullOr types.bool;
|
||||||
|
default = null;
|
||||||
|
};
|
||||||
|
RRGGBB = mkOption {
|
||||||
|
description = "#RRGGBB hex codes";
|
||||||
|
type = types.nullOr types.bool;
|
||||||
|
default = null;
|
||||||
|
};
|
||||||
|
names = mkOption {
|
||||||
|
description = "\"Name\" codes like Blue or blue";
|
||||||
|
type = types.nullOr types.bool;
|
||||||
|
default = null;
|
||||||
|
};
|
||||||
|
RRGGBBAA = mkOption {
|
||||||
|
description = "#RRGGBBAA hex codes";
|
||||||
|
type = types.nullOr types.bool;
|
||||||
|
default = null;
|
||||||
|
};
|
||||||
|
AARRGGBB = mkOption {
|
||||||
|
description = "0xAARRGGBB hex codes";
|
||||||
|
type = types.nullOr types.bool;
|
||||||
|
default = null;
|
||||||
|
};
|
||||||
|
rgb_fn = mkOption {
|
||||||
|
description = "CSS rgb() and rgba() functions";
|
||||||
|
type = types.nullOr types.bool;
|
||||||
|
default = null;
|
||||||
|
};
|
||||||
|
hsl_fn = mkOption {
|
||||||
|
description = "CSS hsl() and hsla() functions";
|
||||||
|
type = types.nullOr types.bool;
|
||||||
|
default = null;
|
||||||
|
};
|
||||||
|
css = mkOption {
|
||||||
|
description = "Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB";
|
||||||
|
type = types.nullOr types.bool;
|
||||||
|
default = null;
|
||||||
|
};
|
||||||
|
css_fn = mkOption {
|
||||||
|
description = "Enable all CSS *functions*: rgb_fn, hsl_fn";
|
||||||
|
type = types.nullOr types.bool;
|
||||||
|
default = null;
|
||||||
|
};
|
||||||
|
mode = mkOption {
|
||||||
|
description = "Set the display mode";
|
||||||
|
type = types.nullOr (types.enum [ "foreground" "background" "virtualtext" ]);
|
||||||
|
default = null;
|
||||||
|
};
|
||||||
|
tailwind = mkOption {
|
||||||
|
description = "Enable tailwind colors";
|
||||||
|
type = types.nullOr (
|
||||||
|
types.oneOf [
|
||||||
|
types.bool
|
||||||
|
(types.enum [ "normal" "lsp" "both" ])
|
||||||
|
]
|
||||||
|
);
|
||||||
|
default = null;
|
||||||
|
};
|
||||||
|
sass = {
|
||||||
|
enable = mkOption {
|
||||||
|
description = "Enable sass colors";
|
||||||
|
type = types.nullOr types.bool;
|
||||||
|
default = null;
|
||||||
|
};
|
||||||
|
parsers = mkOption {
|
||||||
|
description = "sass parsers settings";
|
||||||
|
type = types.nullOr types.attrs;
|
||||||
|
default = null;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
virtualtext = mkOption {
|
||||||
|
description = "Set the virtualtext character (only used when mode is set to 'virtualtext')";
|
||||||
|
type = types.nullOr types.str;
|
||||||
|
default = null;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
plugins.nvim-colorizer = {
|
||||||
|
|
||||||
|
enable = mkEnableOption "nvim-colorizer";
|
||||||
|
|
||||||
|
package = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = pkgs.vimPlugins.nvim-colorizer-lua;
|
||||||
|
description = "Plugin to use for vim-commentary";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileTypes = mkOption {
|
||||||
|
description = "Enable and/or configure highlighting for certain filetypes";
|
||||||
|
type = types.nullOr (
|
||||||
|
types.listOf (types.oneOf [
|
||||||
|
types.str
|
||||||
|
(types.submodule {
|
||||||
|
options = {
|
||||||
|
language = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
};
|
||||||
|
} // colorizer-options;
|
||||||
|
})
|
||||||
|
])
|
||||||
|
);
|
||||||
|
default = null;
|
||||||
|
};
|
||||||
|
|
||||||
|
userDefaultOptions = mkOption {
|
||||||
|
description = "Default options";
|
||||||
|
type = types.nullOr (types.submodule {
|
||||||
|
options = colorizer-options;
|
||||||
|
});
|
||||||
|
default = null;
|
||||||
|
};
|
||||||
|
|
||||||
|
bufTypes = mkOption {
|
||||||
|
description = "Buftype value is fetched by vim.bo.buftype";
|
||||||
|
type = types.nullOr (types.listOf types.str);
|
||||||
|
default = null;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
extraPlugins = [ cfg.package ];
|
||||||
|
|
||||||
|
extraConfigLua = let
|
||||||
|
|
||||||
|
filetypes = if (cfg.fileTypes != null)
|
||||||
|
then (
|
||||||
|
let
|
||||||
|
list = map (
|
||||||
|
v: if builtins.isAttrs v
|
||||||
|
then v.language + " = " + helpers.toLuaObject (builtins.removeAttrs v [ "language" ])
|
||||||
|
else "'${v}'"
|
||||||
|
) cfg.fileTypes;
|
||||||
|
in "{" + (concatStringsSep "," list) + "}"
|
||||||
|
)
|
||||||
|
else
|
||||||
|
"nil"
|
||||||
|
;
|
||||||
|
|
||||||
|
in ''
|
||||||
|
require("colorizer").setup({
|
||||||
|
filetypes = ${filetypes},
|
||||||
|
user_default_options = ${helpers.toLuaObject cfg.userDefaultOptions},
|
||||||
|
buftypes = ${helpers.toLuaObject cfg.bufTypes},
|
||||||
|
})
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
|
@ -19,7 +19,7 @@ in
|
||||||
];
|
];
|
||||||
|
|
||||||
options.plugins.nvim-tree = {
|
options.plugins.nvim-tree = {
|
||||||
enable = mkEnableOption "Enable nvim-tree";
|
enable = mkEnableOption "nvim-tree";
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
|
@ -234,7 +234,6 @@ in
|
||||||
hijack_netrw = cfg.hijackNetrw;
|
hijack_netrw = cfg.hijackNetrw;
|
||||||
open_on_setup = cfg.openOnSetup;
|
open_on_setup = cfg.openOnSetup;
|
||||||
ignore_ft_on_setup = cfg.ignoreFtOnSetup;
|
ignore_ft_on_setup = cfg.ignoreFtOnSetup;
|
||||||
auto_close = cfg.autoClose;
|
|
||||||
open_on_tab = cfg.openOnTab;
|
open_on_tab = cfg.openOnTab;
|
||||||
hijack_cursor = cfg.hijackCursor;
|
hijack_cursor = cfg.hijackCursor;
|
||||||
sync_root_with_cwd = cfg.syncRootWithCwd;
|
sync_root_with_cwd = cfg.syncRootWithCwd;
|
||||||
|
@ -278,6 +277,14 @@ in
|
||||||
nvim-web-devicons
|
nvim-web-devicons
|
||||||
];
|
];
|
||||||
|
|
||||||
|
autoCmd = mkIf (cfg.autoClose != null && cfg.autoClose) [
|
||||||
|
{
|
||||||
|
event = "BufEnter";
|
||||||
|
command = "if winnr('$') == 1 && bufname() == 'NvimTree_' . tabpagenr() | quit | endif";
|
||||||
|
nested = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
extraConfigLua = ''
|
extraConfigLua = ''
|
||||||
require('nvim-tree').setup(${helpers.toLuaObject options})
|
require('nvim-tree').setup(${helpers.toLuaObject options})
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -6,7 +6,7 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.plugins.project-nvim = helpers.extraOptionsOptions // {
|
options.plugins.project-nvim = helpers.extraOptionsOptions // {
|
||||||
enable = mkEnableOption "Enable project.nvim";
|
enable = mkEnableOption "project.nvim";
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
|
|
|
@ -6,7 +6,7 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.plugins.specs = {
|
options.plugins.specs = {
|
||||||
enable = mkEnableOption "Enable specs-nvim";
|
enable = mkEnableOption "specs-nvim";
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
|
|
|
@ -182,7 +182,7 @@ mkPlugin args {
|
||||||
|
|
||||||
customHeader = mkDefaultOpt {
|
customHeader = mkDefaultOpt {
|
||||||
description = "Define your own header";
|
description = "Define your own header";
|
||||||
global = "startify_custom_headers";
|
global = "startify_custom_header";
|
||||||
type = types.oneOf [ types.str (types.listOf types.str) ];
|
type = types.oneOf [ types.str (types.listOf types.str) ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
76
tests/flake.lock
generated
76
tests/flake.lock
generated
|
@ -10,11 +10,11 @@
|
||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1667262410,
|
"lastModified": 1669854260,
|
||||||
"narHash": "sha256-yqqvPvazG/Ci3WpIfPb+o+i2cNuyAYYY19lwJGCmUao=",
|
"narHash": "sha256-Z8NAL3g4i5LAhxveNGJhrVDHxIBbUf1lVIy/Thr2RMU=",
|
||||||
"owner": "lovesegfault",
|
"owner": "lovesegfault",
|
||||||
"repo": "beautysh",
|
"repo": "beautysh",
|
||||||
"rev": "a1fdaff999db2dfc5032914630f5052360f4b432",
|
"rev": "d616eb8d9d05ee4fb33de9c5521d99c3f0695d52",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -33,11 +33,11 @@
|
||||||
"utils": "utils_2"
|
"utils": "utils_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1667262410,
|
"lastModified": 1669854260,
|
||||||
"narHash": "sha256-yqqvPvazG/Ci3WpIfPb+o+i2cNuyAYYY19lwJGCmUao=",
|
"narHash": "sha256-Z8NAL3g4i5LAhxveNGJhrVDHxIBbUf1lVIy/Thr2RMU=",
|
||||||
"owner": "lovesegfault",
|
"owner": "lovesegfault",
|
||||||
"repo": "beautysh",
|
"repo": "beautysh",
|
||||||
"rev": "a1fdaff999db2dfc5032914630f5052360f4b432",
|
"rev": "d616eb8d9d05ee4fb33de9c5521d99c3f0695d52",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -128,11 +128,11 @@
|
||||||
"gleam": {
|
"gleam": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1669665314,
|
"lastModified": 1672454845,
|
||||||
"narHash": "sha256-aeho84P91cH13j7uLJwyD/zj8O/peROrpfa41HA/FGo=",
|
"narHash": "sha256-h/5SpMD725BasD2+5J0B7OCDzoWlDBGDm7ywTEYmQbk=",
|
||||||
"owner": "gleam-lang",
|
"owner": "gleam-lang",
|
||||||
"repo": "tree-sitter-gleam",
|
"repo": "tree-sitter-gleam",
|
||||||
"rev": "97611918f79643ade377a156f3e4192cd50dc3e6",
|
"rev": "3eb2e1783f3bf6f85c16cdd150e2f256b2f6844e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -143,12 +143,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1663491030,
|
"lastModified": 1671108576,
|
||||||
"narHash": "sha256-MVsfBhE9US5DvLtBAaTRjwYdv1tLO8xjahM8qLXTgTo=",
|
"narHash": "sha256-6ggOL6KoaELNA1562tnPjtAnQ9SwsKRTgeuaXvPzCwI=",
|
||||||
"owner": "NixOS",
|
"path": "/nix/store/iscn1qzhdwvb3mkr5kvsy9gvyhkdnzl3-source",
|
||||||
"repo": "nixpkgs",
|
"rev": "0f5996b524c91677891a432cc99c7567c7c402b1",
|
||||||
"rev": "767542707d394ff15ac1981e903e005ba69528b5",
|
"type": "path"
|
||||||
"type": "github"
|
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"id": "nixpkgs",
|
"id": "nixpkgs",
|
||||||
|
@ -157,11 +156,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-stable": {
|
"nixpkgs-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1669546925,
|
"lastModified": 1672580127,
|
||||||
"narHash": "sha256-Gvtk9agz88tBgqmCdHl5U7gYttTkiuEd8/Rq1Im0pTg=",
|
"narHash": "sha256-3lW3xZslREhJogoOkjeZtlBtvFMyxHku7I/9IVehhT8=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "fecf05d4861f3985e8dee73f08bc82668ef75125",
|
"rev": "0874168639713f547c05947c76124f78441ea46c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -173,12 +172,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1663491030,
|
"lastModified": 1671108576,
|
||||||
"narHash": "sha256-MVsfBhE9US5DvLtBAaTRjwYdv1tLO8xjahM8qLXTgTo=",
|
"narHash": "sha256-6ggOL6KoaELNA1562tnPjtAnQ9SwsKRTgeuaXvPzCwI=",
|
||||||
"owner": "NixOS",
|
"path": "/nix/store/iscn1qzhdwvb3mkr5kvsy9gvyhkdnzl3-source",
|
||||||
"repo": "nixpkgs",
|
"rev": "0f5996b524c91677891a432cc99c7567c7c402b1",
|
||||||
"rev": "767542707d394ff15ac1981e903e005ba69528b5",
|
"type": "path"
|
||||||
"type": "github"
|
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"id": "nixpkgs",
|
"id": "nixpkgs",
|
||||||
|
@ -187,11 +185,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1663491030,
|
"lastModified": 1673606088,
|
||||||
"narHash": "sha256-MVsfBhE9US5DvLtBAaTRjwYdv1tLO8xjahM8qLXTgTo=",
|
"narHash": "sha256-wdYD41UwNwPhTdMaG0AIe7fE1bAdyHe6bB4HLUqUvck=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "767542707d394ff15ac1981e903e005ba69528b5",
|
"rev": "37b97ae3dd714de9a17923d004a2c5b5543dfa6d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -207,12 +205,12 @@
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 0,
|
"lastModified": 0,
|
||||||
"narHash": "sha256-008LHsZ1x6jTE46J4+E2jOQTAyexpf7M9fNqSsjQOds=",
|
"narHash": "sha256-7N6OttwH7E7URRmQ79MacpMu4eSzxYlRgW06FOP/lWg=",
|
||||||
"path": "/nix/store/nj5i7q1lcsw9fzch5kha51li3c8w12h6-source",
|
"path": "/nix/store/s8ql6s1cwxm1ah1pi4y6h4xv2mz2j4v1-source",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"path": "/nix/store/nj5i7q1lcsw9fzch5kha51li3c8w12h6-source",
|
"path": "/nix/store/s8ql6s1cwxm1ah1pi4y6h4xv2mz2j4v1-source",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -226,12 +224,12 @@
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 0,
|
"lastModified": 0,
|
||||||
"narHash": "sha256-008LHsZ1x6jTE46J4+E2jOQTAyexpf7M9fNqSsjQOds=",
|
"narHash": "sha256-7N6OttwH7E7URRmQ79MacpMu4eSzxYlRgW06FOP/lWg=",
|
||||||
"path": "/nix/store/nj5i7q1lcsw9fzch5kha51li3c8w12h6-source",
|
"path": "/nix/store/s8ql6s1cwxm1ah1pi4y6h4xv2mz2j4v1-source",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"path": "/nix/store/nj5i7q1lcsw9fzch5kha51li3c8w12h6-source",
|
"path": "/nix/store/s8ql6s1cwxm1ah1pi4y6h4xv2mz2j4v1-source",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -302,11 +300,11 @@
|
||||||
},
|
},
|
||||||
"utils": {
|
"utils": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1667077288,
|
"lastModified": 1667395993,
|
||||||
"narHash": "sha256-bdC8sFNDpT0HK74u9fUkpbf1MEzVYJ+ka7NXCdgBoaA=",
|
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "6ee9ebb6b1ee695d2cacc4faa053a7b9baa76817",
|
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -317,11 +315,11 @@
|
||||||
},
|
},
|
||||||
"utils_2": {
|
"utils_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1667077288,
|
"lastModified": 1667395993,
|
||||||
"narHash": "sha256-bdC8sFNDpT0HK74u9fUkpbf1MEzVYJ+ka7NXCdgBoaA=",
|
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "6ee9ebb6b1ee695d2cacc4faa053a7b9baa76817",
|
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue