diff options
author | justanothercatgirl <sotov@twistea.su> | 2025-01-17 13:11:40 +0300 |
---|---|---|
committer | justanothercatgirl <sotov@twistea.su> | 2025-01-17 13:11:40 +0300 |
commit | fea38c3c191163ea3f14f2c90236ebbde75fcbe5 (patch) | |
tree | 8a442ee129a787b5b44834e82509fe340182df36 /.config/nvim/lua/user/remaps.lua | |
parent | b265c328f04362225a9d001580d0b8f5963ee1d9 (diff) |
merged changes from laptop into pc dotfiles
Diffstat (limited to '.config/nvim/lua/user/remaps.lua')
-rw-r--r-- | .config/nvim/lua/user/remaps.lua | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/.config/nvim/lua/user/remaps.lua b/.config/nvim/lua/user/remaps.lua index 8839890..8e9ee26 100644 --- a/.config/nvim/lua/user/remaps.lua +++ b/.config/nvim/lua/user/remaps.lua @@ -99,6 +99,21 @@ lmap("n", "d]", vim.diagnostic.goto_next) map("n", "<F5>", ":RunCode<CR>", opt) map("n", "<F2>", ":echo 'time: ' . strftime('%c')<CR>", opt) +lmap("n", "<F8>", function() + if (global_inde == nil) then + global_inde = vim.opt.indentexpr:get() + end + inde = vim.opt.indentexpr:get() + if inde ~= "" then + vim.opt.indentexpr = "" + print"indentation disabled" + else + vim.opt.indentexpr = global_inde + print"indentation enabled" + end + vim.cmd("set si! cin! ai!") +end) + -- language server remaps -- enable only after attaching language server to buffer vim.api.nvim_create_autocmd('LspAttach', { |