mirror of
				https://github.com/SoPat712/dotfiles.git
				synced 2025-10-29 12:00:47 -04:00 
			
		
		
		
	C formatting and max line length
This commit is contained in:
		| @@ -7,7 +7,6 @@ return { | |||||||
|  |  | ||||||
| 		conform.setup({ | 		conform.setup({ | ||||||
| 			formatters_by_ft = { | 			formatters_by_ft = { | ||||||
| 				c = { "clang-format" }, |  | ||||||
| 				javascript = { "prettier" }, | 				javascript = { "prettier" }, | ||||||
| 				typescript = { "prettier" }, | 				typescript = { "prettier" }, | ||||||
| 				javascriptreact = { "prettier" }, | 				javascriptreact = { "prettier" }, | ||||||
|   | |||||||
| @@ -112,7 +112,33 @@ return { | |||||||
|  |  | ||||||
| 			lspconfig.clangd.setup({ | 			lspconfig.clangd.setup({ | ||||||
| 				capabilities = capabilities, | 				capabilities = capabilities, | ||||||
|  | 				init_options = { | ||||||
|  | 					clangdFileStatus = true, | ||||||
|  | 					usePlaceholders = true, | ||||||
|  | 					completeUnimported = true, | ||||||
|  | 					semanticHighlighting = true, | ||||||
|  | 				}, | ||||||
|  | 				on_attach = function(client, bufnr) | ||||||
|  | 					require("clangd_extensions.inlay_hints").setup_autocmd() | ||||||
|  | 					require("clangd_extensions.inlay_hints").set_inlay_hints() | ||||||
|  | 				end, | ||||||
|  | 				cmd = { | ||||||
|  | 					"clangd", | ||||||
|  | 					"--background-index", | ||||||
|  | 					"--pch-storage=memory", | ||||||
|  | 					"--clang-tidy", | ||||||
|  | 					"--suggest-missing-includes", | ||||||
|  | 					"--all-scopes-completion", | ||||||
|  | 					"--pretty", | ||||||
|  | 					"--header-insertion=iwyu", | ||||||
|  | 					"--fmt-style=file", | ||||||
|  | 					"--fallback-style={ BasedOnStyle: Google, ColumnLimit: 140 }", | ||||||
|  | 					"-j=12", | ||||||
|  | 					"--inlay-hints", | ||||||
|  | 					"--header-insertion-decorators", | ||||||
|  | 				}, | ||||||
| 			}) | 			}) | ||||||
|  |  | ||||||
| 			require("ufo").setup() | 			require("ufo").setup() | ||||||
|  |  | ||||||
| 			-- Global mappings. | 			-- Global mappings. | ||||||
| @@ -122,8 +148,6 @@ return { | |||||||
| 			-- after the language server attaches to the current buffer | 			-- after the language server attaches to the current buffer | ||||||
| 			vim.api.nvim_create_autocmd("LspAttach", { | 			vim.api.nvim_create_autocmd("LspAttach", { | ||||||
| 				group = vim.api.nvim_create_augroup("UserLspConfig", {}), | 				group = vim.api.nvim_create_augroup("UserLspConfig", {}), | ||||||
| 				require("clangd_extensions.inlay_hints").setup_autocmd(), |  | ||||||
| 				require("clangd_extensions.inlay_hints").set_inlay_hints(), |  | ||||||
| 				callback = function(ev) | 				callback = function(ev) | ||||||
| 					-- Enable completion triggered by <c-x><c-o> | 					-- Enable completion triggered by <c-x><c-o> | ||||||
| 					-- vim.bo[ev.buf].omnifunc = "v:lua.vim.lsp.omnifunc" | 					-- vim.bo[ev.buf].omnifunc = "v:lua.vim.lsp.omnifunc" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Josh Patra
					Josh Patra