mirror of
https://github.com/SoPat712/dotfiles.git
synced 2025-08-21 10:38:44 -04:00
C formatting and max line length
This commit is contained in:
@@ -7,7 +7,6 @@ return {
|
||||
|
||||
conform.setup({
|
||||
formatters_by_ft = {
|
||||
c = { "clang-format" },
|
||||
javascript = { "prettier" },
|
||||
typescript = { "prettier" },
|
||||
javascriptreact = { "prettier" },
|
||||
|
@@ -112,7 +112,33 @@ return {
|
||||
|
||||
lspconfig.clangd.setup({
|
||||
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()
|
||||
|
||||
-- Global mappings.
|
||||
@@ -122,8 +148,6 @@ return {
|
||||
-- after the language server attaches to the current buffer
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
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)
|
||||
-- Enable completion triggered by <c-x><c-o>
|
||||
-- vim.bo[ev.buf].omnifunc = "v:lua.vim.lsp.omnifunc"
|
||||
|
Reference in New Issue
Block a user