Skip to content

ftplugin in fennel? #41

Answered by rktjmp
ajayvigneshk asked this question in Q&A
Oct 4, 2021 · 2 comments · 5 replies
Discussion options

You must be logged in to vote
;; in your config
(let [{: nvim_create_autocmd : nvim_create_augroup} vim.api
      au-group (nvim_create_augroup :hotpot-ft {})
      cb #(pcall require (.. :ftplugin. (vim.fn.expand "<amatch>")))]
  (nvim_create_autocmd :FileType {:callback cb :group au-group}))
;; ~/.config/nvim/ftplugin/wow.fnl
(print :wow!)
"in vim
:set ft=wow
" wow!

Repost for selectable answer as the comment ends up in a loading break.

#41 (reply in thread)

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@rktjmp
Comment options

@ajayvigneshk
Comment options

@kejadlen
Comment options

@rktjmp
Comment options

@kejadlen
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by rktjmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants