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

Content assist issues (punctuation characters) #285

Open
Wikus86 opened this issue Jan 10, 2024 · 10 comments
Open

Content assist issues (punctuation characters) #285

Wikus86 opened this issue Jan 10, 2024 · 10 comments
Assignees
Milestone

Comments

@Wikus86
Copy link

Wikus86 commented Jan 10, 2024

Not sure if this is know, but I am experiencing two issues with content assist

  1. If you declare a procedure starting with '#', it seems to break the code completion.

Example

dcl-proc #testProc;
  dcl-pi *n ind;
    param char(30) const;
  end-pi;
end-proc;
  1. If you have a qualified ds that is an array, it seems to only pick up the reference to where the array is defined

Example

dcl-ds t_template template qualified;
  elem likeds(t_array) dim(10);
end-ds;

dcl-ds t_array template qualified;
  elem1 char(10);
  elem2 char(3);
  elem3 char(1);
end-ds;

dcl-ds ds_template likeds(t_template);

ds_template.elem(1)
@worksofliam
Copy link
Contributor

@Wikus86

it seems to break the code completion.

What does this mean?

@Wikus86
Copy link
Author

Wikus86 commented Jan 10, 2024

@Wikus86

it seems to break the code completion.

What does this mean?

Hi @worksofliam ,

So break probably not the correct words :).

So first thing i noticed is that when you hover over the proc and it it starts wih a '#' it does not pop up as below

image

and here is example with proc without the #

image

Then also, when hit "ctrl + space" it shows the proc in the list

image

but when you start typing '#t', it goes missing

image

Hope this clarifies it a bit.

@worksofliam
Copy link
Contributor

Note to self: there is a VS Code to add these characters to be treated as possible symbol characters in the VS Code API.

@worksofliam worksofliam added this to the 2024 features milestone Jan 17, 2024
@worksofliam worksofliam changed the title Content assist issues Content assist issues (punctuation characters) Jan 17, 2024
@worksofliam
Copy link
Contributor

Made an issue here: barrettotte/vscode-ibmi-languages#136

@chrjorgensen
Copy link
Contributor

@Wikus86

IMHO it's not a good practice to use the special characters #, @ and $ in variable and procedure names - actually, any name at all - due to the characters not being consistent across CCSID's.

For additional information, read this article by Bob Cozzi...

@Wikus86
Copy link
Author

Wikus86 commented Jan 22, 2024

@worksofliam ,

I am happy with that. I will just remove it from my procedures.

Btw, the issue I raised about the qualified data structure with an array, is not exactly accurate. Seems like if you have a qualified DS in a qualified DS, it only picks up until the second level. ie ds_example.field

Also picked up another small issue. Only on some of my internal procedures, if I declare a local work field, content assist does not pick up the work field, but in other internal proc's it works. I tried looking for a pattern why this will happen, but no luck as yet. Should I open a separate issue for this?

Otherwise the work you guys are doing is freaking awesome. Really enjoying using vs code these days.

@worksofliam
Copy link
Contributor

@Wikus86 no separate issue required, but if you could provide more examples I can test with that'd be great.

@Wikus86
Copy link
Author

Wikus86 commented Jan 23, 2024

Here is an exmaple of it not picking up the local workfield.

image

Another thing i noticed, linter picks up that it has not been references

image

@worksofliam
Copy link
Contributor

@Wikus86 Sorry to be a pain. Would you actually put that into a new issue for me? :)

@Wikus86
Copy link
Author

Wikus86 commented Jan 24, 2024

@Wikus86 Sorry to be a pain. Would you actually put that into a new issue for me? :)

No worries, will do

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

No branches or pull requests

3 participants