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

WIP: detect js by shebang and run by filetype #341

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

coolaj86
Copy link
Contributor

@coolaj86 coolaj86 commented Mar 6, 2023

Re: #340

Summary

Although these same lines work for me in my local config, This doesn't work directly in the vim-prettier plugin.

However, for someone who actually knows vimscript and how plugins work, I imagine understanding the intent and making the change for it to work will be trivial.

Test Plan

  1. Create the test file ./test-no-extension with these contents:
    ./test-no-extension
    #!/usr/bin/env node
    
    function main() {
    console.log('Hello');
    }
  2. Open the file
    vim ./test-no-extension
  3. Save the file
    :w

If it auto-formats, it worked.

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

Successfully merging this pull request may close these issues.

None yet

1 participant