The words Under construction in black text on a yellow background with diagonal black stipes surrounding it
I'm in the process of moving my site. It's still a work in progress. Please excuse the mess and broken links.

Setup Auto-Formatting For C++ Files In Neovim On A Mac

TODO: Pull subtitle into page object

These are scratchpad notes I took while figuring things out. Leaving them here as reference.

Old Scratchpad Notes

Reference Links To Add

Notes

Debugging Stuff

I'm moving stuff around right now. All this below is helping me figure out where to put stuff

        -- title

Setup Auto-Formatting For C++ Files In Neovim On A Mac

Turns out all I had to do was uncomment
`clangd = {}`` in the `local servers``
section of my _~/.config/nvim/init.lua__ file
to turn on the clangd LSP. (I already had
clangd installed)

I think the LSP config with the commented
out clangd server was from the 
_kickstart.nvim__^ks^^ config file I'm
using.


-- p 

These are scratchpad notes I took while
figuring things out. Leaving them here
as reference.

-- notes
-- title: Old Scratchpad Notes


- Installed clang-format with:

`brew install clang-format``

- Video with clangd instead of clang-format

https://www.youtube.com/watch?v=BCuyEdDQ5iA

this vid uses nvim-lspconfig which I already
had installed

- clangd installation

https://clangd.llvm.org/installation.html

(I already had it installed)

-- p

Reference Links To Add

-- notes


- https://github.com/neovim/nvim-lspconfig

- https://github.com/neovim/nvim-lspconfig/wiki/Autocompletion

- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#clangd

- https://github.com/nvim-lua/kickstart.nvim/blob/master/lua/kickstart/plugins/autoformat.lua

- https://www.youtube.com/watch?v=BCuyEdDQ5iA

- https://clangd.llvm.org/installation.html

- https://github.com/sbdchd/neoformat (not what i ended up with but it was 
referenced a few times)

- https://jdhao.github.io/2020/04/19/nvim_cpp_and_c_completion/ - another appraoch 
with different tools. This is what I was looking at first, but 
when I figured out I could use the LSP I went that direction 

- https://www.reddit.com/r/vim/comments/s5zjd5/formatter_for_c_code_in_neovim/
pointers to some built-in help files for formatting, 
but not super useful and it doesn't use the LSP




-- ref
-- id: ks
-- title: kickstart.nvim
-- url: https://github.com/nvim-lua/kickstart.nvim/blob/master/lua/kickstart/plugins/autoformat.lua

I got turned onto this from <<link|TJ DeVries|
https://www.youtube.com/c/tjdevries>> who works on Neovim.
It's worked well as a basic starter for me. 


-- ref
-- title: Set up for C++/C Development in Neovim
-- url: https://jdhao.github.io/2020/04/19/nvim_cpp_and_c_completion/

This is the post that got me started. It has 
instruction for auto-completion as well as formatting.
I'll get to that at some point, but my immediate
concern is the formatting.


-- categories
-- Neovim 

-- metadata
-- date: 2023-10-15 14:22:20
-- id: 2wolm05k
-- site: aws
-- type: post
-- status: scratch