diff options
author | Jacob Janzen <jjanzenn@proton.me> | 2024-08-07 14:58:48 -0500 |
---|---|---|
committer | Jacob Janzen <jjanzenn@proton.me> | 2024-08-07 14:58:48 -0500 |
commit | 341c3be75228dbd23fd05208d148acecf950d573 (patch) | |
tree | ecac1a33408f61c9816c56f97a2b617ab425c68e /config/nvim/lua/format.org |
initial commit
Diffstat (limited to 'config/nvim/lua/format.org')
-rw-r--r-- | config/nvim/lua/format.org | 25 |
1 files changed, 25 insertions, 0 deletions
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 |