Closed syntaxman closed 2 years ago
I'm not able to reproduce it. Please provide minimal init.vim.
You can use this template https://gist.github.com/kristijanhusak/a0cb5f4eb2bad3e732a1d18d311ebe2f
I seem to have the same issue but on mac. I took that minimal init.lua and ran nvim with nvim -u /tmp/init.lua ~/myorgfile.org
. There is a syntax error on line 29 so I tweaked it a little until it loaded properly. Once nvim starts cleanly and sets up the plugin and opens my org file, if I hit <TAB>
on a heading nothing happens.
What does :map <Tab>
show?
Can you provide the .org
file you are using?
no mapping found
With a different test.org file I'm seeing:
Error executing vim.schedule lua callback: ...0.6.1/share/nvim/runtime/lua/vim/treesitter/language.lua:25: no parser for 'org' l
anguage, see :help treesitter-parsers
stack traceback:
[C]: in function 'error'
...0.6.1/share/nvim/runtime/lua/vim/treesitter/language.lua:25: in function 'require_language'
...1/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:19: in function 'new'
...ck/packer/start/orgmode.nvim/lua/orgmode/parser/file.lua:151: in function 'from_content'
...ck/packer/start/orgmode.nvim/lua/orgmode/parser/file.lua:139: in function 'cb'
vim.lua:285: in function <vim.lua:285>
@focusaurus You need to install treesitter parser. Follow installation instruction in readme.
Once I do :TSUpdate org
and hit tab in my org file, I see [orgmode] No fold
. Here's my test file:
* hi
** there
** here
** are some
** headings
* second
** blah
some plain words here
* third
** 3a
words go here
** 3b
more words
Back in my real nvim config and real org file, I see :map <Tab>
output of n <Tab> *@<Cmd>lua require("orgmode").action("org_mappings.cycle")<CR>
which looks good, but it doesn't do anything where emacs org mode would cycle folding.
@focusaurus what is output of echo &foldmethod
and echo &foldexpr
?
In my small test file: echo &foldmethod
says "manual", echo &foldexpr
says 0.
In my real org file: echo &foldmethod
says "expr" and echo &foldexpr
says "OrgModeFoldExpr()".
Your "real org file" looks ok. Can you try pressing zx
in that file and see if that works?
zx
in normal mode doesn't seem to fold/unfold. My test.org
file doesn't show syntax highlighting but I guess that's due to the minimal config but also makes me wonder if it's really loading all the org mode features.
I think something else is erroring out. Can you try adding set debug=msg
to your init.vim and try restarting nvim + opening the same thing where you miss the highlights? If you get any messages in the cmd line, paste them here.
I'm trying but I'm quickly getting over my head in neovim stuff and there's probably more chance of me trying to have a second minimal setup and making mistakes than there are of getting useful debug info. Let me see if a friend with better nvim fu than me can pair with me and get some debug info.
OK I got some help and did some cleanup of old plugins and assorted futzing and realized I had commented out the call to require('orgmode').setup()
because at a glance it seemed to be setting up a bunch of paths that were not applicable to my system. But of course I did need SOME call to that function so once I cleaned that up it looks like syntax highlighting and mappings are now working. I had been basically dead in the water due to this but now I can start trying the various features. Thanks for your help. This bug no longer applies to me so the original author of this issue might be having a separate problem.
Awesome. I'm gonna close this, since original author didn't provide any feedback for 2 months.
Are you using "tree-sitter" branch?
Yes
Describe the bug
If I decide to simply edit a .org file, it appears that none of the mappings are available.
Steps to reproduce
run: nvim example.org
The only orgmode commands available areoa and <leader
Expected behavior
I expected orgmode to be operational while editing files where ft=org
Emacs functionality
Yes, it works there, but I'm really not very familiar with emacs.
Screenshots and recordings
No response
OS / Distro
Arch
Neovim version/commit
1.5.1
Additional context
No response