nvimtools / none-ls.nvim

null-ls.nvim reloaded / Use Neovim as a language server to inject LSP diagnostics, code actions, and more via Lua.
The Unlicense
2.43k stars 72 forks source link

codespell failure #83

Closed m-abubakar closed 6 months ago

m-abubakar commented 6 months ago

FAQ

Issues

Neovim Version

v0.10.0-dev-2363+gb76a01055

Dev 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

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

mochaaP commented 6 months ago

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

mochaaP commented 6 months ago

https://github.com/nvimtools/none-ls.nvim/blob/b4bd764cd1705086de4bd89f7ccf9d9ed0401259/lua/null-ls/builtins/diagnostics/codespell.lua?plain=1#L27

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

m-abubakar commented 6 months ago

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. ☺️

mochaaP commented 6 months ago

Closed by #84