-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
set a buffer's language at runtime #1794
Comments
Implementation-wise, this |
:set
a buffer's language
I think it might make more sense for this to be a regular typable command instead of part of the |
* Add set-language typable command to change the language of current buffer. * Add completer for available language options.
* Add set-language typable command to change the language of current buffer. * Add completer for available language options.
* Add runtime language configuration (#1794) * Add set-language typable command to change the language of current buffer. * Add completer for available language options. * Update set-language to refresh language server as well * Add language id based config lookup on `syntax::Loader`. * Add `Document::set_language3` to set programming language based on language id. * Update `Editor::refresh_language_server` to try language detection only if language is not already set. * Remove language detection from Editor::refresh_language_server * Move document language detection to where the scratch buffer is saved. * Rename Document::set_language3 to Document::set_language_by_language_id. * Remove unnecessary clone in completers::language
Currently a buffer's language is determined when opening the buffer by examining the filename, extension or contents. It would be useful to be able to pick a language at runtime, especially when editing a scratch buffer.
We should add an option to the
:set
typable command like:set language <language>
, and possibly have autocomplete for available languages.The text was updated successfully, but these errors were encountered: