-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vim-ledger spews errors #143
Comments
Hm, interesting. This indicates you are loading the syntax rules without having loaded the file type plugin at all. That isn't a situation I expected when I reworked the variable usage to be per-buffer. |
Do i? I'm surprised since /usr/share/vim/vimfiles/autoload/ledger.vim is present, and other files in /usr/share/vim/vimfiles/autoload get loaded apparently. |
I just checked they way things are loading for me (via |
I'm getting similar errors:
|
I switched from:
to:
and no longer get the errors. |
Thanks for the useful information @valankar, that helps narrow this down a lot. While I'm more than happy to see old versions of VIM supported, I'm a NeoVIM user myself (and it works there) and VIM 9 is hardly bleeding edge (having been out for a couple years); so personally I'm not very motivated to go dig up the problem here. I might at some point, but it is low on the urgency scale for me. That being said I would love too facilitate a PR if somebody else has the time and motivation to dig into what happened that we lost VIM 8 support (and presumably earlier). It probably isn't a hard fix, it just needs somebody with an old VIM to poke around and try it. |
Hi! I'm using vim 9.0.0609 ( |
I have the same issue too, (Gentoo-9.0.1157), a workaround which works is (the idea is from python-mode/python-mode#47 ) adding (those specific values might not be the best choices)
before the plugin is loaded (that issue is old, so unlikely to be that same issue. the idea of just sticking the definitions in vimrc is from there) |
I have the same issue. I am running on Vim 9.0. When I add the lines above to define the undefined variables, the plugin seems to work fine. |
Using pathogen, you need to enable the filetype plugin indent on
execute pathogen#infect()
call pathogen#helptags() Using version Alternatively, setting the variables @yehoshuapw mentioned before the |
I am on Vim 9.0 and was also experiencing this issue. Enabling
|
After bisecting the repo, it looks like the issue is caused by commit 6990fa2. I fixed the issue locally by adding the following in my vimrc:
(since i use ledger instead of hledger) |
This bug had me stumped for several attempts for a fix. I've finally gotten it working on Ubuntu and I think I have a set of best practices for other Debian / Ubuntu users to use. I've forked the repository and have modified the README.md. I'm not sure how to create a pull request in this project in order to update the documentation. Here's a link to my updated README.md. https://github.com/kirtr/vim-ledger/blob/master/README.md |
I had this issue with hledger on Vim 9.0 (Compiled latest from july 2023). @cript0nauta answer solved it for me:
|
I suspect the reason some people get this issue and others don't is due to differences in vim startup files that different OS distributions use. That is, /usr/share/vim/.../vimrc has different contents. On NixOS, it's set nocompatible
syntax on
function! NixosPluginPath()
let seen = {}
for p in reverse(split($NIX_PROFILES))
for d in split(glob(p . '/share/vim-plugins/*'))
let pluginname = substitute(d, ".*/", "", "")
if !has_key(seen, pluginname)
exec 'set runtimepath^='.d
let after = d."/after"
if isdirectory(after)
exec 'set runtimepath^='.after
endif
let seen[pluginname] = 1
endif
endfor
endfor
endfunction
execute NixosPluginPath()
if filereadable("/etc/vimrc")
source /etc/vimrc
elseif filereadable("/etc/vim/vimrc")
source /etc/vim/vimrc
endif So on my system, |
I just bumped into something like this myself. In my case I am using packer, and in my setup for vim-ledger I add some completion stuff to nvim-cmp. I mistakenly set the loader for vim-ledger to The more I look at it the more I think this isn't so much an issue as a collection of issues depending on how people setup their plugin loaders and all order related. We might have some variables we can check for before attempting to use (and I'm happy to facilitate PRs along these lines if anybody figures them out), but the real answer is probable just "make sure you do things in the right order". |
I load
Setting
|
vim 9.0 here. Todays master tells me this when i open a ledger file:
The text was updated successfully, but these errors were encountered: