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

why TypeScript tab_size 2 #11686

Open
1 task done
0x2CA opened this issue May 11, 2024 · 5 comments
Open
1 task done

why TypeScript tab_size 2 #11686

0x2CA opened this issue May 11, 2024 · 5 comments
Labels
defect [core label] language server An umbrella label for all language servers language An umbrella label for all programming languages syntax behaviors typescript TypeScript programming language support

Comments

@0x2CA
Copy link

0x2CA commented May 11, 2024

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

Why does TypeScript have a tab size of 2 without any settings?

default
image

no in languages
image

I don't know if it's a misunderstanding, I didn't set it separately in the language, the default is 4, it should be 4.

Of course the active add setting is working, just a quibble
image

Environment

Zed: v0.135.1 (Zed Preview)
OS: macOS 14.2.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 ~/Library/Logs/Zed/Zed.log file to this issue.

No response

@0x2CA 0x2CA added admin read Pending admin review defect [core label] triage Maintainer needs to classify the issue labels May 11, 2024
@Moshyfawn
Copy link
Contributor

I seem to recall that the Typescript LSP tab_size is set to 2 by default.

@Moshyfawn Moshyfawn added typescript TypeScript programming language support language An umbrella label for all programming languages syntax behaviors language server An umbrella label for all language servers and removed triage Maintainer needs to classify the issue labels May 11, 2024
@0x2CA
Copy link
Author

0x2CA commented May 12, 2024

These settings include User Settings, Default Settings, Project Settings, and the lsp settings within these settings, as well as the lsp Default Settings and the EditorConfig file, or any other lsp settings file.
Who should tab_size listen to, that overrides that? What is their priority? As it is now I think tab_size=4 in the settings should work unless it's set separately for lsp.

@JosephTLyons JosephTLyons removed the admin read Pending admin review label May 13, 2024
@maxdeviant
Copy link
Member

It's set at the language level:

@0x2CA
Copy link
Author

0x2CA commented May 17, 2024

In the setup there are languages and language_overrides and language_servers and lsp
I can't tell the difference.

@maxdeviant
Copy link
Member

In the setup there are languages and language_overrides and language_servers and lsp I can't tell the difference.

languages and language_overrides are the same; one is just an alias for the other.

language_servers is a setting that controls which language servers should run for a given language (and the order in which they should run, if using multiple). Typically this is set for an individual language.

The lsp setting is used to pass options to a particular language server, like initialization_options. Again, this is generally configured for a particular language.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect [core label] language server An umbrella label for all language servers language An umbrella label for all programming languages syntax behaviors typescript TypeScript programming language support
Projects
None yet
Development

No branches or pull requests

4 participants