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

Feature request: per-language settings #10432

Closed
siegebell opened this issue Aug 11, 2016 · 5 comments
Closed

Feature request: per-language settings #10432

siegebell opened this issue Aug 11, 2016 · 5 comments

Comments

@siegebell
Copy link

Feature request: per-language settings (split from #6918).

I propose one of the two following feature be added to settings.json:

  1. Allow certain editor settings to be configured per language. Example:
"editor.language-specific" : [
  { "language": "java", "tabSize": 4 },
  { "language": ["haskell","**/*.ks"],
    "tabCompletion": false,
    "tabSize": 2
  }
]

or
2. Support a general mechanism for language-specific configuration. Settings, provided by vscode or extensions, may specify whether they are allowed to be language specific in their schema. Let workspace.getConfiguration take an optional language-id argument (where the default behavior is to return the language-agnostic setting). Example:

"language-specific" : [
  { "language": "java",
    "editor.tabSize": 4,
    "myextension.foo": false
  },
  { "language": ["haskell","**/*.ks"],
    "editor.tabCompletion": false,
    "editor.tabSize": 2,
    "myextension.foo": true
  }
]
@siegebell
Copy link
Author

@tobia wrote in #6918:

For example, I might want to use different values for editor.useTabStops, editor.trimAutoWhitespace, and the proposed editor.fontFeatures when I'm editing Python code vs. JSON files. I think this would make a lot of sense and is already provided by most programming editors, including Sublime Text.

@jrieken
Copy link
Member

jrieken commented Aug 11, 2016

@siegebell Anything not possible with editorconfig? https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig

@siegebell
Copy link
Author

@jrieken 1) per-language editor configuration 2) configuration of extensions 3) configuring per-language options globally rather than in a bunch of .editorconfig files scattered in subdirectories.

I imagine there are a bunch of other properties that would be nice to set but are not supported by TextEditorOptions (what EditorConfig wraps)... why is it so limited?

@alexdima
Copy link
Member

@siegebell Can we fold this into #1587 ?

@siegebell
Copy link
Author

@alexandrudima you're right, this seems to be a dup of #1587.

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants