Skip to content

Conversation

@Sildra
Copy link

@Sildra Sildra commented Mar 19, 2013

New sort algo "type":

  • elements will be sorted by 'type index' then by name
  • 'type index' is currently defined by the textual representation of the kind
    • dependent of the values associated in the kinds dictionary

@xavierd
Copy link
Owner

xavierd commented Mar 19, 2013

The code looks correct, but why would you like to do that?

@Sildra
Copy link
Author

Sildra commented Mar 19, 2013

If you means why I would do kinds[x.kind.value] instead of x.kind.value, it's because for my case, I've renamed some of the associated values in the kinds dictionary so that the tree show types in this order when completing a class:

  • class (previously 4: 't')
  • ctor (24: '+')
  • dtor (25: '~')
  • func (8: 'f')
  • mmbr (6: 'm')
  • var (9: 'v')

I haven't added my changes to kinds because instead of using 1 char for displaying the type, it uses up to 6 chars (more understandable).
Example:
clang_type_sort

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.

2 participants