Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do you just disable linting without disabling the linter plugin? #2648

Open
PucklaJ opened this issue Nov 30, 2022 · 2 comments
Open

How do you just disable linting without disabling the linter plugin? #2648

PucklaJ opened this issue Nov 30, 2022 · 2 comments

Comments

@PucklaJ
Copy link

PucklaJ commented Nov 30, 2022

Description of the problem or steps to reproduce

I am not really a fan of linting in terminal based text editors. Therefore I wanted to disable it, but all I could do was disabling the linter plugin itself. But when disabling the linter plugin micro always complains about some unknown function when executing:

Plugin misspell: misspell:8: attempt to index a non-table object(nil) with key 'makeLinter'
stack traceback:
	misspell:8: in main chunk
	[G]: ?

Press enter to continue

Is there a way to just disable linting?

Specifications

Version: 2.0.11
Commit hash: 225927b
Compiled on August 09, 2022
OS: Garuda Linux (Arch)
Terminal: alacritty (fish)

@dmaluka
Copy link
Collaborator

dmaluka commented Nov 30, 2022

Looks like the problem is not with the linter plugin itself but with the misspell plugin which depends on the linter enabled. So it looks like you can just disable the misspell plugin too, and that will solve your problem (assuming that you don't need spell checking either).

I see the misspell plugin implementation is trivial and just calls the linter: https://github.com/micro-editor/updated-plugins/blob/master/micro-misspell-plugin/misspell.lua
Perhaps it can be slightly improved to prevent the issue you faced: if linter is nil (i.e. the linter plugin disabled), just do nothing.

@PucklaJ
Copy link
Author

PucklaJ commented Nov 30, 2022

Yes this works (I don't want spellchecking either in my case). But I will keep the issue open if someone wants to improve the misspell plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants