Skip to content

Instantly share code, notes, and snippets.

@NatoBoram
Last active November 11, 2022 17:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NatoBoram/0858a1ec28afad797862eb818c9dee9b to your computer and use it in GitHub Desktop.
Save NatoBoram/0858a1ec28afad797862eb818c9dee9b to your computer and use it in GitHub Desktop.
omerlo-cms-vscode
{
"recommendations": [
"bradlc.vscode-tailwindcss",
"dbaeumer.vscode-eslint",
"editorconfig.editorconfig",
"jakebecker.elixir-ls",
"pantajoe.vscode-elixir-credo",
"phoenixframework.phoenix",
"stylelint.vscode-stylelint"
]
}

Omerlo CMS VSCode Settings

Since we've removed editor configs from the project, some developers might find their VSCode acting according to their personal preferences instead of according to the project's preference.

This gist sets you up to use VSCode on Omerlo CMS without having to pollute your personal settings nor enforcing your preferences on the project.

Create a new .gitignore

This new .gitignore can be either global or project-specific. Here's a few options where you can create it.

# Directly inside the `.git` folder
cd ~/Code/github.com/Omerlo-Technologies/omerlo-cms
touch .git/.gitignore

# Somewhere safe
mkdir -p ~/Code/localhost/omerlo-cms/
touch ~/Code/localhost/omerlo-cms/.gitignore

# Globally
touch ~/.gitignore

Put something in it

You can use something like gitignore.io or just manually set the content you want for this file.

.vscode

Use it

cd ~/Code/github.com/Omerlo-Technologies/omerlo-cms

# Directly inside the `.git` folder
git config core.excludesFile .git/.gitignore

# Somewhere safe
git config core.excludesFile ~/Code/localhost/omerlo-cms/.gitignore

# Globally
git config --global core.excludesFile ~/.gitignore

Clone this gist

This gist contains the necessary extensions.json and settings.json for easy onboarding with Omerlo CMS and the closest approximation for the project's standards.

cd ~/Code/github.com/Omerlo-Technologies/omerlo-cms
git clone git@gist.github.com:0858a1ec28afad797862eb818c9dee9b.git .vscode

You can also unlink the .vscode folder from this gist.

cd ~/Code/github.com/Omerlo-Technologies/omerlo-cms
rm -rf .vscode/.git '.vscode/Omerlo CMS VSCode Settings.md'
{
"[css]": {
"editor.defaultFormatter": "stylelint.vscode-stylelint",
"editor.formatOnSave": false
},
"[css][html][javascript][json][jsonc][markdown][postcss][scss][svelte][typescript][xml][yaml]": {
"editor.minimap.maxColumn": 98,
"editor.rulers": [100]
},
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"[json][jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.formatOnSave": true,
"editor.insertSpaces": true,
"editor.minimap.maxColumn": 98,
"editor.rulers": [100],
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
"html.format.wrapAttributes": "preserve-aligned",
"html.format.wrapLineLength": 98,
"javascript.format.semicolons": "insert",
"prettier.printWidth": 98
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment