nvimtools / none-ls.nvim

null-ls.nvim reloaded / Use Neovim as a language server to inject LSP diagnostics, code actions, and more via Lua.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

codespell failure

m-abubakar opened this issue · comments

FAQ

  • I have checked the FAQ and it didn't resolve my problem.

Issues

  • I have checked existing issues and there are no issues with the same problem.

Neovim Version

v0.10.0-dev-2363+gb76a01055

Dev Version?

  • I am using a stable Neovim release version, or if I am using a dev version of Neovim I have confirmed that my issue is reproducible on a stable version.

Operating System

Both Windows and Linux

Minimal Config

default LunarVim

Steps to Reproduce

codespell fails when words have special characters in them. i.e: Re**-**arrange

[null-ls] failed to run generator: ...e-ls.nvim/lua/null-ls/builtins/diagnostics/codespell.lua:37: attempt to perform arithmetic on local 'end_col' (a nil value)

I have been using a patch for quite some time. So I thought I should share it 😊

Reproducibility Check

  • I confirm that my minimal config is based on the minimal_init.lua template and that my issue is reproducible by running nvim --clean -u minimal_init.lua and following the steps above.

Expected Behavior

Special characters should be escaped.

Actual Behavior

Error when Special characters in words

Debug Log

[null-ls] failed to run generator: ...e-ls.nvim/lua/null-ls/builtins/diagnostics/codespell.lua:37: attempt to perform arithmetic on local 'end_col' (a nil value)

Help

Yes

Implementation Help

No response

Requirements

  • I have read and followed the instructions above and understand that my issue will be closed if I did not provide the required information.

I didn't see a patch. Is it included here?

local pat_diag = "(%d+): - [^\n]+\n\t((%S+)[^\n]+)"

It might be an issue with the regex, but since I don't use codespell I have no idea about this.
Also, this builtin has been unmaintained since 2021, so any help is appreciated :)

/cc the original author @Cenobantur

Sorry, I got a little sick and had to rest for a while.

I have attached the PR now. Please verify and let me know if you see any improvements can be made. ☺️

Closed by #84