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: Add solidity support #186

Open
otavioschwanck opened this issue Mar 25, 2022 · 2 comments
Open

Feature request: Add solidity support #186

otavioschwanck opened this issue Mar 25, 2022 · 2 comments

Comments

@otavioschwanck
Copy link

Would be nice to have, its very similar to vanilla JS

@AndrewRadev
Copy link
Owner

Could you share more details? What filetype should I use to enable support? Is there something built-in, or do you use some external plugin for filetype support (syntax, indent, etc)? If you can share that, I could try sourcing the javascript logic in that filetype.

You could also try that on your side to see how well it works, you'd need to create the file ~/.vim/filetype/<solidity's filetype>.vim that contains runtime ftplugin/javascript/splitjoin.vim.

@bogdan
Copy link

bogdan commented Jan 19, 2025

I tried that configuration. The problem encountered is trailing comma: it is not supported by solidity. I checked thedoc and it doesn't allow a buffer specific trailing comma settings, neither language specific one. By some reason it is only supported for ruby.

But this did work for me:

runtime ftplugin/javascript/splitjoin.vim
let b:splitjoin_trailing_comma = 0

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

No branches or pull requests

3 participants