forked from nix-community/nixvim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
plugins: Add ccc (new PR) (nix-community#1365)
- Loading branch information
Showing
4 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
lib, | ||
helpers, | ||
config, | ||
pkgs, | ||
... | ||
}: | ||
helpers.neovim-plugin.mkNeovimPlugin config { | ||
name = "ccc"; | ||
originalName = "ccc.nvim"; | ||
defaultPackage = pkgs.vimPlugins.ccc-nvim; | ||
|
||
maintainers = [helpers.maintainers.JanKremer]; | ||
|
||
settingsOptions = { | ||
default_color = helpers.defaultNullOpts.mkStr "#000000" '' | ||
The default color used when a color cannot be picked. It must be HEX format. | ||
''; | ||
|
||
highlight_mode = helpers.defaultNullOpts.mkEnum ["fg" "bg" "foreground" "background"] "bg" '' | ||
Option to highlight text foreground or background. It is used to | ||
`output_line` and `highlighter`. | ||
''; | ||
|
||
lsp = helpers.defaultNullOpts.mkBool true '' | ||
Whether to enable LSP support. The color information is updated in the | ||
background and the result is used by `:CccPick` and highlighter. | ||
''; | ||
|
||
highlighter = { | ||
auto_enable = helpers.defaultNullOpts.mkBool false '' | ||
Whether to enable automatically on `BufEnter`. | ||
''; | ||
|
||
lsp = helpers.defaultNullOpts.mkBool true '' | ||
If true, highlight using LSP. If a language server with the color | ||
provider is not attached to a buffer, it falls back to highlight with | ||
pickers. See also `:help ccc-option-lsp`. | ||
''; | ||
}; | ||
}; | ||
|
||
settingsExample = { | ||
default_color = "#FFFFFF"; | ||
highlight_mode = "fg"; | ||
lsp = false; | ||
highlighter = { | ||
auto_enable = true; | ||
lsp = false; | ||
}; | ||
}; | ||
|
||
extraConfig = cfg: {opts.termguicolors = lib.mkDefault true;}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
empty = { | ||
plugins.ccc.enable = true; | ||
}; | ||
|
||
example = { | ||
plugins.ccc = { | ||
enable = true; | ||
settings = { | ||
default_color = "#FFFFFF"; | ||
highlight_mode = "fg"; | ||
lsp = true; | ||
highlighter = { | ||
auto_enable = true; | ||
lsp = true; | ||
}; | ||
}; | ||
}; | ||
}; | ||
} |