chrisgrieser / nvim-spider

Use the w, e, b motions like a spider. Move by subwords and skip insignificant punctuation.
MIT License
667 stars 13 forks source link

Feature Request: Allow to opt out of certain features #1

Closed premell closed 1 year ago

premell commented 1 year ago

Feature Requested

Since your plugin has multiple very opinionated features it would be nice to be able to opt in and out of them independently. For instance if you want to skip insignificant punctuation but dont want to jump by subwords. I dont think this would be to hard to do either, just have them options for each feature:

opts = {
  skipInsignificantPunctionations = false,
  jumpSubWords = true
}

These could be defaulted to true so that its not annoying to setup. This would be even more useful if you ever consider adding more features to the plugin. And it will allow you to be less constrained by which features you add. (you dont have to have everyone like the feature)

Relevant Screenshot

No response

Checklist

chrisgrieser commented 1 year ago

Makes sense. I added an option to disable the punctuation skipping:

require("spider").setup({
    skipInsignificantPunctuation = true
})

I didn't implement the disabling of movement by subwords since I assume that it is the core feature people are using this plugin for (if I am wrong on this, please open a new issue and I'll add an option for that later)

chrisgrieser commented 11 months ago

For instance if you want to skip insignificant punctuation but dont want to jump by subwords.

There is now an option to do exactly that