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

Linter Extend Tutorial #3274

Open
versacodes opened this issue Apr 29, 2024 · 1 comment
Open

Linter Extend Tutorial #3274

versacodes opened this issue Apr 29, 2024 · 1 comment

Comments

@versacodes
Copy link

Description of the problem or steps to reproduce

Where do I actually put this function to extend the linter??
Also, how does importing work in lua? I thought it uses "require"...

function init()
    linter.makeLinter("typescript", "ts", "tsc", {"--noEmit"}, "%f:%l:%c:.+: %m")
end

Specifications

micro v2.0.11
Commit hash:
OS: Debian 12
Terminal: kitty

@dmaluka
Copy link
Collaborator

dmaluka commented Apr 30, 2024

Where do I actually put this function to extend the linter??

To your ~/.config/micro/init.lua

Also, how does importing work in lua? I thought it uses "require"...

For importing those packages that are provided to lua by micro, micro provides its own import() function. It is described here.

In your case, if you just need to add this linter.makeLinter(), I think you don't need to import anything: linter is already imported, since the linter plugin is already loaded.

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