10f6614348
Needs: - surrond? - diagnostics icons - cmp still seems to shit the bed sometimes - lspsaga breadcrumbs on lualine - more which-key config!! - tests on svelte / web dev
36 lines
1.3 KiB
Fennel
36 lines
1.3 KiB
Fennel
; Kitaab is why I'm so tied to vim.
|
|
; If only I could find a nice notes editor...
|
|
|
|
(local nvim (require :lib/nvim))
|
|
|
|
(import-macros {: do-req } :lib/macros)
|
|
|
|
(nvim.g :vimwiki_list [{:path "~/kitaab/vimwiki"
|
|
:auto_tags 1
|
|
:auto_diary_index 1
|
|
:auto_generate_links 0
|
|
:nested_syntaxes {:python "python"
|
|
:c++ "cpp"
|
|
:nix "nix"
|
|
:bash "sh"}}])
|
|
(nvim.g :zettel_format "%y%m%d-%H%M")
|
|
|
|
; Custom functions
|
|
(fn update_date []
|
|
(var written false)
|
|
(let [time (os.date "%Y-%m-%d %H:%M")
|
|
message (.. "%update " time)
|
|
lines (vim.api.nvim_buf_get_lines 0 0 4 false)]
|
|
(each [index line (ipairs lines)]
|
|
(if (and (= (length line) 0) (not written))
|
|
(do
|
|
(vim.api.nvim_buf_set_lines 0 (- index 1) index false [message ""])
|
|
(set written true)))
|
|
(if (and (= index 4) (not written))
|
|
(vim.api.nvim_buf_set_lines 0 3 index false [message])))))
|
|
|
|
(vim.api.nvim_create_autocmd "BufWritePre" {:pattern ["*.wiki"]
|
|
:callback update_date})
|
|
|
|
(do-req :hologram :setup {:auto_display false})
|