Add Fennel scratch buffer (Emacs Lisp style)

This commit is contained in:
Proctor
2022-05-23 18:55:07 -05:00
parent a6835a21fb
commit 9ed3c335d0
2 changed files with 22 additions and 2 deletions

View File

@@ -2,7 +2,11 @@
{autoload {autoload
{a aniseed.core} {a aniseed.core}
require require
{nvim aniseed.nvim}}) {anenv aniseed.env
nvim aniseed.nvim
nu aniseed.nvim.util
u dotfiles.util
}})
(nvim.ex.set "shortmess+=c") ; don't give |ins-completion-menu| messages. (nvim.ex.set "shortmess+=c") ; don't give |ins-completion-menu| messages.
@@ -100,3 +104,18 @@
;(nvim.ex.autocmd "vimenter" "*" "luafile" "treesitter.lua") ;(nvim.ex.autocmd "vimenter" "*" "luafile" "treesitter.lua")
; ;
; (nvim.fn.glob "~/.vimrc.local") ; (nvim.fn.glob "~/.vimrc.local")
(defn make-fennel-scratch
[]
(nvim.command "new | setlocal bt=nofile bh=wipe nobl noswapfile nu filetype=fennel"))
(nu.fn-bridge :FennelScratchBuffer :dotfiles.core :make-fennel-scratch {:return false})
(u.nnoremap :<leader>fsb ":call FennelScratchBuffer ()<CR>")
(defn compile-fnl []
(print :recompiling)
(anenv.init
{:force true
:init :foo}))
(nu.fn-bridge :AniseedCompile :dotfiles.core :compile-fnl {:return false})

View File

@@ -9,7 +9,8 @@
; (set nvim.g.mapleader "\\") ; (set nvim.g.mapleader "\\")
(noremap :n "<leader>`" ":source ~/.config/nvim/init.lua<CR>") ; (noremap :n "<leader>`" ":source ~/.config/nvim/init.lua<CR>")
(noremap :n "<leader>`" ":call AniseedCompile()<CR>")
(noremap :n :<Enter> ":nohlsearch<Enter>/<BS>") (noremap :n :<Enter> ":nohlsearch<Enter>/<BS>")