What is the Proper Way to Enter a New Mode in a Hook? Also Lua Question

This page summarizes the projects mentioned and recommended in the original post on /r/neovim

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • dotfiles

  • So I have two quick questions one is about the basics of vim and the other is about Lua. I recently started reading the runpathtime documentation page and moved all of my configurations for specific file types into ftplugin, but found one issue. I have vim configured to automatically execute TZAtaraxis, i.e. TrueZen, when I enter markdown, nroff, and text files. This was working when I used an autocmd group, but broke when I moved them into a filetype.lua file. I am 100% aware of how I can fix this with an autocmd, but wanted to ask what the more common vimy solution is? Did I write an incorrect markdown.lua or should this just be an autocmd?

  • true-zen.nvim

    🦝 Clean and elegant distraction-free writing for NeoVim

  • My second question is a bit more... complicated? I use TrueZen and honestly love it it works perfectly and the developer is awesome and always up for adding some neat things like including the ability to set quit to either quit or toggle, but I ran into one issue I can't seem to resolve with it. This may be a bit complicated so if I describe this incorrectly please let me know. TrueZen has built-in methods for toggle supported statuslines like lualine, but does not always toggle non-supported statuslines. I made a pull request about this, but as I got distracted and busy with uni I accidentally abandoned it (I apologies I know people doing that can be annoying). The pull request however did have some helpful information though, it seems what I need to do is create a custom function that toggles my statusline... but I don't know how. If you review the request here you can see a better more detailed explanation. From what I can tell, as someone who doesn't fully understand vim or lua, I need to create a function call, say togglel_my_statusline, and then call that function in true_zen.after_mode_ataraxis_on = function (). So I did some document reading figured out I could simply do opt.laststatus = 0 and as I simply set opt.statusline this should disable the statusline. I then simply created this

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project