mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-12 18:24:35 +02:00
added formatter + reformat existing codebase (#175)
This commit is contained in:
parent
0bf4313f22
commit
264de8cefb
96 changed files with 3727 additions and 3341 deletions
|
@ -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})'')];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue