Closed TheSunCat closed 2 days ago
I am trying to use additionalRuntimePaths to fix the broken C++ indentation from Treesitter, but it does not work.
additionalRuntimePaths
Set:
programs.nvf.settings.vim = { additionalRuntimePaths = [ ./runtime ]; };
and place a file in ./runtime, for example ./runtime/queries/cpp/indents.scm:
./runtime
./runtime/queries/cpp/indents.scm
; extends ((namespace_definition body: (_ "}" @indent.end)) @_namespace @indent.begin (#has-ancestor? @_namespace namespace_definition))
C++ files should now indent namespaces
They don't.
mat@nixos-mat ~> nix-shell -p nix-info --run "nix-info -m" - system: "x86_64-linux" - host os: Linux 6.6.60, NixOS, 24.11 (Vicuna), 24.11.20241111.dc460ec - multi-user?: yes - sandbox: yes - version: nix-env (Lix, like Nix) 2.91.1 System type: x86_64-linux Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux, x86_64-v4-linux Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: /home/mat/.config/nix/nix.conf:/nix/store/9swqxk4khb041f04s28zsc62rk2j0frm-stylix-kde-config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/mat/.local/share/flatpak/exports/etc/xdg/nix/nix.conf:/var/lib/flatpak/exports/etc/xdg/nix/nix.conf:/home/mat/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/mat/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/mat/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/k1iys4jifr01ql4bzafl6ny71qzw32wz-lix-2.91.1/share - channels(root): "nixos" - nixpkgs: /nix/store/4r8s42c9mwfvgdlxv0izb1cmlzrsb5nz-source
"x86_64-linux"
Linux 6.6.60, NixOS, 24.11 (Vicuna), 24.11.20241111.dc460ec
yes
nix-env (Lix, like Nix) 2.91.1 System type: x86_64-linux Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux, x86_64-v4-linux Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: /home/mat/.config/nix/nix.conf:/nix/store/9swqxk4khb041f04s28zsc62rk2j0frm-stylix-kde-config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/mat/.local/share/flatpak/exports/etc/xdg/nix/nix.conf:/var/lib/flatpak/exports/etc/xdg/nix/nix.conf:/home/mat/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/mat/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/mat/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/k1iys4jifr01ql4bzafl6ny71qzw32wz-lix-2.91.1/share
"nixos"
/nix/store/4r8s42c9mwfvgdlxv0izb1cmlzrsb5nz-source
::echo &runtimepath /nix/store/z6mj0k1baihz3jkfrkcyn3c4yjllrhg0-neovim-pack-dir,/nix/store/z6mj0k1baihz3jkfrkcyn3c4yjllrhg0-neovim-pack-dir/pack/*/start/*,/nix/store/9swqxk4khb041f04s28zsc62rk2j0frm-st ylix-kde-config/nvf,/etc/xdg/nvf,/home/mat/.local/share/flatpak/exports/etc/xdg/nvf,/var/lib/flatpak/exports/etc/xdg/nvf,/home/mat/.nix-profile/etc/xdg/nvf,/nix/profile/etc/xdg/nvf, /home/mat/.local/state/nix/profile/etc/xdg/nvf,/etc/profiles/per-user/mat/etc/xdg/nvf,/nix/var/nix/profiles/default/etc/xdg/nvf,/run/current-system/sw/etc/xdg/nvf,/nix/store/m0g218h n4rbq2wj7szzg8a112alq1qvc-ninja-1.12.1/share/nvf/site,/nix/store/yzi080r2c1zn2jzrhcfdv7dmr92yw07l-cmake-3.29.6/share/nvf/site,/nix/store/02vzklfgfpaf457rq927fq3jj5hn133f-pkg-config- wrapper-0.29.2/share/nvf/site,/nix/store/k97fic16vmpf9z6vjx5dgd6rxcvv5wwh-patchelf-0.15.0/share/nvf/site,/nix/store/0l63mqr7qx1asjxfz86j4zbs4758gn98-git-2.46.0/share/nvf/site,/nix/s tore/0m1ggm1y9dj8r9cp4jd52k0k96rfinfp-wayland-scanner-1.23.1-dev/share/nvf/site,/nix/store/brvm2amwi0rqng04mjfavjcmd2g0ym4v-wayland-scanner-1.23.1/share/nvf/site,/nix/store/p8z1zqha ib447jyyidsym5c4rv72yg13-desktops/share/nvf/site,/home/mat/.local/share/flatpak/exports/share/nvf/site,/var/lib/flatpak/exports/share/nvf/site,/home/mat/.nix-profile/share/nvf/site, /nix/profile/share/nvf/site,/home/mat/.local/state/nix/profile/share/nvf/site,/etc/profiles/per-user/mat/share/nvf/site,/nix/var/nix/profiles/default/share/nvf/site,/run/current-sys tem/sw/share/nvf/site,/nix/store/wkg6wm72k8sza0sbs9803gfgzwv53czn-neovim-unwrapped-0.10.2/share/nvim/runtime,/nix/store/wkg6wm72k8sza0sbs9803gfgzwv53czn-neovim-unwrapped-0.10.2/shar e/nvim/runtime/pack/dist/opt/matchit,/nix/store/wkg6wm72k8sza0sbs9803gfgzwv53czn-neovim-unwrapped-0.10.2/lib/nvim,/nix/store/z6mj0k1baihz3jkfrkcyn3c4yjllrhg0-neovim-pack-dir/pack/*/ start/*/after,/run/current-system/sw/share/nvf/site/after,/nix/var/nix/profiles/default/share/nvf/site/after,/etc/profiles/per-user/mat/share/nvf/site/after,/home/mat/.local/state/n ix/profile/share/nvf/site/after,/nix/profile/share/nvf/site/after,/home/mat/.nix-profile/share/nvf/site/after,/var/lib/flatpak/exports/share/nvf/site/after,/home/mat/.local/share/fl atpak/exports/share/nvf/site/after,/nix/store/p8z1zqhaib447jyyidsym5c4rv72yg13-desktops/share/nvf/site/after,/nix/store/brvm2amwi0rqng04mjfavjcmd2g0ym4v-wayland-scanner-1.23.1/share /nvf/site/after,/nix/store/0m1ggm1y9dj8r9cp4jd52k0k96rfinfp-wayland-scanner-1.23.1-dev/share/nvf/site/after,/nix/store/0l63mqr7qx1asjxfz86j4zbs4758gn98-git-2.46.0/share/nvf/site/aft er,/nix/store/k97fic16vmpf9z6vjx5dgd6rxcvv5wwh-patchelf-0.15.0/share/nvf/site/after,/nix/store/02vzklfgfpaf457rq927fq3jj5hn133f-pkg-config-wrapper-0.29.2/share/nvf/site/after,/nix/s tore/yzi080r2c1zn2jzrhcfdv7dmr92yw07l-cmake-3.29.6/share/nvf/site/after,/nix/store/m0g218hn4rbq2wj7szzg8a112alq1qvc-ninja-1.12.1/share/nvf/site/after,/home/mat/.local/share/nvf/site /after,/run/current-system/sw/etc/xdg/nvf/after,/nix/var/nix/profiles/default/etc/xdg/nvf/after,/etc/profiles/per-user/mat/etc/xdg/nvf/after,/home/mat/.local/state/nix/profile/etc/x dg/nvf/after,/nix/profile/etc/xdg/nvf/after,/home/mat/.nix-profile/etc/xdg/nvf/after,/var/lib/flatpak/exports/etc/xdg/nvf/after,/home/mat/.local/share/flatpak/exports/etc/xdg/nvf/af ter,/etc/xdg/nvf/after,/nix/store/9swqxk4khb041f04s28zsc62rk2j0frm-stylix-kde-config/nvf/after,/nix/store/y8z9vhxh80w2sv55hsslnw3ikw8j1kzh-runtime
I'm closing this issue as we have resolved the issue on Discord, and additionalRuntimePaths behaves as expected for the most part.
@horriblename do we want to change the append to prepend?
⚠️ Please verify that this bug has NOT been reported before.
Description
I am trying to use
additionalRuntimePaths
to fix the broken C++ indentation from Treesitter, but it does not work.👟 Reproduction steps
Set:
and place a file in
./runtime
, for example./runtime/queries/cpp/indents.scm
:👀 Expected behavior
C++ files should now indent namespaces
😓 Actual Behavior
They don't.
💻 Metadata
mat@nixos-mat ~> nix-shell -p nix-info --run "nix-info -m" - system:
"x86_64-linux"
- host os:Linux 6.6.60, NixOS, 24.11 (Vicuna), 24.11.20241111.dc460ec
- multi-user?:yes
- sandbox:yes
- version:nix-env (Lix, like Nix) 2.91.1 System type: x86_64-linux Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux, x86_64-v4-linux Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: /home/mat/.config/nix/nix.conf:/nix/store/9swqxk4khb041f04s28zsc62rk2j0frm-stylix-kde-config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/mat/.local/share/flatpak/exports/etc/xdg/nix/nix.conf:/var/lib/flatpak/exports/etc/xdg/nix/nix.conf:/home/mat/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/mat/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/mat/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/k1iys4jifr01ql4bzafl6ny71qzw32wz-lix-2.91.1/share
- channels(root):"nixos"
- nixpkgs:/nix/store/4r8s42c9mwfvgdlxv0izb1cmlzrsb5nz-source
📝 Relevant log output