diff --git a/.config/nvim/lua/core/keymaps.lua b/.config/nvim/lua/core/keymaps.lua index 7b74c42..e45227c 100644 --- a/.config/nvim/lua/core/keymaps.lua +++ b/.config/nvim/lua/core/keymaps.lua @@ -30,7 +30,9 @@ keymap("n", "", ":vertical resize +2", opts) -- Navigate buffers keymap("n", "", ":bnext", opts) +keymap("n", "", ":bnext", opts) keymap("n", "", ":bprevious", opts) +keymap("n", "", ":bprevious", opts) -- Clear highlights keymap("n", "h", "nohlsearch", opts) @@ -53,6 +55,8 @@ keymap("n", "lj", "Lspsaga diagnostic_jump_next", opts) keymap("n", "lk", "Lspsaga diagnostic_jump_prev", opts) keymap("n", "lr", "Lspsaga rename", opts) keymap("n", "lp", "Lspsaga peek_definition", opts) +keymap("n", "lf", "lua vim.lsp.buf.format{ async=true }", opts) +keymap("n", "ls", "lua vim.lsp.buf.signature_help()", opts) -- Better paste keymap("v", "p", '"_dP', opts) diff --git a/.config/nvim/lua/core/options.lua b/.config/nvim/lua/core/options.lua index ce6f4e6..0f3c4b6 100644 --- a/.config/nvim/lua/core/options.lua +++ b/.config/nvim/lua/core/options.lua @@ -48,6 +48,6 @@ vim.opt.cmdheight = 0 -- Number of screen lines to use for the command-line -- neovide if vim.fn.exists("g:neovide") ~= 0 then - vim.g.neovide_cursor_animation_length=0 + vim.g.neovide_cursor_animation_length = 0 vim.g.neovide_cursor_trail_size = 0 end diff --git a/.config/nvim/lua/plugins/gitsigns.lua b/.config/nvim/lua/plugins/gitsigns.lua index 9d48799..85eebbe 100644 --- a/.config/nvim/lua/plugins/gitsigns.lua +++ b/.config/nvim/lua/plugins/gitsigns.lua @@ -28,8 +28,8 @@ gitsigns.setup({ map({ "n", "v" }, "hr", ":Gitsigns reset_hunk") map("n", "hp", gs.preview_hunk) map("n", "hR", gs.reset_buffer) - map('n', 'hd', gs.diffthis) - map('n', 'hj', gs.next_hunk) - map('n', 'hk', gs.prev_hunk) + map("n", "hd", gs.diffthis) + map("n", "hj", gs.next_hunk) + map("n", "hk", gs.prev_hunk) end, }) diff --git a/.config/nvim/lua/plugins/lsp/handlers.lua b/.config/nvim/lua/plugins/lsp/handlers.lua index a47c3a4..bcee668 100644 --- a/.config/nvim/lua/plugins/lsp/handlers.lua +++ b/.config/nvim/lua/plugins/lsp/handlers.lua @@ -49,15 +49,7 @@ M.setup = function() }) end -local function lsp_keymaps(bufnr) - local opts = { noremap = true, silent = true } - local keymap = vim.api.nvim_buf_set_keymap - - keymap(bufnr, "n", "lf", "lua vim.lsp.buf.format{ async=true }", opts) - keymap(bufnr, "n", "ls", "lua vim.lsp.buf.signature_help()", opts) -end - -M.on_attach = function(client, bufnr) +M.on_attach = function(client) if client.name == "tsserver" then client.server_capabilities.document_formatting = false end @@ -66,7 +58,6 @@ M.on_attach = function(client, bufnr) client.server_capabilities.document_formatting = false end - lsp_keymaps(bufnr) local status_ok, illuminate = pcall(require, "illuminate") if not status_ok then return