ravibrock / spellwarn.nvim

Display spelling errors as diagnostics
MIT License
63 stars 1 forks source link

Plugin not working, how to debug? #4

Closed ktasper closed 3 months ago

ktasper commented 3 months ago

Hey,

First of all, this plugin looks amazing, its just what I am after. However I am having issues getting it to work.

This is how I am loading it via lazy

return {
  {
    'ravibrock/spellwarn.nvim',
    config = function()
      require('spellwarn').setup {

        event = { -- event(s) to refresh diagnostics on
          'CursorHold',
          'InsertLeave',
          'TextChanged',
          'TextChangedI',
          'TextChangedP',
          'TextChangedT',
        },
        ft_config = { -- spellcheck method: "cursor", "iter", or boolean
          alpha = false,
          help = false,
          lazy = false,
          lspinfo = false,
          mason = false,
        },
        ft_default = true, -- default option for unspecified filetypes
        max_file_size = nil, -- maximum file size to check in lines (nil for no limit)
        severity = { -- severity for each spelling error type (false to disable diagnostics for that type)
          spellbad = 'WARN',
          spellcap = 'HINT',
          spelllocal = 'HINT',
          spellrare = 'INFO',
        },
        prefix = 'possible misspelling(s): ', -- prefix for each diagnostic message
      }
    end,
  },
}

Yet when I do :Spellwarn enable nothing happens. For example


        -- heello
``` Does not show a warning, what can I do to debug this? I don't mind writing some docs once I understand what I am doing wrong.. Thanks.
ravibrock commented 3 months ago

That config snippet works for me. Did you set spell?

ktasper commented 3 months ago

I did not... after set spell it works. Strange I thought I had that set already, but apparently not. Maybe adding that to the README might help new users like myself ?

Thanks!

ravibrock commented 3 months ago

Sure, I can add a note about that. Glad I could help.