Skip to content

Commit

Permalink
Merge pull request #63 from SublimeText/feature/laundry
Browse files Browse the repository at this point in the history
Various cleanups for the next release, grouped in a single PR
  • Loading branch information
FichteFoll authored Aug 7, 2024
2 parents 9d53736 + 374fe45 commit f2d8046
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 4,627 deletions.
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,35 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## Unreleased

### Added

- Declare hyphens as sub-word separators.
- Special highlighting for `for_each` and `count` meta arguments.
- Highlighting of more special language variables: `each`, `count` and `self`.

### Changed

- Switch to Syntax version 2. This breaks compatibility with ST builds before 4000!
- Adapt and improve many scope names to standards that have been established
over the past years for the default packages,
including:
* String interpolation meta scopes and punctuation
* Keywords (declarations and `in` inside a `for` expression)
* Attribute access punctuation
* Punctuation scopes in `for` expressions
- Updated the built-in function list for highlighting.

### Removed

- Various files targetting older ST versions,
notably the old `.tmLanguage` syntax definition.

### Fixed

- Improved matching of identifiers by adding a scope and properly recognizing hyphens.

---

## v1.0.0 - 2020-01-20

A huge thanks to @patrickrgaffney for this amazing contribution. [#39](https://github.com/alexlouden/Terraform.tmLanguage/pull/39)
Expand Down
5 changes: 4 additions & 1 deletion HCL.sublime-settings
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"tab_size": 2,
"translate_tabs_to_spaces": true
"translate_tabs_to_spaces": true,
// Move '-' to sub-word separators
"word_separators": "./\\()\"':,.;<>~!@#$%^&*|+=[]{}`~?",
"sub_word_separators": "_-",
}
3 changes: 2 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
MIT License

Copyright (c) 2016 Alex Louden
Copyright (c) 2024 FichteFoll <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -18,4 +19,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
Terraform Syntax Highlighting And Snippets
==========================================

Basic support for Terraform's [custom .tf file type](http://www.terraform.io/docs/configuration/syntax.html), along with snippets for each of the basic Terraform resource types.

This [Sublime Text](https://sublimetext.com/) package
provides basic support for Terraform's [custom `.tf` file type](http://www.terraform.io/docs/configuration/syntax.html),
along with snippets for each of the basic Terraform resource types.

![screenshot](screenshot.png)

Expand All @@ -12,15 +13,15 @@ Installation

### Using Package Control

1. Having [Package Control](https://packagecontrol.io/installation) installed
1. Install [Package Control](https://packagecontrol.io/installation), if needed.
2. Open the palette by pressing `Ctrl+Shift+P` (Win, Linux) or `Cmd+Shift+P` (OS X).
3. Select _"Package Control: Install package"_
4. Select _"Terraform"_

### Manually

1. Open the Sublime Text Packages folder
- OS X: `~/Library/Application Support/Sublime Text 3/Packages/`
- Windows: `%APPDATA%/Sublime Text 3/Packages/`
- Linux (Ubuntu/Debian): `~/.config/sublime-text-3/Packages/`
- OS X: `~/Library/Application Support/Sublime Text/Packages/`
- Windows: `%APPDATA%/Sublime Text/Packages/`
- Linux (Ubuntu/Debian): `~/.config/sublime-text/Packages/`
2. Clone this repo
5 changes: 4 additions & 1 deletion Terraform-vars.sublime-settings
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"tab_size": 2,
"translate_tabs_to_spaces": true
"translate_tabs_to_spaces": true,
// Move '-' to sub-word separators
"word_separators": "./\\()\"':,.;<>~!@#$%^&*|+=[]{}`~?",
"sub_word_separators": "_-",
}
Loading

0 comments on commit f2d8046

Please sign in to comment.