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

gopls support and error check #18847

Closed
1 task done
applicativesystem opened this issue Oct 8, 2024 · 6 comments
Closed
1 task done

gopls support and error check #18847

applicativesystem opened this issue Oct 8, 2024 · 6 comments
Labels
bug [core label] go Go programming language support language server failure Language server doesn't work as expected language server An umbrella label for all language servers

Comments

@applicativesystem
Copy link

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

Thank you for the development of the Zed editor, which is really fast and a good one. I want to say that i am using it for Go, Python, Julia and Javascript and although the gopls is working and show the language server but it doesnt show error as where the variable are missing or anything else when you save the file and before running the check.

If i do the same in Neovim then it shows that this static type is not possible and also what comabinations and error could be there while compiling the program. My Go configuration looks like this in the JSON.

 "Go": {
            "code_actions_on_format": {
                "source.organizeImports": true
            }
        },

can you help me with this. Thank you,
Gaurav

Environment

Linux gauravsablok 6.10.12-200.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Sep 30 21:38:25 UTC 2024 x86_64 GNU/Linux

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your Zed.log file to this issue.

Zed.log
@applicativesystem applicativesystem added admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue labels Oct 8, 2024
@notpeter
Copy link
Member

notpeter commented Oct 8, 2024

  1. Can you paste your zed environment ("zed: copy system specs to clipboard" from the command palette)?
  2. How did you install gopls? (can you try updating it -- we've seen issues which have been fixed in newer versions of gopls.
  3. Do you have an example file / minimal project which reproduces this issue?

@notpeter notpeter added go Go programming language support language server failure Language server doesn't work as expected language server An umbrella label for all language servers and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Oct 8, 2024
@applicativesystem
Copy link
Author

here are the system configuration attached.
Snapshot_2024-10-08_15-00-17

gopls was install as go install. I enabled the system and the inlay hints and it seems to pick up the language.

Additionally, do you have any suggestion as how to see the coloured brackets such as rainbow brackets as i cant see the bracket annotation in Zed.

Thank you Gaurav

@notpeter
Copy link
Member

notpeter commented Oct 8, 2024

  1. Can you update gopls? go install golang.org/x/tools/gopls@latest
  2. Can you confirm gopls is in your path by running gopls version?

For rainbow brackets see:

@applicativesystem
Copy link
Author

Yes, i just checked it and it is in the path and now it is working. Thank you for the suggestion. Any plans to add the rainbow brackets to the Zed code editor?. If you can show me how to add that then it will be very good.

Gaurav

@notpeter
Copy link
Member

notpeter commented Oct 9, 2024

You can vote 👍 to that issue (as you can see a lot of people want this too).
I don't have a timeline but needless to say it's on our radar.

@applicativesystem
Copy link
Author

Thank you and sure i would like to see that feature and i can vote. Let me know if you are building something and i can add code to that. You can look at what i use for the same.

Thank you,
Gaurav

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [core label] go Go programming language support language server failure Language server doesn't work as expected language server An umbrella label for all language servers
Projects
None yet
Development

No branches or pull requests

2 participants