From 341c3be75228dbd23fd05208d148acecf950d573 Mon Sep 17 00:00:00 2001 From: Jacob Janzen Date: Wed, 7 Aug 2024 14:58:48 -0500 Subject: initial commit --- config/nvim/lua/format.org | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 config/nvim/lua/format.org (limited to 'config/nvim/lua/format.org') diff --git a/config/nvim/lua/format.org b/config/nvim/lua/format.org new file mode 100644 index 0000000..5b362d0 --- /dev/null +++ b/config/nvim/lua/format.org @@ -0,0 +1,25 @@ +#+title: Neovim Formatting Settings +Turn on =clang-format= in C, CUDA, C++, C#, Java, JavaScript, and JSON. +#+begin_src lua :tangle yes + vim.cmd([[ + let g:clang_format#code_style = 'file' + autocmd FileType c ClangFormatAutoEnable + autocmd FileType cuda ClangFormatAutoEnable + autocmd FileType cpp ClangFormatAutoEnable + autocmd FileType cs ClangFormatAutoEnable + autocmd FileType java ClangFormatAutoEnable + autocmd FileType javascript ClangFormatAutoEnable + autocmd FileType json ClangFormatAutoEnable + let g:vimtex_view_method = 'skim' + ]]) +#+end_src + +Auto-format Rust on save. +#+begin_src lua :tangle yes + vim.g.rustfmt_autosave = 1 +#+end_src + +Start making a table by placing a =|=. +#+begin_src lua :tangle yes + vim.g.table_mode_corner = '|' +#+end_src -- cgit v1.2.3