Home

Awesome

cajus-nfnl <img src="docs/cajus-nvim.png" width="128" align="right">

A curvy and juicy neovim configuration following the "Keep it simple!" design principle, but using nfnl instead of aniseed.

Fork from cajus-nvim

What is this?

Setup config to transform your NVIM in a powerful Clojure IDE using fennel, clojure-lsp and conjure.
This is simplified version on my personal dotfiles setup, I highly recommend you to check it out for more advanced and updated configurations.

Prerequisites

Things you need installed in your OS to use this setup

How to use

Make sure you backup your current configuration files in $HOME/.config/nvim BEFORE running this.

Run these commands in the root of this repo:

# Delete the current nvim config
rm -rf $HOME/.config/nvim

# Makes a symbolic link to the files in this repo
ln -sf $PWD/.config/nvim $HOME/.config/nvim

The first time you open a Fennel file under this directory you'll be prompted to trust this configuration file since it's Fennel code that's executed on your behalf. You can put any Fennel code you want in this file, just be sure to return a table of configuration at the end.

Plugins

Files

All *.lua files, apart from .config/nvim/init.lua and .config/nvim/lua/plugins.lua, are generated by nfnl and should not be edited directly.

.config/nvim/init.lua

Bootstrapper is written in Lua with recommended setup for lazy.nvim.

This file also contains settings for the leader key as space and local-leader as ,, unfortunately, this has to be done only here before lazy.nvim setup due to its limitations.

.config/nvim/lua/plugins.lua

The last lua file manually created for this setup, defines some required plugins (nfnl & nvim.lua) that are needed for the fennel setup works and the lazy.nvim as an updatable plugin.

.config/nvim/fnl/plugins/theme.fnl

Theme settings like style and comment style.

.config/nvim/fnl/plugins/lualine.fnl

Settings for lualine status line like some theme overrides and setting what will be shown in the line. Also calls some lsp functions to read the startup state on the status line.

.config/nvim/fnl/plugins/lsp.fnl

All about nvim's lsp settings and keymaps.

Settings:

.config/nvim/fnl/plugins/paredit.fnl

Config for a bundle of plugins to have a modern "vim-sexp-mappings-for-regular-people" like experience for lisp languages like Clojure and Fennel.

.config/nvim/fnl/plugins/telescope.fnl

Settings like ignore node_modules and everything in .gitignore to be listed in the file finder. Keymaps:

.config/nvim/fnl/plugins/conjure.fnl

Conjure specifics settings, I like to remap the doc work keymap to be <localleader>K instead of K, to not conflict with the LSP docs K.

.config/nvim/fnl/plugins/treesitter.fnl

Settings to select which treesitter's features we want to be enabled and which language extension we want to ensure they will be always installed.

.config/nvim/fnl/plugins/cmp.fnl

Here settings of which sources we want to show up in the autocomple menu like (conjure, lsp, buffer) and some mapping to navigate in the menu.

.config/nvim/fnl/config/lsp.fnl

Setup a global state to define lsp's startup status, for later be read by lualine.

.config/nvim/fnl/config/init.fnl

Set basic global vim configurations and general keymaps.

.config/nvim/.nfnl.fnl

nfnl's configuration file at the root of the project, is blank to rely on the defaults.

Features

Some gifs showing how it works.

Telescope - Find Files

telescope-find-files <leader>ff

Lsp - Loading

lsp-loading on startup

Lsp - Syntax check

lsp-syntax-check <leader>le

Lsp - Go to definition

lsp-go-to-definition gd

Lsp - Document/Signature Help

lsp-document K/<leader>lh

Lsp - Find definition/references

lsp-find-references <leader>lr

Lsp - Formatting

lsp-format <leader>lf

Lsp - Code actions

lsp-code-actions <leader>la

Lsp - Refactorings

lsp-refactorings <leader>la

Lsp - Rename

lsp-rename <leader>ln

Conjure - Eval

conjure-eval <localleader>er

Conjure - Repl

conjure-repl <localleader>lv

Conjure - Document

conjure-document <localleader>K

Completion

auto-complete

Etymology

Cajus is the Portuguese for cashews, which is a fitting name because the format of its nuts reminded me of a parenthesis.

Contributing

If you find any dead links, misinformation or any improvements in this documents at all Emails, PRs and Issues are highly encouraged.

License

This is free and unencumbered software released into the public domain. For more information, please refer to http://unlicense.org