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,10 +1,13 @@
{ pkgs, lib, config, ... }:
with lib;
let
cfg = config.plugins.lsp-lines;
helpers = import ../helpers.nix { inherit lib; };
in
{
pkgs,
lib,
config,
...
}:
with lib; let
cfg = config.plugins.lsp-lines;
helpers = import ../helpers.nix {inherit lib;};
in {
options = {
plugins.lsp-lines = {
enable = mkEnableOption "lsp_lines.nvim";
@ -19,24 +22,25 @@ in
};
};
config =
let
diagnosticConfig = {
virtual_text = false;
virtual_lines =
if cfg.currentLine then {
only_current_line = true;
} else true;
};
in
config = let
diagnosticConfig = {
virtual_text = false;
virtual_lines =
if cfg.currentLine
then {
only_current_line = true;
}
else true;
};
in
mkIf cfg.enable {
extraPlugins = [ cfg.package ];
extraPlugins = [cfg.package];
extraConfigLua = ''
do
require("lsp_lines").setup()
vim.diagnostic.config(${ helpers.toLuaObject diagnosticConfig })
vim.diagnostic.config(${helpers.toLuaObject diagnosticConfig})
end
'';
};