zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
46.87k stars 2.68k forks source link

Folder-specific settings in `.zed/settings.json` not applied #16684

Open corneliusio opened 3 weeks ago

corneliusio commented 3 weeks ago

Check for existing issues

Describe the bug / provide steps to reproduce it

When trying to apply configuration using the zed: open local settings none of the settings are applied to the project.

Environment

Zed: v0.149.3 (Zed) OS: macOS 14.6.1 Memory: 32 GiB Architecture: aarch64

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


notpeter commented 3 weeks ago
  1. Can you provide an example of the settings you are attempt to define that aren't working?
  2. Where is the location of your .zed (root of the workspace, etc)
corneliusio commented 3 weeks ago

I've tried a couple things. First I was trying to setup config for the pyright lsp:

{
    "lsp": {
        "pyright": {
            "settings": {
                "python": {
                    "pythonPath": "/Users/cornelius/.local/share/virtualenvs/417mag-2c6gINzP/bin/python"
                }
            }
        }
    }
}

This works when I put it in the main configuration, but not the local project config.

When that didn't work I just tried something simple like font size:

{
    "buffer_font_size": 22
}

And .zed/settings.json is setup at the root of the project.

corneliusio commented 2 weeks ago

@notpeter So following up on this, I've found that some settings do get applied when updated in the file, and some only get applied AFTER Zed gets restarted. The two above examples still behave as noted, but changing something like indent_guides applies immediately, and adding definitions to file_types will take effect, but only after restarting Zed.

So it appears that overall things are working as documented however there's not a lot of clarity about what can and cannot be defined on a project level. Additionally, it seems like the need to adjust LSP settings on a project level would not be all that uncommon and perhaps should be one of the settings that can be adjusted in local settings.