File tree Expand file tree Collapse file tree 2 files changed +82
-0
lines changed
plugins/by-name/highlight-colors
tests/test-sources/plugins/by-name/highlight-colors Expand file tree Collapse file tree 2 files changed +82
-0
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ lib ,
3
+ config ,
4
+ ...
5
+ } :
6
+ lib . nixvim . plugins . mkNeovimPlugin {
7
+ name = "highlight-colors" ;
8
+ packPathName = "nvim-highlight-colors" ;
9
+ package = "nvim-highlight-colors" ;
10
+ moduleName = "nvim-highlight-colors" ;
11
+
12
+ maintainers = [ lib . maintainers . GaetanLepage ] ;
13
+
14
+ settingsExample = {
15
+ render = "virtual" ;
16
+ virtual_symbol = "■" ;
17
+ enable_named_colors = true ;
18
+ } ;
19
+
20
+ extraOptions = {
21
+ cmpIntegration = lib . mkEnableOption "cmp-integration for nvim-highlight-colors." ;
22
+ } ;
23
+
24
+ extraConfig = cfg : {
25
+ opts . termguicolors = lib . mkDefault true ;
26
+
27
+ plugins . cmp . settings . formatting . format = lib . mkIf cfg . cmpIntegration (
28
+ lib . nixvim . mkRaw "require('nvim-highlight-colors').format"
29
+ ) ;
30
+
31
+ warnings = lib . nixvim . mkWarnings "plugins.highlight-colors" {
32
+ when = cfg . cmpIntegration && ! config . plugins . cmp . enable ;
33
+ message = ''
34
+ You have enabled the cmp integration with highlight-colors but `plugins.highlight-colors` is not enabled.
35
+ '' ;
36
+ } ;
37
+ } ;
38
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ empty = {
3
+ plugins . highlight-colors . enable = true ;
4
+ } ;
5
+
6
+ defaults = {
7
+ plugins . highlight-colors = {
8
+ enable = true ;
9
+
10
+ settings = {
11
+ render = "background" ;
12
+ enable_hex = true ;
13
+ enable_rgb = true ;
14
+ enable_hsl = true ;
15
+ enable_hsl_without_function = true ;
16
+ enable_var_usage = true ;
17
+ enable_named_colors = true ;
18
+ enable_short_hex = true ;
19
+ enable_tailwind = false ;
20
+ enable_ansi = false ;
21
+ custom_colors = null ;
22
+ virtual_symbol = "■" ;
23
+ virtual_symbol_prefix = "" ;
24
+ virtual_symbol_suffix = " " ;
25
+ virtual_symbol_position = "inline" ;
26
+ exclude_filetypes = { } ;
27
+ exclude_buftypes = { } ;
28
+ exclude_buffer . __raw = "function(bufnr) end" ;
29
+ } ;
30
+ } ;
31
+ } ;
32
+
33
+ example = {
34
+ plugins . highlight-colors = {
35
+ enable = true ;
36
+
37
+ settings = {
38
+ render = "virtual" ;
39
+ virtual_symbol = "■" ;
40
+ enable_named_colors = true ;
41
+ } ;
42
+ } ;
43
+ } ;
44
+ }
You can’t perform that action at this time.
0 commit comments