Skip to content

Commit

Permalink
docs: fix the second tip
Browse files Browse the repository at this point in the history
  • Loading branch information
NStefan002 committed Jan 3, 2024
1 parent de02d7d commit 2e9c348
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ advanced features, check out two of the plugins mentioned above.

## 📋 Installation

**NOTE:** `visual-surround` works out of the box, you don't have to call `setup()` function if you don't want to change any settings.
It can be lazy-loaded (use something like `event = "BufEnter"`).

[lazy](https://github.com/folke/lazy.nvim):

```lua
Expand All @@ -29,6 +26,8 @@ It can be lazy-loaded (use something like `event = "BufEnter"`).
-- your config
})
end,
-- or if you don't want to change defaults
-- config = true
}
```

Expand Down Expand Up @@ -87,9 +86,10 @@ require("visual-surround").setup({

local preffered_mapping_prefix = "s"
local surround_chars = { "{", "[", "(", "'", '"', "<" }
local surround = require("visual-surround").surround
for _, key in pairs(surround_chars) do
vim.keymap.set("v", preffered_mapping_prefix .. key, function()
Surround.surround(key)
surround(key)
end, { desc = "[visual-surround] Surround selection with " .. key })
end
```
Expand Down
2 changes: 1 addition & 1 deletion lua/visual-surround/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function Config.get_default_config()
}
end

Config.opts = {}
Config.opts = Config.get_default_config()

---@param user_config? table
function Config.override_config(user_config)
Expand Down

0 comments on commit 2e9c348

Please sign in to comment.