├── icon.png ├── source ├── index.ts ├── nestable │ ├── index.ts │ ├── data.ts │ ├── array.ts │ ├── key_value.ts │ └── table.ts ├── first-class │ ├── index.ts │ ├── comment.ts │ ├── literal.ts │ ├── datetime.ts │ ├── string.ts │ └── number.ts └── build.ts ├── extension ├── extension-browser.ts ├── extension.ts ├── toml.configuration.json └── toml.tmLanguage.json ├── .vscodeignore ├── .gitignore ├── tslint.json ├── test ├── showtime.toml └── readme.toml ├── README.md ├── package.json ├── tsconfig.json └── License.md /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oovm/vscode-toml/HEAD/icon.png -------------------------------------------------------------------------------- /source/index.ts: -------------------------------------------------------------------------------- 1 | export * from './first-class' 2 | export * from './nestable' -------------------------------------------------------------------------------- /extension/extension-browser.ts: -------------------------------------------------------------------------------- 1 | export function activate() { 2 | /* NOP for browser */ 3 | } 4 | -------------------------------------------------------------------------------- /.vscodeignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | !node_modules/toml_vscode/ 3 | source/ 4 | test/ 5 | extension/extension.ts -------------------------------------------------------------------------------- /source/nestable/index.ts: -------------------------------------------------------------------------------- 1 | export * from './array' 2 | export * from './table' 3 | export * from './data' 4 | export * from './key_value' -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # IDEs 2 | .vscode 3 | .idea 4 | .vs 5 | 6 | # Bin 7 | *.vsix 8 | 9 | # Node 10 | node_modules 11 | dist/ 12 | yarn.lock 13 | yarn-error.log -------------------------------------------------------------------------------- /source/first-class/index.ts: -------------------------------------------------------------------------------- 1 | export * from './literal' 2 | export * from './number' 3 | export * from './string' 4 | export * from './datetime' 5 | export * from './comment' 6 | 7 | -------------------------------------------------------------------------------- /source/nestable/data.ts: -------------------------------------------------------------------------------- 1 | import { string, datetime, boolean, number, illegal } from '../first-class' 2 | import { array } from './array' 3 | import { table_inline } from './table' 4 | 5 | export const data: any = { 6 | patterns: [].concat(table_inline, array, string, datetime, boolean, number), 7 | } -------------------------------------------------------------------------------- /source/first-class/comment.ts: -------------------------------------------------------------------------------- 1 | export const comment: any = { 2 | captures: { 3 | 1: { 4 | name: 'comment.line.number-sign.toml', 5 | }, 6 | 2: { 7 | name: 'punctuation.definition.comment.toml', 8 | }, 9 | }, 10 | comment: 'Comments', 11 | match: '\\s*((#).*)$', 12 | } -------------------------------------------------------------------------------- /source/first-class/literal.ts: -------------------------------------------------------------------------------- 1 | export const boolean: any = [ 2 | { 3 | match: '(?"] 25 | ], 26 | "autoCloseBefore": ";:.,=}])>` \n\t", 27 | "folding": { 28 | "markers": { 29 | "start": "^\\s*//\\s*#?region\\b", 30 | "end": "^\\s*//\\s*#?endregion\\b" 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "semicolon": [ 4 | true, 5 | "never" 6 | ], 7 | "quotemark": [ 8 | true, 9 | "single", 10 | "avoid-escape", 11 | "avoid-template" 12 | ], 13 | "indent": [ 14 | true, 15 | "spaces", 16 | 4 17 | ], 18 | "object-literal-key-quotes": [ 19 | true, 20 | "consistent-as-needed" 21 | ], 22 | "no-var-requires": true, 23 | "member-access": false, 24 | "trailing-comma": [ 25 | true, 26 | { 27 | "multiline": "always", 28 | "singleline": "never" 29 | } 30 | ] 31 | }, 32 | "linterOptions": { 33 | "exclude": [ 34 | "dist/**", 35 | "node_modules/**", 36 | "*.d.ts" 37 | ] 38 | } 39 | } -------------------------------------------------------------------------------- /source/first-class/datetime.ts: -------------------------------------------------------------------------------- 1 | const local_time = { 2 | name: 'constant.other.time.toml', 3 | match: /\d{2}:\d{2}:\d{2}(?:\.\d+)?/.source, 4 | } 5 | 6 | const local_date = { 7 | name: 'constant.other.date.toml', 8 | match: /\d{4}\-\d{2}\-\d{2}/.source, 9 | } 10 | 11 | const local_date_time = { 12 | captures: { 13 | 1: { 14 | name: 'constant.other.datetime.local.toml', 15 | }, 16 | }, 17 | match: '(\\d{4}\\-\\d{2}\\-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?)', 18 | } 19 | 20 | const offset_date_time = { 21 | captures: { 22 | 1: { 23 | name: 'constant.other.datetime.offset.toml', 24 | }, 25 | }, 26 | match: '(? Covered Software is provided under this License on an “as is” 259 | > basis, without warranty of any kind, either expressed, implied, or 260 | > statutory, including, without limitation, warranties that the 261 | > Covered Software is free of defects, merchantable, fit for a 262 | > particular purpose or non-infringing. The entire risk as to the 263 | > quality and performance of the Covered Software is with You. 264 | > Should any Covered Software prove defective in any respect, You 265 | > (not any Contributor) assume the cost of any necessary servicing, 266 | > repair, or correction. This disclaimer of warranty constitutes an 267 | > essential part of this License. No use of any Covered Software is 268 | > authorized under this License except under this disclaimer. 269 | 270 | ### 7. Limitation of Liability 271 | 272 | > Under no circumstances and under no legal theory, whether tort 273 | > (including negligence), contract, or otherwise, shall any 274 | > Contributor, or anyone who distributes Covered Software as 275 | > permitted above, be liable to You for any direct, indirect, 276 | > special, incidental, or consequential damages of any character 277 | > including, without limitation, damages for lost profits, loss of 278 | > goodwill, work stoppage, computer failure or malfunction, or any 279 | > and all other commercial damages or losses, even if such party 280 | > shall have been informed of the possibility of such damages. This 281 | > limitation of liability shall not apply to liability for death or 282 | > personal injury resulting from such party's negligence to the 283 | > extent applicable law prohibits such limitation. Some 284 | > jurisdictions do not allow the exclusion or limitation of 285 | > incidental or consequential damages, so this exclusion and 286 | > limitation may not apply to You. 287 | 288 | 289 | ### 8. Litigation 290 | 291 | Any litigation relating to this License may be brought only in the 292 | courts of a jurisdiction where the defendant maintains its principal 293 | place of business and such litigation shall be governed by laws of that 294 | jurisdiction, without reference to its conflict-of-law provisions. 295 | Nothing in this Section shall prevent a party's ability to bring 296 | cross-claims or counter-claims. 297 | 298 | 299 | ### 9. Miscellaneous 300 | 301 | This License represents the complete agreement concerning the subject 302 | matter hereof. If any provision of this License is held to be 303 | unenforceable, such provision shall be reformed only to the extent 304 | necessary to make it enforceable. Any law or regulation which provides 305 | that the language of a contract shall be construed against the drafter 306 | shall not be used to construe this License against a Contributor. 307 | 308 | 309 | ### 10. Versions of the License 310 | 311 | #### 10.1. New Versions 312 | 313 | Mozilla Foundation is the license steward. Except as provided in Section 314 | 10.3, no one other than the license steward has the right to modify or 315 | publish new versions of this License. Each version will be given a 316 | distinguishing version number. 317 | 318 | #### 10.2. Effect of New Versions 319 | 320 | You may distribute the Covered Software under the terms of the version 321 | of the License under which You originally received the Covered Software, 322 | or under the terms of any subsequent version published by the license 323 | steward. 324 | 325 | #### 10.3. Modified Versions 326 | 327 | If you create software not governed by this License, and you want to 328 | create a new license for such software, you may create and use a 329 | modified version of this License if you rename the license and remove 330 | any references to the name of the license steward (except to note that 331 | such modified license differs from this License). 332 | 333 | #### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses 334 | 335 | If You choose to distribute Source Code Form that is Incompatible With 336 | Secondary Licenses under the terms of this version of the License, the 337 | notice described in Exhibit B of this License must be attached. 338 | 339 | ## Exhibit A - Source Code Form License Notice 340 | 341 | This Source Code Form is subject to the terms of the Mozilla Public 342 | License, v. 2.0. If a copy of the MPL was not distributed with this 343 | file, You can obtain one at http://mozilla.org/MPL/2.0/. 344 | 345 | If it is not possible or desirable to put the notice in a particular 346 | file, then You may include the notice in a location (such as a LICENSE 347 | file in a relevant directory) where a recipient would be likely to look 348 | for such a notice. 349 | 350 | You may add additional accurate notices of copyright ownership. 351 | 352 | ## Exhibit B - “Incompatible With Secondary Licenses” Notice 353 | 354 | This Source Code Form is "Incompatible With Secondary Licenses", as 355 | defined by the Mozilla Public License, v. 2.0. 356 | 357 | --------------------------------------------------------------------------------