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

do autocompletes to DivisionByZero on ENTER #187

Closed
wJoenn opened this issue Feb 18, 2024 · 8 comments
Closed

do autocompletes to DivisionByZero on ENTER #187

wJoenn opened this issue Feb 18, 2024 · 8 comments
Assignees
Labels

Comments

@wJoenn
Copy link

wJoenn commented Feb 18, 2024

Describe the bug
When pressing ENTER after opening a block with do, do gets completed to DivisionByZero automatically.
I have to CTRL + Z and repress ENTER for the new line to work as intended

To Reproduce
Open a block with do and press ENTER

Expected behavior
Pressing ENTER after do should not autocomplete into anything else and actually break a line

Piece of Code

arr = []
arr.each do

Screenshots

cr.cr.-.fullstack-challenges-crystal.WSL_.Ubuntu.-.Visual.Studio.Code.2024-02-18.12-20-57.mp4

Desktop (please complete the following information):

  • OS: Windows 10 with WSL:Ubuntu 22
  • Crystal version: v1.11.2
  • This plugin version: v0.9.1
@wJoenn
Copy link
Author

wJoenn commented Feb 18, 2024

I hope you guys are not thinking I'm spamming issues 🙏 .
I really wanna give Crystal a chance and share my experience with it to others but for that to happen the tooling has to be on par with another language's so I figured I might as well report everything I stumble upon

@nobodywasishere
Copy link
Member

I appreciate you reporting these bugs! It helps to know what problems people are running into.

Unfortunately with Crystal, the tooling isn't 100% there yet, and honestly I'm a little jealous of Ruby haha. It's one of the largest pain points of the language as it is and a reason a lot of people stop using it. I'm doing my best to help mitigate that but it's hard.

@wJoenn
Copy link
Author

wJoenn commented Feb 18, 2024

Crystal looks like everything I was looking for from a language so far so I'll do my best to improve mine and everyone's experience using it. I'm only able to write a few issues atm but if I still enjoy it in a few months' time I'll make sure to contribute to the ecosystem too.

Until then, I very much appreciate your efforts to improve it 🙌

@wJoenn
Copy link
Author

wJoenn commented Feb 18, 2024

It seems I no longer have the issue after installing Crystalline, as explained in #185 (comment) 👍

@wJoenn wJoenn closed this as completed Feb 18, 2024
@nobodywasishere
Copy link
Member

Thank you! I appreciate you taking the time to report issues you're having.

This is still an issue w/ the defaults so I'll leave this issue open for now - not everyone uses the extension with Crystalline (I don't personally).

@wJoenn
Copy link
Author

wJoenn commented Feb 20, 2024

@nobodywasishere I don't understand, you mean to say that the LSP is not required to run the extension ? 🤔
I thought this extension was made to enable the LSP on VSCode

@nobodywasishere
Copy link
Member

@nobodywasishere I don't understand, you mean to say that the LSP is not required to run the extension ? 🤔 I thought this extension was made to enable the LSP on VSCode

@wJoenn

This extension is partially to be able to use an LSP with Crystal, but this extension also provides other functionality, including some duplicate functionality to that normally provided by the LSP (syntax highlighting, go to definition, type information).

This extension also provides stuff like the spec integration (so you can view/run specs directly from vscode instead of cli, disabled by default). Personally, while I think the LSP is good, I find it can be slow and memory intensive (and for larger projects I turn off a lot of the features provided by this extension as well due to compile times / memory usage). All the features mentioned in the README are those that are available both with and without an LSP, assuming your project is setup correctly.

I'd recommend also checking out ameba, which also has a vscode extension that can be useful (similar to Rubocop).

@wJoenn
Copy link
Author

wJoenn commented Feb 20, 2024

Yeah I've given a try to ameba.
I've opened a couple PRs there too 😅

Thanks for fixing this so quickly Margret 🙌

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

No branches or pull requests

2 participants