summaryrefslogtreecommitdiff
path: root/lua/config/plugins/code-editing.lua
blob: a1dd8c421dfe4bbfff0e4b407643a91d88ecbfd0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
return {
  -- Add/change/delete surrounding delimiter pairs with ease.
  {
    "kylechui/nvim-surround",
    event = "VeryLazy",
    dependencies = {
      "nvim-treesitter/nvim-treesitter",
      "nvim-treesitter/nvim-treesitter-textobjects",
    },
    config = function()
      require("nvim-surround").setup({})
    end
  },

  -- Autopairs for neovim written in lua.
  {
    "windwp/nvim-autopairs",
    event = "InsertEnter",
    config = true,
  },

  -- Twilight dims inactive portions of the code you"re editing using TreeSitter.
  {
    "folke/twilight.nvim",
    config = function()
      local twilight = require("twilight")
      twilight.setup({
        dimming = { alpha = 0.1, },
        expand = {
          "function",
          "method",
        },
      })
      vim.keymap.set("n", "<Leader><Leader>", twilight.toggle, { desc = "Dims inactive portions of the code" })
    end
  },

  -- Hex editing.
  {
    "RaafatTurki/hex.nvim",
    config = function()
      require("hex").setup()
    end
  },
}