Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add fennel snippet #19

Open
shortcuts opened this issue Dec 10, 2022 · 4 comments
Open

docs: add fennel snippet #19

shortcuts opened this issue Dec 10, 2022 · 4 comments
Labels
documentation Improvements or additions to documentation PR welcome When the answer is somewhere in the wild and a PR would be easy to do

Comments

@shortcuts
Copy link
Owner

motivated by #18

@shortcuts shortcuts added the documentation Improvements or additions to documentation label Dec 10, 2022
@BerkeleyTrue
Copy link
Contributor

Here's what I ended up with

(module plugins.no-neck-pain
  {require
   {a aniseed.core
    r r
    md utils.module
    utils utils}
   require-macros [macros]})


(defn main []
  (when-let [nnp (md.prequire :no-neck-pain)]
    (nnp.setup
      {:width 100})
    (augroup :NoNeckPainEnter
      {:event :VimEnter
       :pattern :*
       :callback
       (fn []
          (if (not= (n buf_get_name 0) "")
            (vim.schedule
              (fn [] (nnp.start)))))})))

There some macro's I'm using here, but that can be easily stripped out

@shortcuts shortcuts added the PR welcome When the answer is somewhere in the wild and a PR would be easy to do label Dec 10, 2022
@shortcuts
Copy link
Owner Author

Thanks! If you have a bit of time, feel free to open a PR!

@BerkeleyTrue
Copy link
Contributor

Should I add it to the wiki instead?

@shortcuts
Copy link
Owner Author

Should I add it to the wiki instead?

Hey! Now that it's available yes please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation PR welcome When the answer is somewhere in the wild and a PR would be easy to do
Projects
None yet
Development

No branches or pull requests

2 participants