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
|
### 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.
Currently only
xdg.configFile.*.texthmts.nvim/queries/nix/injections.scm
Lines 11 to 17 in a32cd41
hmts.nvim/README.md
Lines 55 to 69 in a32cd41
But there's some other NixOS and home-manager module options that allows type
strorlinesusing this pattern of attr path.Extend pattern just to
*.*.configFile.*.textwill eliminate a99ffac#diff-d14453c61b01ff275bf6a0d935cab008365e297db5cd81fe96dfd39b8ee3318bR134.