@@ -90,3 +90,57 @@ api.nvim_create_autocmd("FileType", {
90
90
group = nvim_metals_group ,
91
91
})
92
92
93
+
94
+ ---- ------------------------------
95
+ -- clangd Setup -------------------
96
+ ---- ------------------------------
97
+
98
+ require (" lspconfig" ).clangd .setup ({})
99
+
100
+ require (" clangd_extensions" ).setup ({
101
+ inlay_hints = {
102
+ inline = vim .fn .has (" nvim-0.10" ) == 1 ,
103
+ -- Options other than `highlight' and `priority' only work
104
+ -- if `inline' is disabled
105
+ -- Only show inlay hints for the current line
106
+ only_current_line = false ,
107
+ -- Event which triggers a refresh of the inlay hints.
108
+ -- You can make this { "CursorMoved" } or { "CursorMoved,CursorMovedI" } but
109
+ -- not that this may cause higher CPU usage.
110
+ -- This option is only respected when only_current_line and
111
+ -- autoSetHints both are true.
112
+ only_current_line_autocmd = { " CursorHold" },
113
+ -- whether to show parameter hints with the inlay hints or not
114
+ show_parameter_hints = true ,
115
+ -- prefix for parameter hints
116
+ parameter_hints_prefix = " <- " ,
117
+ -- prefix for all the other hints (type, chaining)
118
+ other_hints_prefix = " => " ,
119
+ -- whether to align to the length of the longest line in the file
120
+ max_len_align = false ,
121
+ -- padding from the left if max_len_align is true
122
+ max_len_align_padding = 1 ,
123
+ -- whether to align to the extreme right or not
124
+ right_align = false ,
125
+ -- padding from the right if right_align is true
126
+ right_align_padding = 7 ,
127
+ -- The color of the hints
128
+ highlight = " DiagnosticHint" ,
129
+ -- The highlight group priority for extmark
130
+ priority = 100 ,
131
+ },
132
+ memory_usage = {
133
+ border = " none" ,
134
+ },
135
+ symbol_info = {
136
+ border = " none" ,
137
+ },
138
+ })
139
+
140
+ require (" clangd_extensions.inlay_hints" ).setup_autocmd ()
141
+ require (" clangd_extensions.inlay_hints" ).set_inlay_hints ()
142
+
143
+
144
+ require (" rust-tools" ).setup ()
145
+ require (' rust-tools' ).inlay_hints .enable ()
146
+
0 commit comments