File tree Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -731,7 +731,6 @@ require('lazy').setup({
731
731
jump = { float = true , wrap = false },
732
732
severity_sort = true ,
733
733
float = { source = ' if_many' },
734
- underline = { severity = vim .diagnostic .severity .ERROR },
735
734
signs = vim .g .have_nerd_font and {
736
735
text = {
737
736
[vim .diagnostic .severity .ERROR ] = ' ' ,
@@ -740,7 +739,10 @@ require('lazy').setup({
740
739
[vim .diagnostic .severity .HINT ] = ' ' ,
741
740
},
742
741
} or {},
743
- virtual_lines = true ,
742
+ virtual_text = {
743
+ source = ' if_many' ,
744
+ spacing = 2 ,
745
+ },
744
746
}
745
747
746
748
-- LSP servers and clients are able to communicate to each other what features they support.
@@ -761,7 +763,6 @@ require('lazy').setup({
761
763
local servers = {
762
764
clangd = {
763
765
' clangd' ,
764
- ' --clang-tidy' ,
765
766
},
766
767
-- gopls = {},
767
768
pylsp = {},
Original file line number Diff line number Diff line change @@ -282,4 +282,22 @@ return {
282
282
})
283
283
end ,
284
284
},
285
+ {
286
+ ' mfussenegger/nvim-lint' ,
287
+ event = { ' BufEnter' , ' BufWritePost' , ' InsertLeave' },
288
+ config = function ()
289
+ require (' lint' ).linters_by_ft = {
290
+ c = { ' clangtidy' },
291
+ cpp = { ' clangtidy' },
292
+ }
293
+
294
+ vim .api .nvim_create_autocmd ({ ' BufEnter' , ' BufWritePost' , ' InsertLeave' }, {
295
+ callback = function ()
296
+ -- try_lint without arguments runs the linters defined in `linters_by_ft`
297
+ -- for the current filetype
298
+ require (' lint' ).try_lint ()
299
+ end ,
300
+ })
301
+ end ,
302
+ },
285
303
}
You can’t perform that action at this time.
0 commit comments