Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/russtoku/conjure
Browse files Browse the repository at this point in the history
  • Loading branch information
russtoku committed Nov 13, 2024
2 parents b206619 + bc8907e commit c32988a
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 34 deletions.
19 changes: 0 additions & 19 deletions CONTRIBUTING.adoc

This file was deleted.

19 changes: 19 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Contributing to Conjure

Conjure is a [Neovim](https://neovim.io) specific Lua plugin written in [Fennel](https://fennel-lang.org/) and compiled to Lua by [nfnl](https://github.com/Olical/nfnl). You will need the nfnl plugin installed to work on Conjure. Don't fear, nfnl is designed to only load and operate on projects already configured to rely on it. So if there's no configuration file it's completely inert, it will only activate when you work on Conjure or other projects built with nfnl.

It's developed using itself which leads to an extremely tight feedback loop. This makes it easier to move fast without breaking things.

To work on Conjure you'll first need to clone the repository and execute `make deps`, then point your plugin manager at the directory.

Contrary to old versions of Conjure, we now simply work on branches that target the `main` branch, I no longer use the `develop` staging branch and we can consider that obsolete just like the `master` branch.

Now you can open up Conjure's source files (ending in `.fnl`) and evaluate them as you would any other language with Conjure, see `:help conjure`.

Your changes and evaluations through Conjure only apply to the in memory copy of Conjure. When you write a `.fnl` file with nfnl installed however your Fennel will be compiled to a static `.lua` file automatically. Make sure you commit both your Fennel _and_ Lua file changes!

Once you're happy with your changes, you can (maybe) write some tests and execute them with `make test`. CircleCI will also run them for you.

You can run `scripts/docker.sh` to drop into a fresh Ubuntu based Neovim environment with Conjure pre-installed from your working directory. This can be used to verify your changes in a clean room environment.

If you'd like to contribute or are having issues please don't hesitate to get in touch with me through GitHub discussions and issues. You can also find some ways to contact me privately on my personal site, [oli.me.uk](https://oli.me.uk).
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ Broader documentation can be found in the https://github.com/Olical/conjure/wiki

== Behind the curtain

Conjure is written entirely in Lua (no VimL or external processes!) which is compiled from https://fennel-lang.org/[Fennel] by https://github.com/Olical/aniseed[Aniseed] ahead of time. Check out link:CONTRIBUTING.adoc[`CONTRIBUTING.adoc`] for more on how to work on Conjure using itself.
Conjure is written entirely in Lua (no VimL or external processes!) which is compiled from https://fennel-lang.org/[Fennel] by https://github.com/Olical/nfnl[nfnl] ahead of time. Check out link:CONTRIBUTING.md[`CONTRIBUTING.md`] for more on how to work on Conjure using itself.

Historically, Conjure was Clojure specific with an entirely different implementation, you can still find that version on the https://github.com/Olical/conjure/tree/legacy-jvm[legacy-jvm branch].

Expand Down
13 changes: 7 additions & 6 deletions doc/conjure.txt
Original file line number Diff line number Diff line change
Expand Up @@ -766,12 +766,13 @@ configure the ones you care about one at a time you can set:
`g:conjure#extract#context_header_lines`
How many lines of the file should be checked for a context
(namespace name) such as `(module foo.bar)` or `(ns foo.bar)`
which is used for setting the right context for evaluations.
If you have buffers with huge comment headers you may want to set
this higher.
If a specific buffer isn't extracting the context correctly, you
can override it by setting `b:conjure#context`.
Default: `24`
which is used for setting the right context for evaluations. You
can hard code a context for a particular buffer by setting
`b:conjure#context`.
This defaults to `-1` which means "all lines" but you can set it
to something like `30` if you're experiencing performance issues
in some buffers or projects.
Default: `-1`

*g:conjure#extract#form_pairs*
`g:conjure#extract#form_pairs`
Expand Down
12 changes: 6 additions & 6 deletions docs/school
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ PREFIX="/tmp/conjure-school"

if [ ! -d $PREFIX ]; then
echo "Downloading Conjure into $PREFIX..."
curl -LJ https://github.com/Olical/conjure/archive/master.zip -o $PREFIX.zip
curl -LJ https://github.com/Olical/conjure/archive/main.zip -o $PREFIX.zip
unzip -qq $PREFIX.zip -d $PREFIX
rm $PREFIX.zip
else
echo "$PREFIX already exists, no need to download."
fi

nvim \
--cmd "set rtp+=$PREFIX/conjure-master" \
--cmd "source $PREFIX/conjure-master/plugin/conjure.vim" \
-c "au VimEnter * ++nested ConjureSchool" \
&& echo "I hope you had a great time! Cleaning up $PREFIX and exiting." \
&& rm -rf $PREFIX
--cmd "set rtp+=$PREFIX/conjure-main" \
--cmd "source $PREFIX/conjure-main/plugin/conjure.vim" \
-c "au VimEnter * ++nested ConjureSchool" &&
echo "I hope you had a great time! Cleaning up $PREFIX and exiting." &&
rm -rf $PREFIX
2 changes: 1 addition & 1 deletion fnl/conjure/config.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
:end "}%~~~"}}}

:extract
{:context_header_lines 24
{:context_header_lines -1
:form_pairs [["(" ")"]
["{" "}"]
["[" "]" true]]
Expand Down
2 changes: 1 addition & 1 deletion lua/conjure/config.lua

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c32988a

Please sign in to comment.