Eliot00 / git-lens.vim

A vim9 plugin inspired by VSCode's GitLens.
GNU Affero General Public License v3.0
59 stars 1 forks source link

Errors when loading via Vim 8's native packing system #1

Closed aqibos closed 1 year ago

aqibos commented 2 years ago

I cloned the repository into the following directory /Users/<redacted>/.vim/pack/plugins/start/ and added the env variable to my .zshrc file: export GIT_LENS_ENABLED=true. Upon starting Vim, I get the following output before Vim opens and no inline git history when using Vim.

I also tried to load the plug in via Pathogen, and got the same output:

Error detected while processing /Users/<redacted>/.vim/pack/plugins/start/git-lens.vim/plugin/main.vim:
line    1:
E683: File name missing or invalid pattern
line    3:
E488: Trailing characters: #    Copyright (C) 2022  Elliot<hack00mind@gmail.com>
line    4:
E749: empty buffer
line    5:
E488: Trailing characters: #    This program is free software: you can redistribute it and/or modify
line    6:
E488: Trailing characters: #    it under the terms of the GNU Affero General Public License as published
line    7:
E488: Trailing characters: #    by the Free Software Foundation, either version 3 of the License, or
line    8:
E488: Trailing characters: #    (at your option) any later version.
line    9:
E749: empty buffer
line   10:
E488: Trailing characters: #    This program is distributed in the hope that it will be useful,
line   11:
E488: Trailing characters: #    but WITHOUT ANY WARRANTY; without even the implied warranty of
line   12:
E488: Trailing characters: #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
line   13:
E488: Trailing characters: #    GNU Affero General Public License for more details.
line   14:
E749: empty buffer
line   15:
E488: Trailing characters: #    You should have received a copy of the GNU Affero General Public License
line   16:
E488: Trailing characters: #    along with this program.  If not, see <https://www.gnu.org/licenses/>.
line   18:
E492: Not an editor command: import autoload 'git_lens/blame.vim' as blame
Pattern not found: LOADED_GIT_LENS = true
line   30:
E492: Not an editor command: def g:ToggleGitLens()
line   34:
E133: :return not inside a function
line   37:
E121: Undefined variable: false
E116: Invalid arguments for function get(g:, 'GIT_LENS_ENABLED', false) || !get(b:, 'git_lens_enabled', false)
line   46:
E492: Not an editor command: enddef
line   48:
E121: Undefined variable: false
Eliot00 commented 1 year ago

@ashah023 Sorry I didn't explain it clearly in the docs, this plugin just work with the vim9script feature, and GIT_LENS_ENABLED is not a shell environment variable, it's a global variable in the Vim script.