Visual Studio Intellisense - Autocomplete and Whitespace

75 views
Skip to first unread message

Sir.De...@gmail.com

unread,
Mar 22, 2008, 9:33:58 AM3/22/08
to Nemerle Forum
Perhaps I am doing something wrong but it seems that auto-complete
(and parsing too, sometimes i get false negatives before a successful
build) does not work properly if you use the indentation style to
organize your code.

It works perfectly if you use braces but I much prefer using
whitespace to braces. Any suggestions?

Cheers

Sir.De...@gmail.com

unread,
Mar 22, 2008, 10:10:59 AM3/22/08
to Nemerle Forum
Right so it does work with indentation after all. The autocomplete
problem seems to be caused by some incompatibilty with indentation and
the parser. It seems to be expecting semicolons after every statement
which is not required in indent based code. Thus the code following
the statement with no semicolon will be crippled by the error and not
get auto-complete feature.

So for example this does not work

myfunction()
def foo = fooClass() <- exepecting ;
foo. [ auto-complete expecting semicolon above, broke and gives
when, with, blah]

while this does:

myfunction()
def foo = fooClass() ; foo. [ auto-complete is fine lists methods
in fooClass]

as does this

myfunction()
foo. [ auto-complete is fine lists methods in fooClass, say foo
was defined elsewhere]

Ivan A Eryshov

unread,
Mar 22, 2008, 2:15:01 PM3/22/08
to nemer...@googlegroups.com
You are right, an identation style not supported by the VS integration.

VladD2

unread,
Mar 22, 2008, 2:15:17 PM3/22/08
to nemer...@googlegroups.com
2008/3/22, Sir.De...@gmail.com <Sir.De...@gmail.com>:

> Perhaps I am doing something wrong but it seems that auto-complete
> (and parsing too, sometimes i get false negatives before a successful
> build) does not work properly if you use the indentation style to
> organize your code.

Yes. It depend on implementation of indentation style. See
http://nemerle.org/bugs/view.php?id=792

I think we need add new file extension, for example .nident (or .ni).
File with this extension should be parsed as indentation style.

Sir.De...@gmail.com

unread,
Mar 30, 2008, 3:08:19 PM3/30/08
to Nemerle Forum
Its not too big a deal. putting a semicolon ; on the line of code
before allows me to have auto complete on inferred types and all that
good stuff. Afterwards I just take it off. heh.

Something else interesting though minor is that if you make a macro
project and then have another project add it as a reference in your
solution then that project loses all of the VS integration abilities
including; auto complete, error detection, syntax highlighting, scope
collapsing,.. .

Workarounds are:

- Remove referenced macro project every time before opening files in
IDE for Dependant project <- really annoying

- Or what i do, which is have the project be in the same solution but
add a reference to the binary on disk instead of to the project.

On Mar 22, 7:15 pm, VladD2 <v...@rsdn.ru> wrote:
> 2008/3/22, Sir.Deeni...@gmail.com <Sir.Deeni...@gmail.com>:
>
> > Perhaps I am doing something wrong but it seems that auto-complete
> > (and parsing too, sometimes i get false negatives before a successful
> > build) does not work properly if you use the indentation style to
> > organize your code.
>
> Yes. It depend on implementation of indentation style. Seehttp://nemerle.org/bugs/view.php?id=792

VladD2

unread,
Mar 31, 2008, 7:55:10 AM3/31/08
to nemer...@googlegroups.com
2008/3/30, Sir.De...@gmail.com <Sir.De...@gmail.com>:

> Something else interesting though minor is that if you make a macro
> project and then have another project add it as a reference in your
> solution then that project loses all of the VS integration abilities
> including; auto complete, error detection, syntax highlighting, scope
> collapsing,.. .

You should only recompile solution.

> - Or what i do, which is have the project be in the same solution but
> add a reference to the binary on disk instead of to the project.

Use project reference instead of dll reference.

Reply all
Reply to author
Forward
0 new messages