-
Notifications
You must be signed in to change notification settings - Fork 31k
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
Detect Language Mode from Modeline Comment #1651
Comments
I am writing a modelines plugin that will support vim/emacs modelines as well as a Code-specific syntax. It's working fine for tabs/spaces and tab width settings, but I don't believe there is a way to set the language yet through the (documented) API. Can anyone more familiar with it than I am confirm whether this is the case? If it's not possible then I guess I will have to release the plugin without this functionality and add it when there is an API for it. |
The extension is published, if anyone is interested. |
@bloudraak You might also be interested in my new Vagrant extension 😉 : |
This would be awesome to have. I regularly have ext-less files around in various projects of mine or other that get |
I have many files that I need to be able to set the filetype/language/whatever based on a modeline. I have done this in SublimeText for years using an extension that enables it. From reading here it seems that what's needed is for the plugin API to support setting the language mode and then this functionality could be properly implemented. It would be great to see this! |
This issue has been closed because it is not within the scope of the core product, but could be addressed by an extension. The VS Code Marketplace shows all existing extensions and you can get started writing your own extension in a few simple steps. See also our issue reporting guidelines. Happy Coding! |
True, but only insofar as #1800 is ever going to be resolved. |
I use Vagrant a bit. The file
Vagrantfile
is extensionless and as a result is shown as plain text. The file is actually a ruby script. You can see it in the comments; something vim and vi support.It would be extremely useful if VisualStudio Code could honor those settings and display the file in the correct language mode. It would even be better if other settings, like tab length etc could be honored. I'm assuming the latter will overwrite the workspace and user settings.
Modeline magic
http://vim.wikia.com/wiki/Modeline_magic
The text was updated successfully, but these errors were encountered: