spellsitter.nvim icon indicating copy to clipboard operation
spellsitter.nvim copied to clipboard

@nospell query?

Open will opened this issue 4 years ago • 1 comments

In general I'm very happy with the string spellchecking you just merged in #57, however it'd be nice if calls to require like require "shellwords" didn't spellcheck shellwords

I think I've been able to figure out a query works to find those regions:

(call
  method: (identifier) @method_name
  (#eq? @method_name "require")
  arguments: ( argument_list (string (string_content) @nospell))
)

(though it's my first not trivial query, so not 100% sure)

Do you think it's feasible to also mark things as not needing spellchecking? Or really, is this something you'd consider either adding or accepting at all in the first place?

will avatar Jan 28 '22 14:01 will

I'm happy for us to implement something like @nospell (in the sense I would accept a PR) but we'd need to:

  1. Define exactly what it means and how it interacts with @spell. It might seem obvious, but it is more complex than you think.
  2. Actually implement it, which I'd imagine would be quite a bit more complicated than just @spell.

lewis6991 avatar Jan 28 '22 15:01 lewis6991