| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- return {
- {
- "kylechui/nvim-surround",
- config = function() require("nvim-surround").setup({}) end
- -- Surround selection / text objects with characters
- -- Surround a word in single quotes: viwS'
- -- Visual mode: S
- -- Normal mode: ys
- -- Surrounds: ( { [ < ' " [t]ag [f]unction
- }, {
- "tpope/vim-commentary",
- enabled = true,
- lazy = false
- -- Toggle line comments
- -- Normal mode: gcc
- -- Visual mode: gc
- }, {
- "nvim-treesitter/nvim-treesitter-textobjects",
- enabled = true,
- lazy = false,
- dependencies = { "nvim-treesitter/nvim-treesitter" },
- config = function()
- require("nvim-treesitter.configs").setup({
- textobjects = {
- select = {
- enable = true,
- lookahead = true,
- keymaps = {
- ["af"] = "@function.outer",
- ["if"] = "@function.inner",
- ["ac"] = "@class.outer",
- ["ic"] = "@class.inner",
- ["ap"] = "@parameter.outer",
- ["ip"] = "@parameter.inner",
- ["aa"] = "@parameter.outer",
- ["ia"] = "@parameter.inner",
- ["al"] = "@loop.outer",
- ["il"] = "@loop.inner",
- ["at"] = "@attribute.outer",
- ["it"] = "@attribute.inner",
- ["a="] = "@assignment.outer",
- ["i="] = "@assignment.inner",
- ["ab"] = "@block.outer",
- ["ib"] = "@block.inner"
- },
- include_surrounding_whitespace = true
- },
- swap = {
- enable = true,
- swap_next = {
- ["csf"] = "@function.inner",
- ["csc"] = "@class.inner",
- ["csp"] = "@parameter.inner",
- ["csa"] = "@parameter.inner",
- ["csl"] = "@loop.inner",
- ["cst"] = "@attribute.inner",
- ["cs="] = "@assignment.inner",
- ["csb"] = "@block.inner"
- },
- swap_previous = {
- ["cSf"] = "@function.inner",
- ["cSc"] = "@class.inner",
- ["cSp"] = "@parameter.inner",
- ["cSa"] = "@parameter.inner",
- ["cSl"] = "@loop.inner",
- ["cSt"] = "@attribute.inner",
- ["cS="] = "@assignment.inner",
- ["cSb"] = "@block.inner"
- }
- }
- }
- })
- end
- }
- }
|