A curvy and juicy neovim configuration following the "Keep it simple!" design principle, but using nfnl instead of aniseed.
Fork from cajus-nvim
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.
Things you need installed in your OS to use this setup
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.
- lazy A modern plugin manager for Neovim
- nfnl Enhance your Neovim with Fennel
- conjure Interactive repl based evaluation for nvim
- telescope Find, Filter, Preview, Pick
- treesitter Incremental parsing system for highlighting, indentation, or folding
- nvim-lspconfig Quickstart configurations for the Nvim LSP client
- nvim-cmp Autocompletion plugin
- tokyonight-nvim A clean, dark Neovim theme written in Lua
- nvim-paredit A Paredit implementation for Neovim, built using Treesitter and written in Lua.
- nvim-paredit-fennel A fennel language extension for nvim-paredit
- nvim-surround * Add/change/delete surrounding delimiter pairs with ease. Written with ❤️ in Lua.*
- nvim-autopairs autopairs for neovim written by lua
- lualine neovim statusline plugin written in pure lua
- luasnip Snippet Engine for Neovim written in Lua.
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.
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.
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.
Theme settings like style and comment style.
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.
All about nvim's lsp settings and keymaps.
- In the first session, we define which symbols to show for lsp diagnostics.
- Later we describe which features and server settings we want to enable/customize.
- Handler defines features and how we want to render the server outputs.
- Capabilities we link with our autocompletion plugin (nvim-cmp), to say to the lsp servers that we have this feature enabled.
- On_Attach we customize our interaction with the LSP server, here we define the following keymaps:
gd
Go to definitionK
Show documentation<leader>ld
Function declarations<leader>lt
Type Definitions<leader>lh
Signature Help<leader>ln
Rename<leader>le
Show line diagnostics<leader>lq
Show all diagnostics information<leader>lf
Auto format<leader>lj
Go to the next diagnostic<leader>lk
Go to the previous diagnostic<leader>la
Open code actions menu (Using telescope plugin interface)<leader>la
Open code actions menu for the selected text in VISUAL mode (Using telescope plugin interface)<leader>lw
Open workspace diagnostics list (Using telescope plugin interface)<leader>lr
Show all references list for an item under the cursor (Using telescope plugin interface)<leader>lr
Show all implementations list for an item under the cursor (Using telescope plugin interface)
- Lastly, we configure to use all settings above in clojure-lsp server instance.
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.
Settings like ignore node_modules
and everything in .gitignore
to be listed in the file finder.
Keymaps:
<leader>ff
open the find files<leader>fg
open the fuzzy finder<leader>fb
open the find open buffer<leader>fh
open the nvim help fuzzy finder
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
.
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.
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.
Setup a global state to define lsp's startup status, for later be read by lualine.
Set basic global vim configurations and general keymaps.
nfnl's configuration file at the root of the project, is blank to rely on the defaults.
Some gifs showing how it works.
Cajus is the Portuguese for cashews, which is a fitting name because the format of its nuts reminded me of a parenthesis.
If you find any dead links, misinformation or any improvements in this documents at all Emails, PRs and Issues are highly encouraged.
This is free and unencumbered software released into the public domain. For more information, please refer to http://unlicense.org