mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-02 17:15:01 +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,10 +1,13 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.plugins.lsp;
|
||||
helpers = (import ../helpers.nix { inherit lib; });
|
||||
in
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.plugins.lsp;
|
||||
helpers = import ../helpers.nix {inherit lib;};
|
||||
in {
|
||||
imports = [
|
||||
./basic-servers.nix
|
||||
];
|
||||
|
@ -14,24 +17,25 @@ in
|
|||
enable = mkEnableOption "neovim's built-in LSP";
|
||||
|
||||
enabledServers = mkOption {
|
||||
type = with types; listOf (oneOf [
|
||||
str
|
||||
(submodule {
|
||||
options = {
|
||||
name = mkOption {
|
||||
type = str;
|
||||
description = "The server's name";
|
||||
};
|
||||
type = with types;
|
||||
listOf (oneOf [
|
||||
str
|
||||
(submodule {
|
||||
options = {
|
||||
name = mkOption {
|
||||
type = str;
|
||||
description = "The server's name";
|
||||
};
|
||||
|
||||
extraOptions = mkOption {
|
||||
type = attrs;
|
||||
description = "Extra options for the server";
|
||||
extraOptions = mkOption {
|
||||
type = attrs;
|
||||
description = "Extra options for the server";
|
||||
};
|
||||
};
|
||||
};
|
||||
})
|
||||
]);
|
||||
})
|
||||
]);
|
||||
description = "A list of enabled LSP servers. Don't use this directly.";
|
||||
default = [ ];
|
||||
default = [];
|
||||
};
|
||||
|
||||
onAttach = mkOption {
|
||||
|
@ -43,7 +47,7 @@ in
|
|||
setupWrappers = mkOption {
|
||||
type = with types; listOf (functionTo str);
|
||||
description = "Code to be run to wrap the setup args. Takes in an argument containing the previous results, and returns a new string of code.";
|
||||
default = [ ];
|
||||
default = [];
|
||||
};
|
||||
|
||||
preConfig = mkOption {
|
||||
|
@ -60,14 +64,14 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
config =
|
||||
let
|
||||
runWrappers = wrappers: s:
|
||||
if wrappers == [ ] then s
|
||||
else (head wrappers) (runWrappers (tail wrappers) s);
|
||||
in
|
||||
config = let
|
||||
runWrappers = wrappers: s:
|
||||
if wrappers == []
|
||||
then s
|
||||
else (head wrappers) (runWrappers (tail wrappers) s);
|
||||
in
|
||||
mkIf cfg.enable {
|
||||
extraPlugins = [ pkgs.vimPlugins.nvim-lspconfig ];
|
||||
extraPlugins = [pkgs.vimPlugins.nvim-lspconfig];
|
||||
|
||||
# Enable all LSP servers
|
||||
extraConfigLua = ''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue