Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

omni: racket should complete at end of keywords#4352

Merged
hsanson merged 1 commit intodense-analysis:masterdense-analysis/ale:masterfrom
benknoble:fix-racket-should-completebenknoble/ale:fix-racket-should-completeCopy head branch name to clipboard
Nov 5, 2022
Merged

omni: racket should complete at end of keywords#4352
hsanson merged 1 commit intodense-analysis:masterdense-analysis/ale:masterfrom
benknoble:fix-racket-should-completebenknoble/ale:fix-racket-should-completeCopy head branch name to clipboard

Conversation

@benknoble
Copy link
Copy Markdown
Contributor

Consider a file like

#lang racket
(require racket/gui)

Type Go(eventspace-.

Pressing to trigger omnicomplete should suggest

eventspace-handler-thread
eventspace-shutdown?
eventspace-event-evt

It does not (instead producing "top-level" completions, as if (eventspace- wasn't even there).

Debugging, place the cursor on a space after. Now ale#completion#OmniFunc(1, '') correctly returns 1, but when given (0, 'eventspace-') it returns either the empty list or generic completion results as described above. I'm not entirely sure of the mechanism, but it seems that b:ale_completion_info.prefix is the key, and that this is set by ale#completion#GetPrefix. Calling ale#completion#GetPrefix('racket', line('.'), col('.')) returned ''!

Now, it returns eventspace- and the completions work correctly again.

Ref #4293, #4186, #3870

Consider a file like
```
 #lang racket
(require racket/gui)
```
Type `Go(eventspace-`.

Pressing <C-x><C-o> to trigger omnicomplete should suggest
```
eventspace-handler-thread
eventspace-shutdown?
eventspace-event-evt
```

It does not (instead producing "top-level" completions, as if
`(eventspace-` wasn't even there).

Debugging, place the cursor on a space _after_. Now
`ale#completion#OmniFunc(1, '')` correctly returns `1`, but when given
`(0, 'eventspace-')` it returns either the empty list or generic
completion results as described above. I'm not entirely sure of the
mechanism, but it seems that `b:ale_completion_info.prefix` is the key,
and that this is set by `ale#completion#GetPrefix`. Calling
`ale#completion#GetPrefix('racket', line('.'), col('.'))` returned `''`!

Now, it returns `eventspace-` and the completions work correctly again.

Ref dense-analysis#4293, dense-analysis#4186, dense-analysis#3870
@benknoble benknoble force-pushed the fix-racket-should-complete branch from 09fd25e to 9a5cccd Compare November 3, 2022 16:22
@benknoble
Copy link
Copy Markdown
Contributor Author

/cc @hsanson

Copy link
Copy Markdown
Contributor

@hsanson hsanson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok. Assume @benknoble knows what is best for racket.

@hsanson hsanson merged commit 07bd24d into dense-analysis:master Nov 5, 2022
@benknoble benknoble deleted the fix-racket-should-complete branch October 4, 2023 19:22
mnikulin pushed a commit to mnikulin/ale that referenced this pull request Nov 12, 2023
Consider a file like
```
 #lang racket
(require racket/gui)
```
Type `Go(eventspace-`.

Pressing <C-x><C-o> to trigger omnicomplete should suggest
```
eventspace-handler-thread
eventspace-shutdown?
eventspace-event-evt
```

It does not (instead producing "top-level" completions, as if
`(eventspace-` wasn't even there).

Debugging, place the cursor on a space _after_. Now
`ale#completion#OmniFunc(1, '')` correctly returns `1`, but when given
`(0, 'eventspace-')` it returns either the empty list or generic
completion results as described above. I'm not entirely sure of the
mechanism, but it seems that `b:ale_completion_info.prefix` is the key,
and that this is set by `ale#completion#GetPrefix`. Calling
`ale#completion#GetPrefix('racket', line('.'), col('.'))` returned `''`!

Now, it returns `eventspace-` and the completions work correctly again.

Ref dense-analysis#4293, dense-analysis#4186, dense-analysis#3870
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.