p00f / clangd_extensions.nvim

Clangd's off-spec features for neovim's LSP client. Use https://sr.ht/~p00f/clangd_extensions.nvim instead
MIT License
485 stars 18 forks source link

how to disable clang-format? #28

Closed Rishabh672003 closed 1 year ago

Rishabh672003 commented 1 year ago

hey i dont know if this is the right place to ask this but i am having this issue where i want the indentation in my C code to be 4 spaces but when i format the code with null-ls with astyle with lua vim.lsp.buf.format{ async = true } it formats the code to 2 spaces i know this is the fault of clang-format because when i put // clang-format off on top of the code it formats it correctly Heres a video showcasing my issue -

https://user-images.githubusercontent.com/53911515/212450761-6a3299cc-24ca-4847-ab0b-f956e2e95928.mp4

is there a way to disable clang-format by default?

p00f commented 1 year ago

but when i format the code with null-ls with astyle with lua vim.lsp.buf.format{ async = true }

Just don't do it then?

p00f commented 1 year ago

Also ask null-ls