mhinz / mhinz/vim-startify

Question: How to replace `getcwd` with a public function exposed by another plugin?

Open
#469 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Vim Script
Stars
5.4k
Forks
181
PR merge metrics
No merged PRs in 30d

Description

This is a follow-up of [a question raised in another project](https://github.com/airblade/vim-rooter/issues/119).

Hey! I'm new to Vim and I am trying to integrate [a public function from another library](https://github.com/airblade/vim-rooter#using-root-finding-functionality-in-other-scripts) by replacing [`getCwd` specfied in `startify_lists`](https://github.com/mhinz/vim-startify/blob/master/doc/startify.txt#L161) with [the function defined in another plugin](https://github.com/airblade/vim-rooter/blob/master/plugin/rooter.vim#L51-L54).

Here is what my setup is:
- Installed plugins using vim-plug
- Assigning value to `startify_lists` in `.config/nvim/init.vim` (which I believe [could be wrong](https://github.com/airblade/vim-rooter/issues/119#issuecomment-799363382))

I am struggling to integrate these two plugins. When I try to use that function NVim tells me that it cannot find it.

![image](https://user-images.githubusercontent.com/26769888/111165551-2c1bc100-85c5-11eb-8f1d-100df0f99b38.png)

Here is what the code looks like:

![image](https://user-images.githubusercontent.com/26769888/111166034-b6642500-85c5-11eb-8e4e-aaa215d46daf.png)

Am I defining `startify_lists` in the wrong file? If yes, where can I define it instead? I am unable to understand what I'm doing wrong.

Contributor guide

Open the contributing guide

Research direction

Start with the `startify_lists` section in `doc/startify.txt`, then compare the referenced `init.vim` setup with the function definition in `plugin/rooter.vim`. Confirm how plugin loading affects access to the function; done means documenting the correct configuration location and integration steps.

Written by the indexing model from the issue text.

Assessment

Tech stack
vim
Domain
tooling
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.