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.42k stars 91 forks source link

[FR] Possibility to not use the 'telekasten' filetype, but just markdown - and then let the 'telekasten' functionality only be applied to vault directory? #288

Closed emilBeBri closed 1 year ago

emilBeBri commented 1 year ago

Please confirm

Is your feature request related to a problem? Please describe.

So I know this is probably a long shot, but I find that having a new filetype is a bit of a bother - it might also in a way be a difference in philosophy, as the idea of not changing anything about the filetype seems like less potential trouble.

Describe the solution you'd like It would be very nice if Telekasten could operate wihtout changing the filetype to telekasten, and just do it's magic on markdown, plain and simple. The plugin wiki.vim has this feature, which to me seems a brilliant solution to the problem of wanting to do zettelkasten features only on selected folders. By doing this:

vim.cmd[[
    let g:wiki_root = '~/Dropbox/zettelkasten/'
    " do not use any default mappings
    let g:wiki_mappings_use_defaults='none'
    let g:wiki_global_load=0
]]

You can disable 'global' mappings, and then have the plugin be operational only with files from the wiki_root directory. To me, this seems a very good solution. (you may ask, 'you not just use that, then?", and the answer is that it assumes you're fluent in vimscript, basically.)

Describe alternatives you've considered I can't see any :)

lambtho12 commented 1 year ago

We have multiple issues with the filetype approach. When originally implemented, it seemed like a good idea as it basically just extends the markdown filetype. But as it appears, multiple other plugins have issues with that.

You can normally disable the telekasten filetype by setting the following options

take_over_my_home = false
auto_set_filetype = false

However, issue #233 indicates that there might be a problem with that also.

Note that by disabling the telekasten filetype, You may have issues with telekasten-specific highlighting though.


For people that would like to tackle this issue (or future me): I think the best approach would be to completely get rid of the filetype during the code refactoring. Once everything is cleaned and bugfree, we can start to think about what we can do in term of lsp, filetype, highlights, etc.

emilBeBri commented 1 year ago

Hi yes I'm aware of those workarounds I do use them :) I just wanted to suggest ditching the whole idea of being a separate file type because there seems to be loads of issues with it. But you are already aware I see.