dots-of-war/files/.config/nvim/fnl/init.fnl

61 lines
1.7 KiB
Text
Raw Normal View History

2021-04-03 16:14:56 +02:00
(module init
2021-05-08 20:51:05 +02:00
{autoload {utils utils
nvim aniseed.nvim
a aniseed.core
fennel aniseed.fennel
colors colors}
2021-05-01 15:20:02 +02:00
require-macros [macros]})
2021-04-03 20:34:15 +02:00
2021-05-03 22:16:55 +02:00
(macro make-errors-epic [f]
`(xpcall #,f #(a.println (fennel.traceback $1))))
2021-05-08 19:31:04 +02:00
(make-errors-epic (require "plugins"))
2021-05-06 20:54:55 +02:00
2021-05-03 22:16:55 +02:00
(make-errors-epic (require "plugins.lsp"))
2021-05-06 19:35:35 +02:00
(make-errors-epic (require "keybinds"))
2021-05-03 22:16:55 +02:00
2021-05-02 13:54:58 +02:00
2021-05-08 20:18:22 +02:00
(set vim.g.conjure#client#fennel#aniseed#aniseed_module_prefix "aniseed.")
2021-05-02 13:54:58 +02:00
; Colors ------------------------------------------------------- foldstart
(utils.highlight-add
2021-05-02 17:15:33 +02:00
["GruvboxBlueSign" "GruvboxAquaSign" "GruvboxRedSign" "GruvboxYellowSign" "GruvboxGreenSign" "GruvboxOrangeSign" "GruvboxPurpleSign"]
{:bg "NONE"})
2021-05-02 13:54:58 +02:00
; foldend
2021-05-01 15:20:02 +02:00
2021-04-30 16:26:31 +02:00
2021-05-01 12:01:13 +02:00
;(nvim-biscuits.setup {}
;{ :on_events ["InsertLeave" "CursorHoldI"]})
2021-04-30 18:23:38 +02:00
2021-05-02 12:32:09 +02:00
; :: and _ as space ------------------------------------------------------------------- foldstart
2021-04-23 16:46:45 +02:00
(var remapped-space nil)
(fn _G.RebindShit [newKey]
(set remapped-space {:old (vim.fn.maparg :<Space> :i)
:cur newKey})
(utils.keymap :i :<Space> newKey {:buffer true}))
2021-04-02 19:54:14 +02:00
2021-04-23 16:46:45 +02:00
(fn _G.UnbindSpaceStuff []
2021-05-02 17:15:33 +02:00
(when (and remapped-space (~= remapped-space {}))
(utils.del-keymap :i :<Space> true)
(when (~= remapped-space.old "")
(utils.keymap :i :<Space> remapped-space.old {:buffer true}))
(set remapped-space nil)))
2021-04-23 18:09:31 +02:00
2021-04-23 16:46:45 +02:00
(nvim.command "autocmd! InsertLeave * :call v:lua.UnbindSpaceStuff()")
(utils.keymap :n "<Tab>j" ":call v:lua.RebindShit('_')<CR>")
(utils.keymap :n "<Tab>k" ":call v:lua.RebindShit('::')<CR>")
(utils.keymap :i "<Tab>j" "<space><C-o>:call v:lua.RebindShit('_')<CR>")
(utils.keymap :i "<Tab>k" "<space><C-o>:call v:lua.RebindShit('::')<CR>")
(utils.keymap :n "ö" "a")
2021-04-18 12:03:50 +02:00
2021-05-02 12:32:09 +02:00
; foldend
2021-04-30 16:26:31 +02:00
2021-05-02 13:03:31 +02:00
2021-05-02 12:32:09 +02:00
; vim:foldmarker=foldstart,foldend