linux format style for C
This commit is contained in:
		
							parent
							
								
									7e8686389c
								
							
						
					
					
						commit
						0731e3d5a2
					
				@ -17,7 +17,7 @@ function M.config()
 | 
			
		||||
	null_ls.setup {
 | 
			
		||||
		debug = false,
 | 
			
		||||
		on_init = function(new_client, _)
 | 
			
		||||
			new_client.offset_encoding = 'utf-16'
 | 
			
		||||
			new_client.offset_encoding = 'utf-8'
 | 
			
		||||
		end,
 | 
			
		||||
		sources = {
 | 
			
		||||
			formatting.prettier.with { extra_args = { '--no-semi', '--single-quote', '--jsx-single-quote' } },
 | 
			
		||||
@ -27,7 +27,8 @@ function M.config()
 | 
			
		||||
				filetypes = { 'c' },
 | 
			
		||||
				extra_args = {
 | 
			
		||||
					'--style',
 | 
			
		||||
					'{AccessModifierOffset : -2, AllowShortIfStatementsOnASingleLine : Never, AlignConsecutiveMacros : true, AllowShortLoopsOnASingleLine : false, AlwaysBreakTemplateDeclarations : true, Standard : c++20, NamespaceIndentation : All, IndentWidth : 4, TabWidth : 4, BreakBeforeBraces : Linux, AllowShortFunctionsOnASingleLine : Empty, AllowShortBlocksOnASingleLine : Never, FixNamespaceComments : true, PointerAlignment : Right, ColumnLimit : 120, ContinuationIndentWidth : 2, UseTab : Always }',
 | 
			
		||||
					'{BasedOnStyle: LLVM, IndentWidth: 8, UseTab: Always, BreakBeforeBraces: Linux, AllowShortIfStatementsOnASingleLine: false, IndentCaseLabels: false}',
 | 
			
		||||
					-- '{AccessModifierOffset : -2, AllowShortIfStatementsOnASingleLine : Never, AlignConsecutiveMacros : true, AllowShortLoopsOnASingleLine : false, AlwaysBreakTemplateDeclarations : true, Standard : c++20, NamespaceIndentation : All, IndentWidth : 4, TabWidth : 4, BreakBeforeBraces : Linux, AllowShortFunctionsOnASingleLine : Empty, AllowShortBlocksOnASingleLine : Never, FixNamespaceComments : true, PointerAlignment : Right, ColumnLimit : 120, ContinuationIndentWidth : 2, UseTab : Always }',
 | 
			
		||||
				},
 | 
			
		||||
			},
 | 
			
		||||
			formatting.clang_format.with {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user