Settings for every language


#1

I have just created a package that allows for per language/syntax settings which can be saved within the main config.cson. It works off the file extension at this point. An example can be found at the package page.

https://atom.io/packages/syntax-settings

EDIT:
I Just updated the package so that it now uses the grammar scopeName to specify what language the settings are for. Makes the package a lot better.

Update (11 Mar 2014):
The package is now far more stable. The structure for the settings is far better and the code has been refactored.


Per Language/Syntax Settings
#2

syntax-settings now loads the settings when a file is saved. So when you create new files the syntax settings are automatically loaded.

I also finally got around to adding some initial tests.


#3

This might be obvious, but I’m at a loss. I don’t know where to define my language settings for various languages. Like where would I put the files?

Could you add that to the package README?


#4

I’m also not sure where to place the settings. Looking at the package, it looks like the source: object is within the syntax-settings.coffee file under configureDefaults:

This is a great package, I really need it due to my workflow using coffee (tabLength: 2) and javascript (tabLength: 4)


#5

You place these settings in your main config file.

https://atom.io/docs/v0.60.0/customizing-atom#advanced-configuration

Here is my config file:


#6

Thanks! … and I love the feature/package.

– Owen


#7

Hi. This looks great!

Is it possible to have a language-specific setting to use a different theme?


#8

That’s a good question. Not that I am aware. At this point my focus is on the Editor/EditorView and GutterView settings and I don’t think it fits into any of those areas.


#9

I did find this, that could work.

atom.themes.setEnabledThemes(["base16-tomorrow-light-theme", "spacegray-dark-ui"])

I’m not really sure I want to add this yet though.