diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-06-10 23:07:28 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-06-10 23:07:28 +0200 |
commit | 511efe89ed084bc922ae142d32e08427859198f4 (patch) | |
tree | fef9294b6056b6cf972ea5e689f70da8184fafae /.config/nvim/after/ftplugin/c.lua | |
parent | 64e2e90abdca04743558e3baf42a6b714b440bd0 (diff) |
nvim: Completely rewrite my configuration
Diffstat (limited to '.config/nvim/after/ftplugin/c.lua')
-rw-r--r-- | .config/nvim/after/ftplugin/c.lua | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/.config/nvim/after/ftplugin/c.lua b/.config/nvim/after/ftplugin/c.lua index 7f8d336..6058e31 100644 --- a/.config/nvim/after/ftplugin/c.lua +++ b/.config/nvim/after/ftplugin/c.lua @@ -1,3 +1,14 @@ -local lib = require('mango.lib') +vim.bo.commentstring = '/* %s */' -lib.set_tab_width(4, true) +vim.keymap.set('v', '<localleader>=', ":'<'>!clang-format -style=file -<CR>", { + desc = 'Format the current selection with Clang Format', +}) + +vim.keymap.set('n', 'K', function() + vim.cmd [[ + execute "silent !man -Tpdf '" . expand('<cword>') . "' | zathura - &" + ]] +end, { + buffer = 0, + desc = 'View the manual page for the word under the cursor', +}) |