Skip to content

vim: Stop setting conceallevel in the syntax file #16486

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

Merged
merged 1 commit into from
Aug 15, 2014

Conversation

lilyball
Copy link
Contributor

We shouldn't be setting conceallevel in the syntax file. Besides not
being able to undo this if we switch to another syntax later, it also
interferes with embedding rust in other filetypes (such as markdown).

Instead, set it in the ftplugin, where it belongs.

We shouldn't be setting conceallevel in the syntax file. Besides not
being able to undo this if we switch to another syntax later, it also
interferes with embedding rust in other filetypes (such as markdown).

Instead, set it in the ftplugin, where it belongs.
@lilyball
Copy link
Contributor Author

cc @chris-morgan

@chris-morgan
Copy link
Member

The only change in functionality here is that the conceallevel setting can be reverted when switching to a different filetype—after/syntax/rust.vim skips itself if the conditions are not all met.

I’m ambivalent about this. At present all the conceal stuff (second-class, anyway) is in one file; this starts spreading the poison into other files (even if it’s “the right place to do it”).

@lilyball
Copy link
Contributor Author

Actually, this was motivated by syntax embedding. When I write a markdown file it embeds rust (because I have it configured for fenced code blocks) and that was causing it to unexpectedly enable conceal in the markdown file.

@chris-morgan
Copy link
Member

@kballard you mean after/syntax/rust.vim doesn’t get used with :syn-include?

@lilyball
Copy link
Contributor Author

It does, that's the problem. Which is why it shouldn't be setting conceallevel, that's something the "main" syntax should be controlling.

@chris-morgan
Copy link
Member

Sorry, I meant ftplugin/rust.vim. It doesn’t get used with :syn-include?

@lilyball
Copy link
Contributor Author

@chris-morgan Nope. That file is only included when the filetype is set to rust. :syn-include only sources the syntax file.

@chris-morgan
Copy link
Member

LGTM.

bors added a commit that referenced this pull request Aug 15, 2014
We shouldn't be setting conceallevel in the syntax file. Besides not
being able to undo this if we switch to another syntax later, it also
interferes with embedding rust in other filetypes (such as markdown).

Instead, set it in the ftplugin, where it belongs.
@bors bors closed this Aug 15, 2014
@bors bors merged commit 05e45b9 into rust-lang:master Aug 15, 2014
@lilyball lilyball deleted the vim_conceal branch August 15, 2014 21:54
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 18, 2024
internal: Set channel override when querying the sysroot metadata

This is pretty hard to discover, and makes the setting useless, we should probably enable it for now.

CC rust-lang#16486
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