Skip to content

Conversation

@bjornasm
Copy link

@bjornasm bjornasm commented Jun 7, 2025

This is done for every language that has a syntaxfile by default. See issue #3770 . (Note that I have incorporated the feedback from that issue and include each syntaxfile rather than copy the content. I tried to make a master-file that contain all the includes, but nested includes seems to not be supported.

Copy link
Contributor

@Andriamanitra Andriamanitra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Syntax highlighting for Python (and a few others) code blocks doesn't work at all. At least part of the problem is that you seem to have used python3 (from the filename python3.yaml) rather than python (from the filetype: python specified inside the file).
    image

  • We should probably stick to 4 space indentation and use quotes (") around the regexes to be consistent with other syntax files.

  • The starting line should allow aliases like py for Python or rb for ruby. Github uses linguist for syntax highlighting inside markdown so that might be a good source for these aliases. 1 Another option to look at would be textmate syntax for markdown that is used by VS Code. 2 They seem to have some differences so I guess there is no actual standard.

  • comment is not the appropriate syntax group for code snippets. I'd change it to default to make the included syntaxes work properly. You can use limit-group: comment to make just the lines with backticks comment-colored.

  • I'm not sure if it's a great idea to include all syntaxes. A handful of most common ones would be good enough for vast majority of users and less likely to cause issues in the future.

Footnotes

  1. https://github.com/github-linguist/linguist/blob/main/lib/linguist/languages.yml

  2. https://github.com/microsoft/vscode/blob/c5ccd47affd5f5a2350aa7154e0a7d497f984f6c/extensions/markdown-basics/syntaxes/markdown.tmLanguage.json

@bjornasm
Copy link
Author

bjornasm commented Jun 8, 2025

  • Syntax highlighting for Python (and a few others) code blocks doesn't work at all. At least part of the problem is that you seem to have used python3 (from the filename python3.yaml) rather than python (from the filetype: python specified inside the file).
    image
  • We should probably stick to 4 space indentation and use quotes (") around the regexes to be consistent with other syntax files.
  • The starting line should allow aliases like py for Python or rb for ruby. Github uses linguist for syntax highlighting inside markdown so that might be a good source for these aliases. 1 Another option to look at would be textmate syntax for markdown that is used by VS Code. 2 They seem to have some differences so I guess there is no actual standard.
  • comment is not the appropriate syntax group for code snippets. I'd change it to default to make the included syntaxes work properly. You can use limit-group: comment to make just the lines with backticks comment-colored.
  • I'm not sure if it's a great idea to include all syntaxes. A handful of most common ones would be good enough for vast majority of users and less likely to cause issues in the future.

Footnotes

  1. https://github.com/github-linguist/linguist/blob/main/lib/linguist/languages.yml
  2. https://github.com/microsoft/vscode/blob/c5ccd47affd5f5a2350aa7154e0a7d497f984f6c/extensions/markdown-basics/syntaxes/markdown.tmLanguage.json

Thank you for the feedback @Andriamanitra !

I changed from comment to defaul, correctly referenced the filetype from the yaml file and reduced the number of languages (will be open for any suggestion regarding how many and which languages to choose).

I guess the regexes from VS code seems the easiest to adopt, if logic to handle several names for a language should be adopted from other sources? Right now I did just a quick mapping myself.

It seems like my vscode is auto-indenting everything after rules, but I comitted wihtout that now. Regarding limit-group: comment, I am not sure if I understand?

Again, thank you for taking your time.

@Andriamanitra
Copy link
Contributor

Andriamanitra commented Jun 8, 2025

It seems like my vscode is auto-indenting everything after rules

They should be indented, by 4 spaces (like they are in other syntax files and were in this one before this PR). The indentation size can be configured in VS Code (although why are you using VS Code over micro anyway? 😄 ).


Regarding limit-group: comment, I am not sure if I understand?

limit-group specifies the syntax group to use for the start and end tokens, eg. ```python and ```. For example the following syntax file

filetype: markdown

detect:
    filename: ".md$"

rules:
    - special: "^#{1,6}.*"
    - default:
        start: "```rb"
        end: "```"
        limit-group: comment
        rules:
            - include: ruby

gives highlighting like seen here on the left (compared to the one on the right without limit-group: comment – actually looks like there's a bug that causes limit-group to break most of the included rules so maybe we should avoid using that after all):

screenshot of syntax highlighting


will be open for any suggestion regarding how many and which languages to choose

Here we could again use what VS Code does as a starting point. I'm not sure if we want to support all of the same ones but at the very least I'd add css, diff (called patch in micro), ini, json, and yaml, because they're commonly seen embedded in markdown files.

Supported fenced code block types in VS Code

basic
bibtex
c
clojure
coffee
cpp
csharp
css
dart
diff
dockerfile
dosbatch
elixir
erlang
fsharp
git_commit
git_rebase
go
groovy
handlebars
ini
java
js
json
jsonc
js_regexp
julia
latex
less
log
lua
makefile
markdown
objc
perl
perl6
php
powershell
pug
python
r
regexp_python
ruby
rust
scala
scss
shell
sql
swift
ts
tsx
twig
unknown
vs_net
xml
xsl
yaml

@bjornasm
Copy link
Author

bjornasm commented Jun 8, 2025

They should be indented, by 4 spaces (like they are in other syntax files and were in this one before this PR). The indentation size can be configured in VS Code (although why are you using VS Code over micro anyway? 😄 ).

Good question ;)

Here we could again use what VS Code does as a starting point. I'm not sure if we want to support all of the same ones but at the very least I'd add css, diff (called patch in micro), ini, json, and yaml, because they're commonly seen embedded in markdown files.

Now I have fixed this, using the match patterns from vscode - however I seem to have som trouble getting the yaml syntax highlighting to work. I am sure there must be something misconfigured somewhere, but I cant find it. The yaml.yaml file works for syntax highlighting, the regex is the same for all other languages (which works)..

@usfbih8u
Copy link
Contributor

usfbih8u commented Jun 8, 2025

A long time ago, I made a script that generates a markdown syntax file with all the syntaxes available in the editor for one of the plugins I use.

This is the output (does not use special regex for the start):

markdown.yaml
filetype: markdown

detect:
    filename: "\\.(livemd|md|mkd|mkdn|markdown)$"

rules:
    # Tables (Github extension)
    - type: ".*[ :]\\|[ :].*"

      # quotes
    - statement:  "^>.*"

      # Emphasis
    - type: "(^|[[:space:]])(_[^ ][^_]*_|\\*[^ ][^*]*\\*)"

      # Strong emphasis
    - type: "(^|[[:space:]])(__[^ ][^_]*__|\\*\\*[^ ][^*]*\\*\\*)"

      # strike-through
    - type: "(^|[[:space:]])~~[^ ][^~]*~~"

      # horizontal rules
    - special: "^(---+|===+|___+|\\*\\*\\*+)\\s*$"

      # headlines
    - special:  "^#{1,6}.*"

      # lists
    - identifier:   "^[[:space:]]*[\\*+-] |^[[:space:]]*[0-9]+\\. "

      # misc
    - preproc:   "(\\(([CcRr]|[Tt][Mm])\\)|\\.{3}|(^|[[:space:]])\\-\\-($|[[:space:]]))"

      # links
    - constant: "\\[[^]]+\\]"
    - constant: "\\[([^][]|\\[[^]]*\\])*\\]\\([^)]+\\)"

      # images
    - underlined: "!\\[[^][]*\\](\\([^)]+\\)|\\[[^]]+\\])"

      # urls
    - underlined: "https?://[^ )>]+"

    - special: "^```$"

    - default:
        start: "```PowerShell"
        end: "```"
        rules:
          - include: "PowerShell"

    - default:
        start: "```ada"
        end: "```"
        rules:
          - include: "ada"

    - default:
        start: "```apacheconf"
        end: "```"
        rules:
          - include: "apacheconf"

    - default:
        start: "```arduino"
        end: "```"
        rules:
          - include: "arduino"

    - default:
        start: "```asciidoc"
        end: "```"
        rules:
          - include: "asciidoc"

    - default:
        start: "```asm"
        end: "```"
        rules:
          - include: "asm"

    - default:
        start: "```ats"
        end: "```"
        rules:
          - include: "ats"

    - default:
        start: "```awk"
        end: "```"
        rules:
          - include: "awk"

    - default:
        start: "```bat"
        end: "```"
        rules:
          - include: "bat"

    - default:
        start: "```c"
        end: "```"
        rules:
          - include: "c"

    - default:
        start: "```caddyfile"
        end: "```"
        rules:
          - include: "caddyfile"

    - default:
        start: "```cake"
        end: "```"
        rules:
          - include: "cake"

    - default:
        start: "```clojure"
        end: "```"
        rules:
          - include: "clojure"

    - default:
        start: "```cmake"
        end: "```"
        rules:
          - include: "cmake"

    - default:
        start: "```coffeescript"
        end: "```"
        rules:
          - include: "coffeescript"

    - default:
        start: "```colortest"
        end: "```"
        rules:
          - include: "colortest"

    - default:
        start: "```conky"
        end: "```"
        rules:
          - include: "conky"

    - default:
        start: "```cpp"
        end: "```"
        rules:
          - include: "cpp"

    - default:
        start: "```crontab"
        end: "```"
        rules:
          - include: "crontab"

    - default:
        start: "```crystal"
        end: "```"
        rules:
          - include: "crystal"

    - default:
        start: "```csharp"
        end: "```"
        rules:
          - include: "csharp"

    - default:
        start: "```css"
        end: "```"
        rules:
          - include: "css"

    - default:
        start: "```csx"
        end: "```"
        rules:
          - include: "csx"

    - default:
        start: "```cuda"
        end: "```"
        rules:
          - include: "cuda"

    - default:
        start: "```cython"
        end: "```"
        rules:
          - include: "cython"

    - default:
        start: "```d"
        end: "```"
        rules:
          - include: "d"

    - default:
        start: "```dart"
        end: "```"
        rules:
          - include: "dart"

    - default:
        start: "```default"
        end: "```"
        rules:
          - include: "default"

    - default:
        start: "```dockerfile"
        end: "```"
        rules:
          - include: "dockerfile"

    - default:
        start: "```dot"
        end: "```"
        rules:
          - include: "dot"

    - default:
        start: "```elixir"
        end: "```"
        rules:
          - include: "elixir"

    - default:
        start: "```elm"
        end: "```"
        rules:
          - include: "elm"

    - default:
        start: "```erb"
        end: "```"
        rules:
          - include: "erb"

    - default:
        start: "```erlang"
        end: "```"
        rules:
          - include: "erlang"

    - default:
        start: "```fish"
        end: "```"
        rules:
          - include: "fish"

    - default:
        start: "```forth"
        end: "```"
        rules:
          - include: "forth"

    - default:
        start: "```fortran"
        end: "```"
        rules:
          - include: "fortran"

    - default:
        start: "```freebsd-kernel"
        end: "```"
        rules:
          - include: "freebsd-kernel"

    - default:
        start: "```fsharp"
        end: "```"
        rules:
          - include: "fsharp"

    - default:
        start: "```gdscript"
        end: "```"
        rules:
          - include: "gdscript"

    - default:
        start: "```gemini"
        end: "```"
        rules:
          - include: "gemini"

    - default:
        start: "```gentoo-ebuild"
        end: "```"
        rules:
          - include: "gentoo-ebuild"

    - default:
        start: "```gentoo-etc-portage"
        end: "```"
        rules:
          - include: "gentoo-etc-portage"

    - default:
        start: "```git-commit"
        end: "```"
        rules:
          - include: "git-commit"

    - default:
        start: "```git-config"
        end: "```"
        rules:
          - include: "git-config"

    - default:
        start: "```git-rebase-todo"
        end: "```"
        rules:
          - include: "git-rebase-todo"

    - default:
        start: "```glsl"
        end: "```"
        rules:
          - include: "glsl"

    - default:
        start: "```gnuplot"
        end: "```"
        rules:
          - include: "gnuplot"

    - default:
        start: "```go"
        end: "```"
        rules:
          - include: "go"

    - default:
        start: "```godoc"
        end: "```"
        rules:
          - include: "godoc"

    - default:
        start: "```golo"
        end: "```"
        rules:
          - include: "golo"

    - default:
        start: "```gomod"
        end: "```"
        rules:
          - include: "gomod"

    - default:
        start: "```graphql"
        end: "```"
        rules:
          - include: "graphql"

    - default:
        start: "```groff"
        end: "```"
        rules:
          - include: "groff"

    - default:
        start: "```groovy"
        end: "```"
        rules:
          - include: "groovy"

    - default:
        start: "```haml"
        end: "```"
        rules:
          - include: "haml"

    - default:
        start: "```hare"
        end: "```"
        rules:
          - include: "hare"

    - default:
        start: "```haskell"
        end: "```"
        rules:
          - include: "haskell"

    - default:
        start: "```hc"
        end: "```"
        rules:
          - include: "hc"

    - default:
        start: "```html"
        end: "```"
        rules:
          - include: "html"

    - default:
        start: "```html4"
        end: "```"
        rules:
          - include: "html4"

    - default:
        start: "```html5"
        end: "```"
        rules:
          - include: "html5"

    - default:
        start: "```ini"
        end: "```"
        rules:
          - include: "ini"

    - default:
        start: "```inputrc"
        end: "```"
        rules:
          - include: "inputrc"

    - default:
        start: "```java"
        end: "```"
        rules:
          - include: "java"

    - default:
        start: "```javascript"
        end: "```"
        rules:
          - include: "javascript"

    - default:
        start: "```jinja2"
        end: "```"
        rules:
          - include: "jinja2"

    - default:
        start: "```json"
        end: "```"
        rules:
          - include: "json"

    - default:
        start: "```jsonnet"
        end: "```"
        rules:
          - include: "jsonnet"

    - default:
        start: "```julia"
        end: "```"
        rules:
          - include: "julia"

    - default:
        start: "```justfile"
        end: "```"
        rules:
          - include: "justfile"

    - default:
        start: "```keymap"
        end: "```"
        rules:
          - include: "keymap"

    - default:
        start: "```kickstart"
        end: "```"
        rules:
          - include: "kickstart"

    - default:
        start: "```kotlin"
        end: "```"
        rules:
          - include: "kotlin"

    - default:
        start: "```kvlang"
        end: "```"
        rules:
          - include: "kvlang"

    - default:
        start: "```ledger"
        end: "```"
        rules:
          - include: "ledger"

    - default:
        start: "```lfe"
        end: "```"
        rules:
          - include: "lfe"

    - default:
        start: "```lilypond"
        end: "```"
        rules:
          - include: "lilypond"

    - default:
        start: "```lisp"
        end: "```"
        rules:
          - include: "lisp"

    - default:
        start: "```log"
        end: "```"
        rules:
          - include: "log"

    - default:
        start: "```lua"
        end: "```"
        rules:
          - include: "lua"

    - default:
        start: "```mail"
        end: "```"
        rules:
          - include: "mail"

    - default:
        start: "```makefile"
        end: "```"
        rules:
          - include: "makefile"

    - default:
        start: "```man"
        end: "```"
        rules:
          - include: "man"

    - default:
        start: "```mc"
        end: "```"
        rules:
          - include: "mc"

    - default:
        start: "```micro"
        end: "```"
        rules:
          - include: "micro"

    - default:
        start: "```mpdconf"
        end: "```"
        rules:
          - include: "mpdconf"

    - default:
        start: "```msbuild"
        end: "```"
        rules:
          - include: "msbuild"

    - default:
        start: "```nanorc"
        end: "```"
        rules:
          - include: "nanorc"

    - default:
        start: "```nftables"
        end: "```"
        rules:
          - include: "nftables"

    - default:
        start: "```nginx"
        end: "```"
        rules:
          - include: "nginx"

    - default:
        start: "```nim"
        end: "```"
        rules:
          - include: "nim"

    - default:
        start: "```nix"
        end: "```"
        rules:
          - include: "nix"

    - default:
        start: "```nu"
        end: "```"
        rules:
          - include: "nu"

    - default:
        start: "```objc"
        end: "```"
        rules:
          - include: "objc"

    - default:
        start: "```ocaml"
        end: "```"
        rules:
          - include: "ocaml"

    - default:
        start: "```octave"
        end: "```"
        rules:
          - include: "octave"

    - default:
        start: "```odin"
        end: "```"
        rules:
          - include: "odin"

    - default:
        start: "```pascal"
        end: "```"
        rules:
          - include: "pascal"

    - default:
        start: "```patch"
        end: "```"
        rules:
          - include: "patch"

    - default:
        start: "```peg"
        end: "```"
        rules:
          - include: "peg"

    - default:
        start: "```perl"
        end: "```"
        rules:
          - include: "perl"

    - default:
        start: "```php"
        end: "```"
        rules:
          - include: "php"

    - default:
        start: "```pkg-config"
        end: "```"
        rules:
          - include: "pkg-config"

    - default:
        start: "```po"
        end: "```"
        rules:
          - include: "po"

    - default:
        start: "```pony"
        end: "```"
        rules:
          - include: "pony"

    - default:
        start: "```pov"
        end: "```"
        rules:
          - include: "pov"

    - default:
        start: "```privoxy-action"
        end: "```"
        rules:
          - include: "privoxy-action"

    - default:
        start: "```privoxy-config"
        end: "```"
        rules:
          - include: "privoxy-config"

    - default:
        start: "```privoxy-filter"
        end: "```"
        rules:
          - include: "privoxy-filter"

    - default:
        start: "```proto"
        end: "```"
        rules:
          - include: "proto"

    - default:
        start: "```puppet"
        end: "```"
        rules:
          - include: "puppet"

    - default:
        start: "```python2"
        end: "```"
        rules:
          - include: "python2"

    - default:
        start: "```python3"
        end: "```"
        rules:
          - include: "python3"

    - default:
        start: "```r"
        end: "```"
        rules:
          - include: "r"

    - default:
        start: "```raku"
        end: "```"
        rules:
          - include: "raku"

    - default:
        start: "```reST"
        end: "```"
        rules:
          - include: "reST"

    - default:
        start: "```renpy"
        end: "```"
        rules:
          - include: "renpy"

    - default:
        start: "```rpmspec"
        end: "```"
        rules:
          - include: "rpmspec"

    - default:
        start: "```ruby"
        end: "```"
        rules:
          - include: "ruby"

    - default:
        start: "```rust"
        end: "```"
        rules:
          - include: "rust"

    - default:
        start: "```sage"
        end: "```"
        rules:
          - include: "sage"

    - default:
        start: "```scad"
        end: "```"
        rules:
          - include: "scad"

    - default:
        start: "```scala"
        end: "```"
        rules:
          - include: "scala"

    - default:
        start: "```sed"
        end: "```"
        rules:
          - include: "sed"

    - default:
        start: "```sh"
        end: "```"
        rules:
          - include: "sh"

    - default:
        start: "```sls"
        end: "```"
        rules:
          - include: "sls"

    - default:
        start: "```smalltalk"
        end: "```"
        rules:
          - include: "smalltalk"

    - default:
        start: "```solidity"
        end: "```"
        rules:
          - include: "solidity"

    - default:
        start: "```sql"
        end: "```"
        rules:
          - include: "sql"

    - default:
        start: "```stata"
        end: "```"
        rules:
          - include: "stata"

    - default:
        start: "```svelte"
        end: "```"
        rules:
          - include: "svelte"

    - default:
        start: "```swift"
        end: "```"
        rules:
          - include: "swift"

    - default:
        start: "```systemd"
        end: "```"
        rules:
          - include: "systemd"

    - default:
        start: "```tcl"
        end: "```"
        rules:
          - include: "tcl"

    - default:
        start: "```terraform"
        end: "```"
        rules:
          - include: "terraform"

    - default:
        start: "```tex"
        end: "```"
        rules:
          - include: "tex"

    - default:
        start: "```toml"
        end: "```"
        rules:
          - include: "toml"

    - default:
        start: "```twig"
        end: "```"
        rules:
          - include: "twig"

    - default:
        start: "```typescript"
        end: "```"
        rules:
          - include: "typescript"

    - default:
        start: "```v"
        end: "```"
        rules:
          - include: "v"

    - default:
        start: "```vala"
        end: "```"
        rules:
          - include: "vala"

    - default:
        start: "```verilog"
        end: "```"
        rules:
          - include: "verilog"

    - default:
        start: "```vhdl"
        end: "```"
        rules:
          - include: "vhdl"

    - default:
        start: "```vi"
        end: "```"
        rules:
          - include: "vi"

    - default:
        start: "```vue"
        end: "```"
        rules:
          - include: "vue"

    - default:
        start: "```xml"
        end: "```"
        rules:
          - include: "xml"

    - default:
        start: "```xresources"
        end: "```"
        rules:
          - include: "xresources"

    - default:
        start: "```yaml"
        end: "```"
        rules:
          - include: "yaml"

    - default:
        start: "```yum"
        end: "```"
        rules:
          - include: "yum"

    - default:
        start: "```zig"
        end: "```"
        rules:
          - include: "zig"

    - default:
        start: "```zscript"
        end: "```"
        rules:
          - include: "zscript"

    - default:
        start: "```zsh"
        end: "```"
        rules:
          - include: "zsh"

    - special:
        start: "`"
        end: "`"
        rules: []

I think at least the syntaxes used in this project should be included: lua, log, micro, and the syntaxes related to Go.

@JoeKar
Copy link
Collaborator

JoeKar commented Jun 9, 2025

gives highlighting like seen here on the left (compared to the one on the right without limit-group: comment – actually looks like there's a bug that causes limit-group to break most of the included rules so maybe we should avoid using that after all):

But using it would be the right way, when this bug is solved (f2286d0 based on #3127):
Bildschirmfoto vom 2025-06-09 14-59-01

😉

filename: "\\.(livemd|md|mkd|mkdn|markdown)$"

filename: \.(livemd|md|mkd|mkdn|markdown)$
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why touching these two lines at all?
What is the benefit of removing the quotes? The most of the rules are created with quotes and so we should stick to this style/approach.

Please just leave it as it was before this PR (with quotes and additional newline).

At the end this PR should include just 3 commits (currently we've 7):

  • change of comments
  • change of indentations
  • additional rules

Copy link
Author

@bjornasm bjornasm Jun 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, it comes from the yaml parser and linter used to build the yaml.

When it comes to the number of commits I dont understand what you want me to do. Any feedback that are resolved will generate comitts. Resolving the latter will leave us at 8. If this repo does not allow for squash and merge, I would have to close the PR in that case, as there is no going back afaik.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When it comes to the number of commits I dont understand what you want me to do. Any feedback that are resolved will generate comitts. Resolving the latter will leave us at 8. If this repo does not allow for squash and merge, I would have to close the PR in that case, as there is no going back afaik.

You can rebase locally to squash the commits together (git rebase --interactive master) and then git push --force.

@bjornasm
Copy link
Author

gives highlighting like seen here on the left (compared to the one on the right without limit-group: comment – actually looks like there's a bug that causes limit-group to break most of the included rules so maybe we should avoid using that after all):

But using it would be the right way, when this bug is solved (f2286d0 based on #3127): Bildschirmfoto vom 2025-06-09 14-59-01

😉

Am I right in interpreting that we should not yet use limit-group ?

@bjornasm bjornasm force-pushed the fenced-codeblock-syntax-highlighting branch from 29e1b1a to d6529a7 Compare June 20, 2025 08:47
@bjornasm
Copy link
Author

I have now squashed commits to the best of ability, with the initial adding og languages, the adding of new lagnuages and regex match groups from vscode and an formatting fix.

Fixed double set of ?$

Removed whitespace and renamed the syntax highlighting section

Reverted dedenting of filename:

Fixed indentation of include
@bjornasm bjornasm force-pushed the fenced-codeblock-syntax-highlighting branch from d6529a7 to 1f5b858 Compare June 20, 2025 09:10
@JoeKar
Copy link
Collaborator

JoeKar commented Jun 20, 2025

Am I right in interpreting that we should not yet use limit-group ?

From my perspective limit-group should be used, since it is the correct way to prepare for this use case. If we don't use it here then we most probably forget to reactivate it again.

@JoeKar
Copy link
Collaborator

JoeKar commented Jun 20, 2025

I have now squashed commits to the best of ability, with the initial adding og languages, the adding of new lagnuages and regex match groups from vscode and an formatting fix.

Right, but it is still screwed from single commit perspective:

  • 78d5336 shouldn't add these formatting issues and shouldn't touch the header part.
    • here you should only add the new rules you like to add
  • 1ddeeb6 + 1f5b858 should be squashed into the first commit, right?

@bjornasm
Copy link
Author

bjornasm commented Jun 21, 2025

Am I right in interpreting that we should not yet use limit-group ?

From my perspective limit-group should be used, since it is the correct way to prepare for this use case. If we don't use it here then we most probably forget to reactivate it again.

But it is not supported right now? I am pretty sure the formatting broke when using limit-group. But I will add it to support the future use as I understand.

#3771 (comment)

@bjornasm
Copy link
Author

bjornasm commented Jun 21, 2025

I have now squashed commits to the best of ability, with the initial adding og languages, the adding of new lagnuages and regex match groups from vscode and an formatting fix.

Right, but it is still screwed from single commit perspective:

  • 78d5336 shouldn't add these formatting issues and shouldn't touch the header part.
    • here you should only add the new rules you like to add
  • 1ddeeb6 + 1f5b858 should be squashed into the first commit, right?

Could we just squash everything together and add limit-group as its own commit on top of that? Or even starting a new pull request from a new branch all together if this PR is to messy.

@JoeKar
Copy link
Collaborator

JoeKar commented Jun 21, 2025

The diff should look like this at the end...
grafik
...while the formatting stuff should be a own commit. Currently it is a mess.

[...] and add limit-group as its own commit on top of that?

Yes, we can do and you can keep it commented out if you want. Then we have to activate it when #3127 is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants