nvim-telekasten / telekasten.nvim

A Neovim (lua) plugin for working with a markdown zettelkasten / wiki and mixing it with a journal, based on telescope.nvim
MIT License
1.39k stars 89 forks source link

[BUG] folding conflicting with extant folding #243

Open mediapathic opened 1 year ago

mediapathic commented 1 year ago

Please confirm

Describe the bug When I load telekasten and find a file with it, all folds in a markdown file open and close simultaneously as I move up and down, making it impossible to navigate the file.

To Reproduce Steps to reproduce the behavior:

  {
    "renerocksai/telekasten.nvim",
    dependencies = {"nvim-telescope/telescope.nvim"},
  event = "VimEnter",
  opts = {
  home = vim.fn.expand("~/vault"), -- Put the name of your notes directory here
    }
  },

Operating system (please complete the following information):

Additional context Good to see you back around Rene, I was a sublime_zk user back in the day, and I'm glad you're still around!

lambtho12 commented 1 year ago

I have not investigated this properly, but based on the description I believe this could be due to syntax/filteype setting through Telekasten.

Can you try the following settings (or tweaks in it) and report if something change, so we could potentially reduce the problem to a single element?

take_over_my_home = false
auto_set_filetype = false
auto_set_syntax = false
install_syntax = false
mediapathic commented 1 year ago

I'll need to do more extensive testing later, but initial checking seems to indicate that auto_set_syntax = false prevents the problem from showing up (I also note that folding doesn't work at all but that may well be an unrelated issue given what I said above).

lambtho12 commented 1 year ago

This might be linked with #233 and #208.

renerocksai commented 1 year ago

Additional context Good to see you back around Rene, I was a sublime_zk user back in the day, and I'm glad you're still around!

Same here, I immediately recognized your username. Glad you have arrived at the neovim side of things :+1: !

mediapathic commented 1 year ago

Additional testing seems to suggest that this is in conflict with the obsidian-nvim plugin. So, I'm not sure whether this is on you guys to fix or them. But, I still submit that this is a bug insofar as the fact that it touches folding does not seem to be mentioned in the documentation, nor is there an apparent way to turn off whatever behavior is causing this.

lambtho12 commented 1 year ago

Can you check the filetype of your notes when you open telekasten?

Without testing or looking into it further, my best guess is that either the telekasten type is assigned by default or telekasten always redefines the markdown folding methods. Obsidian-nvim does not cares about filetype directly and only focuses on the extension .md, so it clashes as it does not understand the difference.

That being said, I have absolutely zero experience with dealing with filetypes and syntax, so it will take a while for me to fix these issues.

mediapathic commented 1 year ago

When I open a markdown file with telekasten, it receives the filetype "telekasten". If I open it with a different method (generic telescope via find file) it receives the filetype "vimwiki". Does that helpfully answer your question?

Also, I, personally, am fine if this takes a while, because all this testing has convinced me that telekasten can do most of what I need without needing to have obsidian-nvim, with only a few features missing. So I'm cool leaving obsidian-nvim disabled for now. Thanks for your work on this!