added formatter + reformat existing codebase (#175)

This commit is contained in:
Gaétan Lepage 2023-02-20 11:42:13 +01:00 committed by GitHub
parent 0bf4313f22
commit 264de8cefb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
96 changed files with 3727 additions and 3341 deletions

View file

@ -1,12 +1,14 @@
{ pkgs, lib, config, ... }:
with lib;
let
cfg = config.plugins.coq-nvim;
helpers = import ../helpers.nix { inherit lib; };
plugins = import ../plugin-defs.nix { inherit pkgs; };
in
{
pkgs,
lib,
config,
...
}:
with lib; let
cfg = config.plugins.coq-nvim;
helpers = import ../helpers.nix {inherit lib;};
plugins = import ../plugin-defs.nix {inherit pkgs;};
in {
options = {
plugins.coq-nvim = {
enable = mkEnableOption "coq-nvim";
@ -16,7 +18,7 @@ in
installArtifacts = mkEnableOption "Install coq-artifacts";
autoStart = mkOption {
type = with types; nullOr (oneOf [ bool (enum [ "shut-up" ]) ]);
type = with types; nullOr (oneOf [bool (enum ["shut-up"])]);
default = null;
description = "Auto-start or shut up";
};
@ -28,23 +30,24 @@ in
};
};
};
config =
let
settings = {
auto_start = cfg.autoStart;
"keymap.recommended" = cfg.recommendedKeymaps;
};
in
config = let
settings = {
auto_start = cfg.autoStart;
"keymap.recommended" = cfg.recommendedKeymaps;
};
in
mkIf cfg.enable {
extraPlugins = [
cfg.package
] ++ optional cfg.installArtifacts plugins.coq-artifacts;
extraPlugins =
[
cfg.package
]
++ optional cfg.installArtifacts plugins.coq-artifacts;
plugins.lsp = {
preConfig = ''
vim.g.coq_settings = ${helpers.toLuaObject settings}
local coq = require 'coq'
'';
setupWrappers = [ (s: ''coq.lsp_ensure_capabilities(${s})'') ];
setupWrappers = [(s: ''coq.lsp_ensure_capabilities(${s})'')];
};
};
}