Olical / aniseed

Neovim configuration and plugins in Fennel (Lisp compiled to Lua)
https://discord.gg/wXAMr8F
The Unlicense
610 stars 28 forks source link

When editing Fennel files, aniseed sources fennel.vim a lot #58

Closed zetashift closed 3 years ago

zetashift commented 3 years ago

So every time I edit an Fennel file my startup time slightly increases because fennel.vim gets sourced multiple times... I'm not sure why this is but is there a way to keep this at a minimum?

nvim --startuptime log.txt

215.732  005.322: loading packages
221.371  005.543  005.543: sourcing /home/rishi/.local/share/nvim/site/pack/packer/start/nvim-compe/after/plugin/compe.vim
223.390  001.934  001.934: sourcing /home/rishi/.local/share/nvim/site/pack/packer/start/compe-conjure/after/plugin/compe_conjure.vim
223.703  000.494: loading after plugins
223.721  000.018: inits 3
224.780  001.059: reading ShaDa
225.544  000.042  000.042: sourcing /home/rishi/.local/share/nvim/site/pack/packer/opt/zen-mode.nvim/plugin/zen-mode.vim
228.233  003.411: opening buffers
228.543  000.039  000.039: sourcing /home/rishi/.local/share/nvim/site/pack/packer/opt/nvim-colorizer.lua/plugin/colorizer.vim
253.078  024.807: BufEnter autocommands
253.086  000.008: editing files in windows
270.631  000.145  000.145: sourcing /home/rishi/.local/share/nvim/site/pack/packer/start/aniseed/ftplugin/fennel.vim
271.662  000.023  000.023: sourcing /home/rishi/.local/share/nvim/site/pack/packer/start/aniseed/ftplugin/fennel.vim
275.609  000.483  000.483: sourcing /home/rishi/.local/share/nvim/site/pack/packer/start/aniseed/indent/fennel.vim
276.025  000.033  000.033: sourcing /home/rishi/.local/share/nvim/site/pack/packer/start/aniseed/indent/fennel.vim
278.568  000.987  000.987: sourcing /home/rishi/.local/share/nvim/site/pack/packer/start/aniseed/syntax/fennel.vim
278.972  000.015  000.015: sourcing /home/rishi/.local/share/nvim/site/pack/packer/start/aniseed/syntax/fennel.vim
484.833  000.018  000.018: sourcing /home/rishi/.local/share/nvim/site/pack/packer/start/aniseed/ftplugin/fennel.vim
485.444  000.015  000.015: sourcing /home/rishi/.local/share/nvim/site/pack/packer/start/aniseed/ftplugin/fennel.vim
488.385  000.208  000.208: sourcing /home/rishi/.local/share/nvim/site/pack/packer/start/aniseed/indent/fennel.vim
488.707  000.015  000.015: sourcing /home/rishi/.local/share/nvim/site/pack/packer/start/aniseed/indent/fennel.vim
490.364  000.458  000.458: sourcing /home/rishi/.local/share/nvim/site/pack/packer/start/aniseed/syntax/fennel.vim
490.760  000.014  000.014: sourcing /home/rishi/.local/share/nvim/site/pack/packer/start/aniseed/syntax/fennel.vim
494.448  000.433  000.433: sourcing /home/rishi/.local/share/nvim/site/pack/packer/start/aniseed/syntax/fennel.vim
494.833  000.013  000.013: sourcing /home/rishi/.local/share/nvim/site/pack/packer/start/aniseed/syntax/fennel.vim
497.738  000.014  000.014: sourcing /home/rishi/.local/share/nvim/site/pack/packer/start/aniseed/ftplugin/fennel.vim
498.362  000.015  000.015: sourcing /home/rishi/.local/share/nvim/site/pack/packer/start/aniseed/ftplugin/fennel.vim
501.217  000.189  000.189: sourcing /home/rishi/.local/share/nvim/site/pack/packer/start/aniseed/indent/fennel.vim
501.525  000.015  000.015: sourcing /home/rishi/.local/share/nvim/site/pack/packer/start/aniseed/indent/fennel.vim
503.107  000.414  000.414: sourcing /home/rishi/.local/share/nvim/site/pack/packer/start/aniseed/syntax/fennel.vim
503.469  000.013  000.013: sourcing /home/rishi/.local/share/nvim/site/pack/packer/start/aniseed/syntax/fennel.vim
506.995  000.375  000.375: sourcing /home/rishi/.local/share/nvim/site/pack/packer/start/aniseed/syntax/fennel.vim
507.351  000.013  000.013: sourcing /home/rishi/.local/share/nvim/site/pack/packer/start/aniseed/syntax/fennel.vim
582.917  000.241  000.241: sourcing /usr/local/share/nvim/runtime/autoload/provider/clipboard.vim
583.178  315.953  311.805: sourcing /home/rishi/.local/share/nvim/sessions/%home%rishi%.config%nvim.vim
583.383  014.343: VimEnter autocommands
583.386  000.003: UIEnter autocommands
583.389  000.003: before starting main loop
590.783  007.393: first screen update
590.789  000.007: --- NVIM STARTED ---

I am using treesitter for Fennel highlighting if that matters.

Olical commented 3 years ago

I'm not personally doing any sourcing of this file whatsoever, so I can only imagine it's a) a regular vim thing to load the matching files every time and b) there's just multiple copies of those files (that part isn't so good and maybe I can help there).

I include fennel.vim with Aniseed modifications and improvement PRs merged with Aniseed so you don't need to add the fennel.vim syntax plugin if you have Aniseed. That'd probably cut down on some of the loading? Otherwise I think it comes down to runtimepath things? Like ensuring certain directories you don't want loaded aren't in the RTP.

I'm not sure how to perform these exclusions right now though, that seems like a viml specific thing to some extent 🤔

Maybe there's a packer config that can restrict this somehow? I don't once try to load this file in any of my code though, to be clear. It's not something intentional Aniseed or Conjure are doing.

zetashift commented 3 years ago

I think it's something I'm loading wrong with my treesitter config, eliminating treesitter made the excessive sourcing go away. Sorry for bothering!