Skip to content

Commit

Permalink
Merge formatting keymaps
Browse files Browse the repository at this point in the history
  • Loading branch information
Shatur committed Apr 15, 2023
1 parent 12d07ef commit fd70bd0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions plugin/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ local function setup_lsp_keymaps(_, buffer)
vim.keymap.set('n', '<Leader>k', vim.diagnostic.open_float, { noremap = true, buffer = buffer, desc = 'Show diagnostic in floating window' })
vim.keymap.set('n', 'K', vim.lsp.buf.hover, { noremap = true, buffer = buffer, desc = 'Display hover information' })
vim.keymap.set('n', '<F2>', vim.lsp.buf.rename, { noremap = true, buffer = buffer, desc = 'Rename symbol' })
vim.keymap.set('n', '<Leader>=', vim.lsp.buf.format, { noremap = true, buffer = buffer, desc = 'Format document' })
vim.keymap.set('v', '<Leader>=', vim.lsp.buf.format, { noremap = true, buffer = buffer, desc = 'Format selection' })
vim.keymap.set({ 'n', 'v' }, '<Leader>=', vim.lsp.buf.format, { noremap = true, buffer = buffer, desc = 'Format document' })
end

local capabilities = require('cmp_nvim_lsp').default_capabilities()
Expand Down

0 comments on commit fd70bd0

Please sign in to comment.