Skip to content

Conversation

@dmaluka
Copy link
Collaborator

@dmaluka dmaluka commented Mar 24, 2024

unknown is a valid value for the filetype option (and executing set filetype unknown does what is expected: it forces filetype autodetection). So let's add unknown to the autocomplete suggestions for filetype, along with actual filetypes.

`unknown` is a valid value for the `filetype` option (and executing
`set filetype unknown` does what is expected: it forces filetype
autodetection). So let's add `unknown` to the autocomplete suggestions
for `filetype`, along with actual filetypes.
Copy link
Contributor

@Andriamanitra Andriamanitra left a comment

Choose a reason for hiding this comment

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

Good change, works as expected.

and executing set filetype unknown does what is expected: it forces filetype autodetection

That's definitely not what I thought it would do, but that's beside the point 😆

@dmaluka
Copy link
Collaborator Author

dmaluka commented Mar 25, 2024

Help says:

* `filetype`: sets the filetype for the current buffer. Set this option to
   `off` to completely disable filetype detection.

    default value: `unknown`. This will be automatically overridden depending
    on the file you open.

So, it does not explicitly say that unknown gets automatically overridden even when setting it manually with set filetype unknown, but one could guess so. :)

...Hmm, the off value is also documented. And unlike unknown, it doesn't work quite as expected: the filetype does change to off, but the syntax highlighting does not disappear.

It is also a documented special value of the `filetype` option.
@dmaluka
Copy link
Collaborator Author

dmaluka commented Mar 25, 2024

...Hmm, the off value is also documented. And unlike unknown, it doesn't work quite as expected: the filetype does change to off, but the syntax highlighting does not disappear.

Pushed d64c944 to autocomplete it as well, and pushed #3216 to fix its behavior.

@dmaluka dmaluka merged commit d96f060 into zyedidia:master Mar 25, 2024
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.

3 participants