Initial commit: Neovim config with Fennel via nfnl

This commit is contained in:
2026-01-29 15:05:35 -05:00
commit 9f25569788
8 changed files with 838 additions and 0 deletions
+74
View File
@@ -0,0 +1,74 @@
;; Plugin specs in Fennel
;; This file is compiled to lua/plugins/init.lua by nfnl
(local repo 1) ;; lazy.nvim spec index for the git repo (e.g., "folke/plugin")
(local lhs 1) ;; which-key spec index for the key sequence (see which-key below)
[;; Tokyonight - Colorscheme
{repo "folke/tokyonight.nvim"
:lazy false
:priority 1000
:config (fn []
(let [tokyonight (require :tokyonight)]
(tokyonight.setup
{:style "night" ; storm, moon, night, or day
:transparent false
:terminal_colors true}))
(vim.cmd.colorscheme "tokyonight"))}
;; Conjure - Interactive REPL for Fennel, Clojure, Lisp, etc.
{repo "Olical/conjure"
:ft ["fennel" "clojure" "lisp" "scheme" "racket" "lua"]
:config (fn []
;; Enable HUD floating window
(set vim.g.conjure#log#hud#enabled true))}
;; nvim-paredit - Structural editing for Lisp
;; Default keybindings: >)/<) slurp/barf forward, <(/>( slurp/barf backward
;; >e/<e drag element, >f/<f drag form, E/W/B element motions
{repo "julienvincent/nvim-paredit"
:ft ["fennel" "clojure" "lisp" "scheme" "racket"]
:config (fn []
(local paredit (require :nvim-paredit))
;; Use default keybindings (>), <), <(, >(, etc.)
(paredit.setup {})
;; Additional vim-sexp compatible bindings
(local keymap vim.keymap.set)
(local api paredit.api)
;; dsf - Splice (delete surrounding form)
(keymap :n "dsf" api.unwrap_form_under_cursor {:desc "Splice (delete surrounding form)"})
;; cse( cse) - Wrap in parens
(keymap :n "cse(" #(api.wrap_element_under_cursor "(" ")") {:desc "Wrap element in ()"})
(keymap :n "cse)" #(api.wrap_element_under_cursor "(" ")") {:desc "Wrap element in ()"})
;; cse[ cse] - Wrap in brackets
(keymap :n "cse[" #(api.wrap_element_under_cursor "[" "]") {:desc "Wrap element in []"})
(keymap :n "cse]" #(api.wrap_element_under_cursor "[" "]") {:desc "Wrap element in []"})
;; cse{ cse} - Wrap in braces
(keymap :n "cse{" #(api.wrap_element_under_cursor "{" "}") {:desc "Wrap element in {}"})
(keymap :n "cse}" #(api.wrap_element_under_cursor "{" "}") {:desc "Wrap element in {}"}))}
;; Mason - Package manager for LSP servers, DAP servers, linters, formatters
;; Run :MasonInstall clojure_lsp lua_ls to install servers
{repo "williamboman/mason.nvim"
:cmd ["Mason" "MasonInstall" "MasonUpdate"]
:build ":MasonUpdate"
:opts {:ui {:border "rounded"}}}
;; which-key - Shows keybinding hints
;; lhs constant defined at top - which-key specs use index [1] for the key sequence
{repo "folke/which-key.nvim"
:event "VeryLazy"
:opts {}
:config (fn [_ opts]
(local wk (require :which-key))
(wk.setup opts)
(wk.add
[{lhs "<leader>f" :group "find"}
{lhs "<leader>b" :group "buffer"}
{lhs "<leader>r" :group "refactor"}
{lhs "<leader>c" :group "code"}]))}]