Skip to content

Convert aniseed dependecy to nfnl#716

Merged
Olical merged 4 commits into
Olical:mainfrom
russtoku:convert-aniseed
Oct 17, 2025
Merged

Convert aniseed dependecy to nfnl#716
Olical merged 4 commits into
Olical:mainfrom
russtoku:convert-aniseed

Conversation

@russtoku

Copy link
Copy Markdown
Contributor

I think I've got most of the remaining Aniseed dependencies converted to nfnl.

  • Main source code (fnl/conjure)
  • Tests (fnl/conjure-spec)

I'm not sure if we can get rid of:

  • fnl/conjure-spec/client/fennel/aniseed_spec.fnl
  • fnl/conjure/client/fennel/aniseed.fnl
  • fnl/conjure/nfnl/macros/aniseed.fnl

@russtoku

Copy link
Copy Markdown
Contributor Author

Sorry, I missed these:

  • fnl/conjure/client/fennel/stdio.fnl
  • fnl/conjure/editor.fnl
  • fnl/conjure/event.fnl
  • fnl/conjure/extract.fnl
  • fnl/conjure/extract/searchpair.fnl

@russtoku

Copy link
Copy Markdown
Contributor Author

Apologies for the straggler fixes.

@Olical

Olical commented Oct 17, 2025

Copy link
Copy Markdown
Owner

Not a problem! Any contributions are appreciated!

{:buf-suffix ".fnl"
:comment-prefix "; "
:form-node? ts.node-surrounded-by-form-pair-chars?
:comment-node? ts.lisp-comment-node?}))

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've made some changes to this file that are subtle. Overall this change is fine but what I did was:

  • Move these exported values out of the default table and into (set M.buf-suffix ...) lines. This way every time I reload the file the new changes to those keys are exported. This table is only used ONCE when the module is first defined as a default and is mostly there if you want to, say, require another module and augment it. It won't update though if you change it and re-eval because the module is already defined. The "default" default value here is just {} so you don't need to pass anything really, it's for rare special cases.
  • Added (local vim _G.vim) which appeases the linter. Kinda silly but not awful. I can't seem to appease the linter any other way but that might be my own Skill Issue.
  • Moved state to be in M.state and used (set M.state (or M.state ...)) to give it a default but keep it stable between reloads.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw that pattern in conjure.client.lua.neovim and conjure.client.fennel.nfnl so monkey-see monkey-did. Now I understand why not to. Thanks!

Comment thread fnl/conjure/school.fnl
[:BufNewFile :BufRead]
{:group (vim.api.nvim_create_augroup :conjure_school_filetype {:clear true})
:pattern :*.fnl
:command "setlocal filetype=clojure"}))

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So much better!

@Olical Olical merged commit 4191465 into Olical:main Oct 17, 2025
6 checks passed
@Olical

Olical commented Oct 17, 2025

Copy link
Copy Markdown
Owner

Looks good, works good, deletes more lines than it adds, loads less Lua modules. This is great! Thank you, Russ! 😄

@russtoku

Copy link
Copy Markdown
Contributor Author

Glad to help move things along!

@russtoku russtoku deleted the convert-aniseed branch November 9, 2025 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants