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 request: shadow file / temporary file as when stdin = false #235

Open
FelipeLema opened this issue Aug 1, 2022 · 3 comments · May be fixed by #550
Open

Feature request: shadow file / temporary file as when stdin = false #235

FelipeLema opened this issue Aug 1, 2022 · 3 comments · May be fixed by #550

Comments

@FelipeLema
Copy link
Contributor

FelipeLema commented Aug 1, 2022

Hi, there

Great plugin you got going. I like it that it's easy to configure and/or extend since it's written in lua.

One thing I'm missing is being able to use a temporary file when stdin = false (namely, with mypy). This way I don't need to save my file to get lint the current buffer.

I think I can implement this if maintainers are open to dealing with opening pandora's box this rather complicated feature. My belief is that, while it may lead to lots of corner cases, these can and will be covered through usage within few months (ie: this is a feature that'll take some time to stabilize)

see neomake/neomake@4bb03bf

@mfussenegger
Copy link
Owner

I think this wouldn't be too hard and I could imagine that something like this would then also make it possible to run linters on portions of a file identified by tree-sitter injections/language-trees (e.g. you could lint a python block in a markdown document with the python linters)

I'm overall open to this, but seeing some upvotes to gauge interest would help

@petobens

This comment was marked as off-topic.

@dante0624
Copy link
Contributor

If anyone is looking to do this, conform is a similar plugin which managed to implement this feature. Their README says

-- Send file contents to stdin, read new contents from stdout (default true)
-- When false, will create a temp file (will appear in "$FILENAME" args). The temp
-- file is assumed to be modified in-place by the format command.```

@FelipeLema FelipeLema linked a pull request Mar 7, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants