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

Add support for rust-analyzer #2837

Merged
merged 10 commits into from
May 5, 2020
Merged

Conversation

jonhoo
Copy link
Contributor

@jonhoo jonhoo commented Oct 16, 2019

Fixes #2832.

This is a very straightforward adaptation of the existing rls support.

w0rp
w0rp previously requested changes Oct 18, 2019
ale_linters/rust/analyzer.vim Outdated Show resolved Hide resolved
Copy link

@cwndrws cwndrws left a comment

Choose a reason for hiding this comment

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

This looks good, but I have no say. Just came here to make similar changes. Glad this is being done and hope it gets in soon!

doc/ale-rust.txt Outdated Show resolved Hide resolved
doc/ale-rust.txt Outdated Show resolved Hide resolved
@jonhoo
Copy link
Contributor Author

jonhoo commented Dec 11, 2019

Thanks! Fix pushed.

@syphar
Copy link

syphar commented Jan 3, 2020

@jonhoo thanks for doing this!

@kamek-pf
Copy link

kamek-pf commented Jan 3, 2020

@jonhoo I gave your branch a shot, RA seems to run as intended, but I can't get clippy to run.
I tried with let b:ale_rust_analyzer_config = {'rust': {'clippy_preference': 'on'}}
Maybe there's some sort of integration between rust analyzer and clippy to enable somewhere ?

@Arzte
Copy link

Arzte commented Apr 8, 2020

Heya is there any blockers on merging this?

@jonhoo
Copy link
Contributor Author

jonhoo commented Apr 8, 2020

Not on my part. I no longer use ale, but last I checked the patch worked fine :)
I think that this line may need to be updated if the server binary has gotten a new name (which I remember there being some discussion of):

call ale#Set('rust_analyzer_executable', 'ra_lsp_server')

It'd be good if someone actively using this could try it out and verify 👍

@Arzte
Copy link

Arzte commented Apr 8, 2020

Applied this patch to my local copy of ale and set it to use rust-analyzer, seems to be working perfectly for me. 👍
EDIT: Looks like it's not working after all, ALEInfo doesn't report analyzer as an enabled linter. I don't know enough about ALE to diagnose why, but I could try if someone has any advice to why it may not be working. (the server name is ra_lsp_server)

@Shadow53
Copy link

Shadow53 commented Apr 9, 2020

The upstream binary name for rust-analyzer has been changed to rust-analyzer. That may be why it didn't work for Arzte.

@jonhoo
Copy link
Contributor Author

jonhoo commented Apr 9, 2020

@Shadow53 thanks! I've pushed a commit that changes the default.

Copy link

@Arzte Arzte left a comment

Choose a reason for hiding this comment

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

Looks like it works now, was able to use rust-analyzer with ale without an issue.

test/command_callback/test_rust_analyzer_callbacks.vader Outdated Show resolved Hide resolved
@1wilkens
Copy link

1wilkens commented May 4, 2020

Anything blocking this? I would really like to use rust-analyzer "out-of-the-box" with ale :)

@jonhoo
Copy link
Contributor Author

jonhoo commented May 5, 2020

@1wilkens not as far as I am aware — this is ready to review/merge from my side.

Copy link
Member

@RyanSquared RyanSquared left a comment

Choose a reason for hiding this comment

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

LGTM.

@RyanSquared
Copy link
Member

Cheers! 🍻

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.

Support rust-analyzer
10 participants