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

Can't disable code actions #2169

Closed
skytwosea opened this issue Feb 6, 2025 · 4 comments
Closed

Can't disable code actions #2169

skytwosea opened this issue Feb 6, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@skytwosea
Copy link

skytwosea commented Feb 6, 2025

I'm working in Sublime Text 4.
I have looked high and low, and cannot find a way to turn off code actions. I want most of the functionality of ZLS, it is very helpful, except Don't Edit My Code. Ever, Anywhere, At All, Please.
The sublime console logs this as lsp_apply_document_edit
I have the following in my lsp config:
"lsp_apply_document_edit": false,
"lsp_format_on_save": false,
"lsp_code_actions_on_save": {
"source.fixAll": false,
"source.organizeImports": false,
},
"force_autofix": false,

Nothing seems to work.

Please tell me how I can get this to stop. This is so frustrating.

@skytwosea skytwosea added the enhancement New feature or request label Feb 6, 2025
@Techatrix
Copy link
Member

Could you first try the setup guide for ZLS in sublime text to see if it resolves your issue. This configuration does have code actions disabled by default.

If this did not help, the following information would be needed to nail down the issue:

  • Zig version and whether it is in your $PATH
  • ZLS version and whether it is in your $PATH
  • content of Zig.sublime-settings
  • content of LSP.sublime-settings
  • the ZLS log output

@Techatrix Techatrix added bug Something isn't working and removed enhancement New feature or request labels Feb 6, 2025
@skytwosea
Copy link
Author

@Techatrix My apologies for the incomplete and cranky issue, I should have waited until morning.

I'm going to purge & reinstall ZLS this afternoon when I have a moment, and then get back to you. Thank you for your prompt reply

@skytwosea
Copy link
Author

skytwosea commented Feb 8, 2025

@Techatrix I am watching my system warily and with slightly broken trust, but I think I have solved it. The full purge and reinstall bumped me up from zls 0.12 to 0.13 and the world makes sense again.

I actually use a pretty current version of Zig; right now 0.14.0-dev.3028+cdc9d65b0 and I try to keep up with changes on a ~monthly cadence. Looking forward to when ZLS 0.14.0 is released.

I'll come back if something surprising happens, but I think we are in the clear.

Last question: is there a documentations page somewhere? The features list on the github readme alludes to a lot of functionality but I've had a hell of a time looking. The only help I've found is other peoples' repos and config files. What is the best way to discover config option syntax?

@Techatrix
Copy link
Member

is there a documentations page somewhere?

You should checkout https://zigtools.org/zls/ for ZLS documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants