diff --git a/CHANGELOG.md b/CHANGELOG.md index 989b0358c..98ee2e0d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ## [0.1.4] Next release +### Added +- COBOL language configuration for highlighting matching brackets and auto-insertion of line numbers in fixed- format code [#330](https://github.com/OCamlPro/superbol-studio-oss/pull/330) + +### Fixed +- Word wrapping in presence of hyphens [#330](https://github.com/OCamlPro/superbol-studio-oss/pull/330) + ## [0.1.3] Fourth α release (2024-07-24) diff --git a/package.json b/package.json index f66c24e20..47f578fd6 100644 --- a/package.json +++ b/package.json @@ -394,7 +394,8 @@ ], "filenamePatterns": [ "*.[cC]{ob,OB,bl,BL,py,PY,bx,BX}" - ] + ], + "configuration": "./syntaxes/language-configuration.json" } ], "problemMatchers": [ diff --git a/src/lsp/superbol_free_lib/vscode_extension.ml b/src/lsp/superbol_free_lib/vscode_extension.ml index b8ef208ce..2c5f0aaa1 100644 --- a/src/lsp/superbol_free_lib/vscode_extension.ml +++ b/src/lsp/superbol_free_lib/vscode_extension.ml @@ -97,6 +97,7 @@ let contributes = Manifest.language "cobol" ~aliases: [ "COBOL" ] ~filenamePatterns: [ "*." ^ cob_extensions_pattern ] + ~configuration: "./syntaxes/language-configuration.json" ] ~debuggers: [ Manifest.debugger "gdb" diff --git a/syntaxes/language-configuration.json b/syntaxes/language-configuration.json new file mode 100644 index 000000000..bb262990a --- /dev/null +++ b/syntaxes/language-configuration.json @@ -0,0 +1,14 @@ +{ + "wordPattern": "[a-zA-Z0-9_-]+", + "brackets": [ + ["{", "}"], + ["[", "]"], + ["(", ")"] + ], + "onEnterRules": [ + { + "beforeText": "^[0-9]{6}.*", + "action": { "indent": "none", "appendText": "000000 " } + } + ] +}