Skip to content

Commit

Permalink
improv(urlObj): more generous url pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgrieser committed Dec 4, 2024
1 parent febdcb8 commit 6cfa653
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lua/various-textobjs/charwise-textobjs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -357,10 +357,7 @@ function M.number(scope)
M.selectClosestTextobj(pattern, "outer", config.forwardLooking.small)
end

-- make URL pattern available for external use
-- INFO mastodon URLs contain `@`, neovim docs urls can contain a `'`, special
-- urls like https://docs.rs/regex/1.*/regex/#syntax can have a `*`
M.urlPattern = "%l%l%l-://[A-Za-z0-9_%-/.#%%=?&'@+*:]+"
M.urlPattern = "%l%l%l-://%S+" -- make URL pattern available for external use
function M.url() M.selectClosestTextobj(M.urlPattern, "outer", config.forwardLooking.big) end

---@param scope "inner"|"outer" inner excludes the leading dot
Expand Down

0 comments on commit 6cfa653

Please sign in to comment.