diff --git a/.config/nvim/after/ftplugin/tex.lua b/.config/nvim/after/ftplugin/tex.lua index 06af552c..81097409 100644 --- a/.config/nvim/after/ftplugin/tex.lua +++ b/.config/nvim/after/ftplugin/tex.lua @@ -1,4 +1 @@ vim.b.autoformat = false -vim.keymap.set("n", "test", function() - dd(vim.b.autoformat) -end) diff --git a/.config/nvim/lua/config/autocmds.lua b/.config/nvim/lua/config/autocmds.lua index e060abd5..4a4837ed 100644 --- a/.config/nvim/lua/config/autocmds.lua +++ b/.config/nvim/lua/config/autocmds.lua @@ -7,21 +7,6 @@ -- but disable it for normal mode commands like `o` -- vim.g.prev_conceallevel = 0 --- vim.api.nvim_create_autocmd("FileType", { --- -- pattern = "*.tex", --- pattern = "tex", --- callback = function(args) --- local buf = args.buf --- local b = vim.b[buf] --- dd(b.autoformat) --- b.autoformat = false --- dd(b.autoformat) --- vim.keymap.set("n", "test", function () --- dd(b.autoformat) --- end) --- end, --- }) - vim.api.nvim_create_autocmd({ "InsertLeave", "FileType" }, { -- pattern = "*", buffer = 0, diff --git a/.config/nvim/lua/config/keymaps.lua b/.config/nvim/lua/config/keymaps.lua index 77e86e74..3f4a3e8c 100644 --- a/.config/nvim/lua/config/keymaps.lua +++ b/.config/nvim/lua/config/keymaps.lua @@ -21,6 +21,10 @@ vim.keymap.set({ "i", "n" }, "", "") -- vim.notify("test") -- end) +map({ "n", "v" }, "\\", function() + LazyVim.format({ force = true }) +end, { desc = "Format" }) + map({ "n", "i", "x", "o" }, "", "", { noremap = true, desc = "Escape" }) map({ "n", "i", "x", "o" }, "", "", { noremap = true, desc = "Escape" })