Commit 648e385 1 parent 734ac03 commit 648e385 Copy full SHA for 648e385
File tree 5 files changed +77
-0
lines changed
5 files changed +77
-0
lines changed Original file line number Diff line number Diff line change @@ -129,6 +129,7 @@ require("onedarkpro").setup({
129
129
virtual_text = " NONE" , -- Style that is applied to virtual text
130
130
},
131
131
filetypes = { -- Override which filetype highlight groups are loaded
132
+ c = true ,
132
133
comment = true ,
133
134
go = true ,
134
135
html = true ,
@@ -138,6 +139,7 @@ require("onedarkpro").setup({
138
139
lua = true ,
139
140
markdown = true ,
140
141
php = true ,
142
+ printf = true ,
141
143
python = true ,
142
144
ruby = true ,
143
145
rust = true ,
Original file line number Diff line number Diff line change
1
+ #include <stdbool.h>
2
+ #include <stddef.h>
3
+ #include <stdint.h>
4
+ #include <stdio.h>
5
+
6
+ #define HELLO_WORLD "hello world"
7
+
8
+ #define LOG (...) printf(__VA_ARGS__)
9
+
10
+ typedef int myint_t ;
11
+
12
+ struct hello {
13
+ const char * world ;
14
+ uint64_t fd ;
15
+ struct hello * ptr ;
16
+ };
17
+
18
+ /*
19
+ * Hello world
20
+ */
21
+ int
22
+ main (int argc , const char * * argv )
23
+ {
24
+ // Hello world
25
+ static const int rc = 0 ;
26
+
27
+ hello :
28
+ printf ("%s: %p" , HELLO_WORLD , NULL );
29
+ if (true) {
30
+ return rc ;
31
+ } else {
32
+ return 1 ;
33
+ }
34
+
35
+ goto hello ;
36
+ }
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ local defaults = {
26
26
virtual_text = " NONE" , -- Style that is applied to virtual text
27
27
},
28
28
filetypes = { -- Enable/disable specific plugins
29
+ c = true ,
29
30
comment = true ,
30
31
go = true ,
31
32
html = true ,
@@ -35,6 +36,7 @@ local defaults = {
35
36
lua = true ,
36
37
markdown = true ,
37
38
php = true ,
39
+ printf = true ,
38
40
python = true ,
39
41
ruby = true ,
40
42
rust = true ,
Original file line number Diff line number Diff line change
1
+ local M = {}
2
+
3
+ --- Get the highlight groups for the filetype
4
+ --- @param theme table
5
+ --- @return table
6
+ function M .groups (theme )
7
+ local config = require (" onedarkpro.config" ).config
8
+
9
+ return {
10
+ [" @constant.c" ] = { fg = theme .palette .yellow },
11
+ [" @constant.builtin.c" ] = { fg = theme .palette .yellow },
12
+ [" @function.builtin.c" ] = { fg = theme .palette .cyan },
13
+ [" @label.c" ] = { fg = theme .palette .red },
14
+ [" @type.builtin.c" ] = { fg = theme .palette .purple },
15
+ [" @type.qualifier.c" ] = { fg = theme .palette .purple },
16
+ [" @variable.parameter.c" ] = { fg = theme .palette .red , style = config .styles .parameters },
17
+
18
+ -- LSP Semantic Tokens
19
+ [" @lsp.type.macro.c" ] = { fg = theme .palette .orange , style = config .styles .constants },
20
+ [" @lsp.typemod.function.defaultLibrary.c" ] = { fg = theme .palette .cyan , style = config .styles .functions },
21
+ [" @lsp.typemod.variable.readonly.c" ] = { fg = theme .palette .yellow , style = config .styles .variable },
22
+ }
23
+ end
24
+
25
+ return M
Original file line number Diff line number Diff line change
1
+ local M = {}
2
+
3
+ --- Get the highlight groups for the filetype
4
+ --- @param theme table
5
+ --- @return table
6
+ function M .groups (theme )
7
+ return {
8
+ [" @character.printf" ] = { fg = theme .palette .orange },
9
+ }
10
+ end
11
+
12
+ return M
You can’t perform that action at this time.
0 commit comments