.config/nvim/lua/plugins/editing.lua

Mon, 14 Aug 2023 22:04:03 -0400

author
Meredith Howard <mhoward@roomag.org>
date
Mon, 14 Aug 2023 22:04:03 -0400
changeset 1127
a120f1d3d932
parent 1126
fe77c5eed375
child 1131
f3044a1658fc
permissions
-rw-r--r--

tmux: update DBUS_SESSION_BUS_ADDRESS to fix gpg pinentry

local g = vim.g

-- >> Undotree
g.undotree_SplitWidth = 45
g.undotree_SetFocusWhenToggle = 1
g.undotree_ShortIndicators = 1
g.undotree_DiffCommand = "diff -dp -U 1"

-- >> Tagbar
g.tagbar_autoclose = 1
g.tagbar_autofocus = 1
g.tagbar_compact = 1
g.tagbar_width = 30

-- >> interestingwords
-- These are jellybeans colors and some complements
g.interestingWordsGUIColors = {
  "#C4A258",
  "#6AADA0",
  "#71B9F8",
  "#A037B0",
  "#CF6A4C",
  "#D8AD4C",
}
g.interestingWordsTermColors = {
  "179",
  "73",
  "75",
  "133",
  "167",
  "136",
}

return {
  {
    "editorconfig/editorconfig-vim",
    event = { "BufReadPost", "BufNewFile" },
    cond = function()
      return vim.fn.has("nvim-0.9") == 0
    end,
  },

  "tpope/vim-unimpaired",
  "tomtom/tcomment_vim",

  {
    "windwp/nvim-autopairs",
    event = { "InsertEnter" },
    config = function (_, _)
      local npairs = require("nvim-autopairs")
      npairs.setup({})
      local Rule = require("nvim-autopairs.rule")

      -- Only run autopairs for opening a multiline block
      npairs.clear_rules()
      for _,bracket in pairs { { '(', ')' }, { '[', ']' }, { '{', '}' } } do
        npairs.add_rules {
          Rule(bracket[1], bracket[2])
            :end_wise(function() return true end)
        }
      end
    end,
  },

  -- "tpope/vim-endwise",
  -- treesitter-endwise only applies if the parser is installed. do i want to
  -- worry about a fallback?
  {
    "RRethy/nvim-treesitter-endwise",
    config = function (_,_)
      require("nvim-treesitter.configs").setup({
        endwise = { enable = true },
      })
    end,
  },

  "godlygeek/tabular",
  { "mbbill/undotree", cmd = "UndotreeToggle" },

  "tpope/vim-vinegar",
  "lfv89/vim-interestingwords",
  "kshenoy/vim-signature",
  { "majutsushi/tagbar", cmd = "TagbarToggle" },

  {
    "RRethy/vim-illuminate",
    event = { "BufReadPost", "BufNewFile" },
    opts = {
      delay = 250,
      large_file_cutoff = 15000,
    },
    config = function(_, opts)
      require("illuminate").configure(opts)
    end,
  },
}

mercurial