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

Polish: Intellisense is a little too aggressive #290

Open
5 of 7 tasks
MaulingMonkey opened this issue Jul 4, 2017 · 2 comments
Open
5 of 7 tasks

Polish: Intellisense is a little too aggressive #290

MaulingMonkey opened this issue Jul 4, 2017 · 2 comments

Comments

@MaulingMonkey
Copy link
Collaborator

MaulingMonkey commented Jul 4, 2017

Edit: some of this was just from bugs: #293

This is a good problem to have ;). I'd like to gather some cases where intellisense should perhaps not trigger, or trigger with less information, partially by comparing against e.g. C#'s intellisense. I'm hopeful many of these can be solved with simple lexer checks. My partial list of differences I've discovered so far follows:

Differences

Rust C# Notes
let f var f Intellisense shouldn't try to autocomplete other identifiers when we're trying to define a new identifiers, although perhaps other keywords like mut would still be sane?
pub fn f public static void f Ditto
func( func( Intellisense shouldn't try to "help" us until we start typing a new identifier (signature help, on the other hand, is appropriate)
let a = ( var a = ( Ditto, minus the signature help.
foo. foo. Intellisense shouldn't display keywords when only identifiers will do

Equivalent

Rust C# Notes
let◄◄◄ var◄◄◄ Both seem to continue to display intellisense after typing an identifier occured, to my suprise.

Work list

  • Don't autocomplete new identifiers
  • Don't autocomplete newly opened argument lists (showing signature help instead is OK)
  • Don't autocomplete newly opened parenthetical groups (nor trigger new signature help)
  • Intellisense docs should display "summary", but not arguments, exceptions, etc. Rustdoc equivalent might be the first summary before any # ... headings.
  • Do autocomplete after scoping operators (., ::)
  • Signature help docs should also display exceptions, and the current argument. Rustdoc equivalent might be the addition of parsed # Arguments sections, and # Panics or # Failure sections.
  • Generic types and methods should display <>s in the intellisense list, even if no <>s are autocompleted.
@MaulingMonkey
Copy link
Collaborator Author

Some work done to fix this in MaulingMonkey@7b9f314#diff-d34d4bfb25c66e3dbd8f55cc2c8e38d5R90

I still want to look at other cases where intellisense triggers to compare them to the C# implementation...

@MaulingMonkey
Copy link
Collaborator Author

My changes introduced regressions: . and :: structural tokens generally shouldn't inhibit intellisense, even though ( and < should.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant