vim-prettier icon indicating copy to clipboard operation
vim-prettier copied to clipboard

WIP: detect js by shebang and run by filetype

Open coolaj86 opened this issue 1 year ago • 0 comments

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.

coolaj86 avatar Mar 06 '23 19:03 coolaj86