Skip to content

Commit

Permalink
fix: add keymap for formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgrieser committed Nov 17, 2024
1 parent a04ccde commit ee9efaf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kickstart-python.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ vim.opt.rtp:prepend(lazypath)
--------------------------------------------------------------------------------

-- define what key is used for `<leader>`. Here, we use `,`.
-- (`:help mapleader` for information what the leader key is)
vim.g.mapleader = ","

local plugins = {
Expand All @@ -45,13 +46,15 @@ local plugins = {

-- Setup the LSPs
-- `gd` and `gr` for goto definition / references
-- `<C-f>` for formatting
-- `<leader>c` for code actions (organize imports, etc.)
{
"neovim/nvim-lspconfig",
keys = {
{ "gd", vim.lsp.buf.definition, desc = "Goto Definition" },
{ "gr", vim.lsp.buf.references, desc = "Goto References" },
{ "<leader>c", vim.lsp.buf.code_action, desc = "Code Action" },
{ "<C-f>", vim.lsp.buf.format, desc = "Format File" },
},
init = function()
-- this snippet enables auto-completion
Expand Down

0 comments on commit ee9efaf

Please sign in to comment.