-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Currently only xdg.configFile.*.text
hmts.nvim/queries/nix/injections.scm
Lines 11 to 17 in a32cd41
| ; xdg.configFile.*.text | |
| (binding | |
| attrpath: (_) @_path (#hmts-path? @_path "xdg" "configFile" ".*" "text") | |
| expression: (_ (string_fragment) @injection.content) | |
| (#hmts-inject! @_path) | |
| (#set! injection.combined) | |
| ) |
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.Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels