Skip to content

Support **.configFile.*.text and **.configFile attr path? #34

@n0099

Description

@n0099

Currently only xdg.configFile.*.text

; xdg.configFile.*.text
(binding
attrpath: (_) @_path (#hmts-path? @_path "xdg" "configFile" ".*" "text")
expression: (_ (string_fragment) @injection.content)
(#hmts-inject! @_path)
(#set! injection.combined)
)
supports

hmts.nvim/README.md

Lines 55 to 69 in a32cd41

### Automatic language detection
The following features work out-of-the-box without any user intervention.
#### From filename
When writing a file's content directly with `home.file` or `xdg.configFile`, we can infer the language from the
specified filename, if possible:
```nix
# Also works with `home.file.*.text`
xdg.configFile."myprogram/myScript.py".text = ''
print("foo")
'';
```

But there's some other NixOS and home-manager module options that allows type str or lines using this pattern of attr path.
Extend pattern just to *.*.configFile.*.text will eliminate a99ffac#diff-d14453c61b01ff275bf6a0d935cab008365e297db5cd81fe96dfd39b8ee3318bR134.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions