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

[Rust] Tweak tmPreferences #3195

Merged
merged 3 commits into from
Jan 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>name</key>
<string>Rust Comments</string>
<key>scope</key>
<string>source.rust</string>
<key>settings</key>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>name</key>
<string>Rust Indent</string>
<key>scope</key>
<string>source.rust</string>
<key>settings</key>
Expand Down
16 changes: 0 additions & 16 deletions Rust/RustSymbols.tmPreferences

This file was deleted.

22 changes: 22 additions & 0 deletions Rust/Symbol List.tmPreferences
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>scope</key>
<string>
entity.name.constant.rust,
entity.name.impl.rust,
entity.name.macro.rust,
entity.name.module.rust,
entity.name.struct.rust,
entity.name.trait.rust,
entity.name.union.rust
</string>
<key>settings</key>
<dict>
<key>showInSymbolList</key>
<integer>1</integer>
<key>showInIndexedSymbolList</key>
<integer>1</integer>
</dict>
</dict>
</plist>
32 changes: 32 additions & 0 deletions Rust/tests/symbols/syntax_test_symbols.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// SYNTAX TEST "Packages/Rust/Rust.sublime-syntax"

fn foo() {}
// @@@ definition

enum MyEnum {}
// @@@@@@ definition

macro_rules! my_macro []
// @@@@@@@@ definition

mod my_mod { }
// @@@@@@ definition

struct MyStruct {
// @@@@@@@@ definition

const A = 0;
// @ definition

fn bar() {}
// @@@ definition
}
Comment on lines +15 to +23
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is actually invalid syntax. What it should be is:

struct MyStruct {}
//     @@@@@@@@ definition

impl MyStruct {
    const A: i32 = 0;
//        @ definition

    fn bar() {}
//     @@@ definition
}


trait MyTrait {}
// @@@@@@@ definition

type MyType;
// @@@@@@ definition

union Union {}
// @@@@@ definition