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

feature: Possibly generate luacheckrc or selene configs of the neovim API? #171

Open
1 task done
nogweii opened this issue Dec 24, 2023 · 4 comments
Open
1 task done
Labels
enhancement New feature or request

Comments

@nogweii
Copy link

nogweii commented Dec 24, 2023

Did you check the docs?

  • I have read all the neodev.nvim docs

Is your feature request related to a problem? Please describe.

I'd like to use a CLI linter like luacheck or selene but with the correct knowledge of Neovim's APIs.

Describe the solution you'd like

A generated file that can be referenced/included in the configuration for these tools that has all of the functions spelled out.

Describe alternatives you've considered

Configure the tools to not care deeply about the vim global. This works just fine today, but it'd be neat.

Additional context

To configure luacheck, you'd need to create a file that contains all of the globals and their fields, and mark which ones are read-only and not. Details on the syntax is in their documentation.

To configure selene, they have migrated to a YAML-based format to describe an API. This seems to include support for types, which provides an overlapping / more through feature.

@nogweii nogweii added the enhancement New feature or request label Dec 24, 2023
@wookayin
Copy link

I believe this has nothing to do with neodev.nvim at all. Should you need any linter/formatting tool, you should install them separately outside neovim.

@nogweii
Copy link
Author

nogweii commented Feb 16, 2024

Should you need any linter/formatting tool, you should install them separately outside neovim.

Oh, I'm not advocating for neodev to install them automatically. However, a bunch of work has been done to add a lot of types for the neovim api, can that work be reused to generate the configuration file(s) for these linters?

@wookayin
Copy link

Sorry, I don't think I get what you are meaning. Would you mind describing more clearly? What are those "work" and "these linters"?

If you need a rc file for stylua or other linters, you will need to configure them separately for your project. Like copy-paste from https://github.com/neovim/neovim/blob/master/.luacheckrc; what does neovim have to do with what you want to achieve here?

@agoodshort
Copy link

Like copy-paste from https://github.com/neovim/neovim/blob/master/.luacheckrc;

Just curious, is this something actually recommended in the community? Are there any "standards" for neovim plugin linting?

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

No branches or pull requests

3 participants