diff options
| author | JP Appel <jeanpierre.appel01@gmail.com> | 2024-08-16 16:28:22 -0400 |
|---|---|---|
| committer | JP Appel <jeanpierre.appel01@gmail.com> | 2024-08-16 16:28:22 -0400 |
| commit | e184d7cee358abc277a51f040cacf236f1eaceab (patch) | |
| tree | bfc7ced143a04d6d79f955ca7c37b962a01773f3 /nvim/lua/keymap.lua | |
| parent | d3230ab29e56f97966f05cf2232a2e92d6a1302f (diff) | |
removed lspzero, updated keymaps
Diffstat (limited to 'nvim/lua/keymap.lua')
| -rw-r--r-- | nvim/lua/keymap.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/nvim/lua/keymap.lua b/nvim/lua/keymap.lua index b816776..d5751a2 100644 --- a/nvim/lua/keymap.lua +++ b/nvim/lua/keymap.lua @@ -16,4 +16,17 @@ vim.keymap.set('n',"<Leader>k", function() vim.cmd("make") end) vim.keymap.set('t', "<ESC><ESC>", "<c-\\><c-n>") +vim.api.nvim_create_autocmd('LspAttach', { + buffer = 0, + callback = function(args) + local opts = { + buffer = 0, + silent = true + } + vim.keymap.set('n', "==", function () vim.lsp.buf.format() end, opts) + -- vim.keymap.set('v', "=", function () vim.lsp.buf.format() end, opts) + end, + desc = "Change `==` to `vim.lsp.buf.format()` when available" +}) + return M |
