about summary refs log tree commit diff
path: root/pkgs/applications/editors/vim/plugins/neovim-require-check-hook.sh
blob: 5b454e0ff01b9968f26ae2d178a6d8db140b54b5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Setup hook for checking whether Python imports succeed
echo "Sourcing neovim-require-check-hook.sh"

neovimRequireCheckHook () {
    echo "Executing neovimRequireCheckHook"

    if [ -n "$nvimRequireCheck" ]; then
        echo "Check whether the following module can be imported: $nvimRequireCheck"

		# editorconfig-checker-disable
        export HOME="$TMPDIR"
        @nvimBinary@ -es --headless -n -u NONE -i NONE --clean -V1 \
            --cmd "set rtp+=$out" \
            --cmd "lua require('$nvimRequireCheck')"
    fi
}

echo "Using neovimRequireCheckHook"
preDistPhases+=" neovimRequireCheckHook"