mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 16:39:00 +02:00
plugins/godot: init
This commit is contained in:
parent
84d7453e44
commit
c826d146c6
3 changed files with 62 additions and 0 deletions
|
@ -50,6 +50,7 @@
|
||||||
|
|
||||||
./languages/clangd-extensions.nix
|
./languages/clangd-extensions.nix
|
||||||
./languages/debugprint.nix
|
./languages/debugprint.nix
|
||||||
|
./languages/godot.nix
|
||||||
./languages/haskell-scope-highlighting.nix
|
./languages/haskell-scope-highlighting.nix
|
||||||
./languages/helm.nix
|
./languages/helm.nix
|
||||||
./languages/julia/julia-cell.nix
|
./languages/julia/julia-cell.nix
|
||||||
|
|
44
plugins/languages/godot.nix
Normal file
44
plugins/languages/godot.nix
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
helpers,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
helpers.vim-plugin.mkVimPlugin config {
|
||||||
|
name = "godot";
|
||||||
|
originalName = "vim-godot";
|
||||||
|
defaultPackage = pkgs.vimPlugins.vim-godot;
|
||||||
|
globalPrefix = "godot_";
|
||||||
|
|
||||||
|
maintainers = [maintainers.GaetanLepage];
|
||||||
|
|
||||||
|
extraOptions = {
|
||||||
|
godotPackage = mkOption {
|
||||||
|
type = with types; nullOr package;
|
||||||
|
default = pkgs.godot_4;
|
||||||
|
description = ''
|
||||||
|
Which package to use for `godot`.
|
||||||
|
Set to `null` to prevent the installation.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
settingsOptions = {
|
||||||
|
executable = helpers.defaultNullOpts.mkStr "godot" ''
|
||||||
|
Path to the `godot` executable.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
executable = "godot";
|
||||||
|
};
|
||||||
|
|
||||||
|
extraConfig = cfg: {
|
||||||
|
extraPackages =
|
||||||
|
optional
|
||||||
|
(cfg.godotPackage != null)
|
||||||
|
cfg.godotPackage;
|
||||||
|
};
|
||||||
|
}
|
17
tests/test-sources/plugins/languages/godot.nix
Normal file
17
tests/test-sources/plugins/languages/godot.nix
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
empty = {
|
||||||
|
# Godot is only available on Linux
|
||||||
|
plugins.godot.enable = pkgs.stdenv.isLinux;
|
||||||
|
};
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
plugins.godot = {
|
||||||
|
# Godot is only available on Linux
|
||||||
|
enable = pkgs.stdenv.isLinux;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
executable = "godot";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue