wren / jrnl.vim

Syntax for jrnl files in vim
Other
10 stars 6 forks source link

Seem to have trouble setting it up. #5

Open rikiwarren opened 2 years ago

rikiwarren commented 2 years ago

I've installed the nerd fonts, and when I view the source, I can see the icons in the call machadd lines. But when I edit a jrnl file, nothing is getting replaced.

The README says it needs conceal, but I'm not sure what this is. Is it something that I need to enable? or another plugin I need to add?

As a second problem, I don't seem to be getting any highlighting. Everything's displayed in a light gray color.

The folds are working though. Which is very nice.

alichtman commented 1 year ago

I'm having the same issue. If I manually run :source $XDG_DATA_HOME/nvim/plugged/jrnl.vim/after/syntax/jrnl.vim, I get proper behavior from the plugin. I'm using vim-plug for plugin management. Here's a snippet from my init.vim file.

call plug#begin('~/.local/share/nvim/plugged')
...
Plug 'wren/jrnl.vim'

Seems like the plugin isn't being sourced properly, but I haven't had time to debug fully.

$ nvim -v
NVIM v0.8.0-dev-872-gbccb5de89
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/gcc-10 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -DNVIM_TS_HAS_SET_ALLOCATOR -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/runner/work/neovim/neovim/build/cmake.config -I/home/runner/work/neovim/neovim/src -I/home/runner/work/neovim/neovim/.deps/usr/include -I/usr/include -I/home/runner/work/neovim/neovim/build/src/nvim/auto -I/home/runner/work/neovim/neovim/build/include
Compiled by runner@fv-az82-456

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/share/nvim"

Run :checkhealth for more info

After some research, it seems like the structure of this plugin isn't correct. The plugin and autoload directories are missing. I added them and reorganized the plugin. Still doesn't work, but I'm tired and going to sleep.

wren commented 1 year ago

@alichtman Sorry, I'm very new to vim plugins, and am happy to restructure this as needed. Is there some documentation somewhere that you know that I can look over?

alichtman commented 1 year ago

No worries :) Note that I was also unable to get it working

I read this: https://www.linode.com/docs/guides/writing-a-vim-plugin/ (specifically the "Anatomy of a Vim Plugin" section) and checked out some other vim plugins that were working, to x-compare the structure.

alichtman commented 2 weeks ago

I have the plugin working with my latest neovim config. This is the setup for the plugin:

return {
        "wren/jrnl.vim",
}
wren commented 1 week ago

I've also been using the branch rework-structure-5 and it's been working really well. If anyone wants to try that out and report back here, I can get it merged into main.

You can do so with something like this:

  return {
    -- Syntax highlighting for jrnl files
    "wren/jrnl.vim",
    branch = "rework-structure-5",
  },