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

fix: remove outdated config on formatters, and detect by file type #582

Merged
merged 2 commits into from
Mar 6, 2023

Conversation

coolaj86
Copy link
Member

@coolaj86 coolaj86 commented Mar 6, 2023

It looks like the desired behavior now exists upstream, so we can remove our special edits.

~/.vim/pack/plugins/start/vim-shfmt/plugin/shfmt.vim

" ...
		autocmd BufWritePre *.sh Shfmt
		autocmd FileType sh autocmd BufWritePre <buffer> Shfmt
" ...

@coolaj86 coolaj86 changed the title fix(vim-shfmt): remove duplicate autocmd (now exists upstream) fix: remove outdated config on formatters, and detect by file type Mar 6, 2023
@coolaj86
Copy link
Member Author

coolaj86 commented Mar 6, 2023

I found this helpful to put into my ~/.vimrc for having vim-ale detect bun, deno and zx as javascript. It also seems to cause vim-prettier to detect deno and zx as javascript, but not bun 🤷‍♂️.

" set filetype to javascript by shebang
au BufRead,BufNewFile * if getline(1) =~ '#!/.*\<\(bun\|deno\|zx\)\>' | setfiletype javascript | endif

Copy link
Contributor

@jojobyte jojobyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

@coolaj86 coolaj86 merged commit 480a102 into main Mar 6, 2023
@coolaj86
Copy link
Member Author

coolaj86 commented Mar 6, 2023

Tracking at prettier/vim-prettier#340

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.

2 participants