mirror of
https://github.com/elkowar/dots-of-war.git
synced 2024-12-25 05:42:22 +00:00
asdf
This commit is contained in:
parent
bfd8def726
commit
8a70637173
7 changed files with 65 additions and 25 deletions
|
@ -2,6 +2,7 @@
|
||||||
{require {a aniseed.core
|
{require {a aniseed.core
|
||||||
fennel aniseed.fennel
|
fennel aniseed.fennel
|
||||||
nvim aniseed.nvim
|
nvim aniseed.nvim
|
||||||
|
str aniseed.string
|
||||||
kb keybinds
|
kb keybinds
|
||||||
utils utils
|
utils utils
|
||||||
nvim-treesitter-configs nvim-treesitter.configs
|
nvim-treesitter-configs nvim-treesitter.configs
|
||||||
|
@ -16,9 +17,11 @@
|
||||||
|
|
||||||
(local colors (utils.colors))
|
(local colors (utils.colors))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;(set nvim.g.conjure#client#fennel#aniseed#aniseed_module_prefix "aniseed.")
|
;(set nvim.g.conjure#client#fennel#aniseed#aniseed_module_prefix "aniseed.")
|
||||||
|
|
||||||
|
; Treesitter ------------------------------------------------------- <<<<<
|
||||||
(nvim-treesitter-configs.setup
|
(nvim-treesitter-configs.setup
|
||||||
{ :ensure_installed "all"
|
{ :ensure_installed "all"
|
||||||
:highlight { :enable true
|
:highlight { :enable true
|
||||||
|
@ -43,6 +46,7 @@
|
||||||
;(nvim-biscuits.setup {}
|
;(nvim-biscuits.setup {}
|
||||||
;{ :on_events ["InsertLeave" "CursorHoldI"]})
|
;{ :on_events ["InsertLeave" "CursorHoldI"]})
|
||||||
|
|
||||||
|
; >>>>>
|
||||||
|
|
||||||
; gitsigns.nvim ------------------------------------------------------- <<<<<
|
; gitsigns.nvim ------------------------------------------------------- <<<<<
|
||||||
; https://github.com/lewis6991/gitsigns.nvim
|
; https://github.com/lewis6991/gitsigns.nvim
|
||||||
|
@ -53,9 +57,9 @@
|
||||||
:topdelete {:text "▍"}
|
:topdelete {:text "▍"}
|
||||||
:changedelete {:text "▍"}}
|
:changedelete {:text "▍"}}
|
||||||
:keymaps { :noremap true
|
:keymaps { :noremap true
|
||||||
:buffer (do (a.println "TESTTESTTEST")
|
:buffer true}
|
||||||
true)}
|
:current_line_blame true
|
||||||
:current_line_blame false})
|
:update_debounce 100})
|
||||||
|
|
||||||
(utils.highlight "GitSignsAdd" {:bg "NONE" :fg colors.bright_aqua})
|
(utils.highlight "GitSignsAdd" {:bg "NONE" :fg colors.bright_aqua})
|
||||||
(utils.highlight "GitSignsDelete" {:bg "NONE" :fg colors.neutral_red})
|
(utils.highlight "GitSignsDelete" {:bg "NONE" :fg colors.neutral_red})
|
||||||
|
@ -64,7 +68,8 @@
|
||||||
; >>>>>
|
; >>>>>
|
||||||
|
|
||||||
|
|
||||||
; " :: and _ as space ------------------------------------------------------------------- <<<<<})
|
|
||||||
|
; " :: and _ as space ------------------------------------------------------------------- <<<<<
|
||||||
(var remapped-space nil)
|
(var remapped-space nil)
|
||||||
(fn _G.RebindShit [newKey]
|
(fn _G.RebindShit [newKey]
|
||||||
(set remapped-space {:old (vim.fn.maparg :<Space> :i)
|
(set remapped-space {:old (vim.fn.maparg :<Space> :i)
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
require-macros [macros]})
|
require-macros [macros]})
|
||||||
|
|
||||||
|
|
||||||
(utils.keymap :i :<C-Space> "compe#complete()" {:expr true})
|
(utils.keymap :i :<C-Space> "call compe#complete()" {:expr true})
|
||||||
(utils.keymap :i :<esc> "compe#close('<esc>')" {:expr true})
|
(utils.keymap :i :<esc> "compe#close('<esc>')" {:expr true})
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -16,4 +16,11 @@
|
||||||
|
|
||||||
:viml->fn
|
:viml->fn
|
||||||
(fn [name]
|
(fn [name]
|
||||||
`(.. "lua require('" *module-name* "')['" ,(tostring name) "']()"))}
|
`(.. "lua require('" *module-name* "')['" ,(tostring name) "']()"))
|
||||||
|
|
||||||
|
:dbg-call
|
||||||
|
(fn [x ...]
|
||||||
|
`(do
|
||||||
|
(a.println ,...)
|
||||||
|
(,x ,...)))}
|
||||||
|
|
||||||
|
|
|
@ -34,13 +34,13 @@
|
||||||
"" { :text "VISUAL BLOCK" :colors { :bg colors.neutral_blue :fg colors.dark0}}})
|
"" { :text "VISUAL BLOCK" :colors { :bg colors.neutral_blue :fg colors.dark0}}})
|
||||||
|
|
||||||
|
|
||||||
(fn buf-empty? []
|
(fn buf-name-empty? []
|
||||||
(= 1 (nvim.fn.empty (nvim.fn.expand "%:t"))))
|
(a.empty? (nvim.fn.expand "%:t")))
|
||||||
|
|
||||||
(fn get-current-file-name []
|
(fn get-current-file-name []
|
||||||
(let [file (nvim.fn.expand "%:t")]
|
(let [file (nvim.fn.expand "%:t")]
|
||||||
(if
|
(if
|
||||||
(= 1 (nvim.fn.empty file)) ""
|
(a.empty? file) ""
|
||||||
nvim.bo.readonly (.. "RO " file)
|
nvim.bo.readonly (.. "RO " file)
|
||||||
(and nvim.bo.modifiable nvim.bo.modified) (.. file " ")
|
(and nvim.bo.modifiable nvim.bo.modified) (.. file " ")
|
||||||
file)))
|
file)))
|
||||||
|
|
|
@ -1,19 +1,25 @@
|
||||||
(module utils
|
(module utils
|
||||||
{require {a aniseed.core
|
{require {a aniseed.core
|
||||||
nvim aniseed.nvim
|
fennel aniseed.fennel
|
||||||
fun fun}
|
nvim aniseed.nvim}
|
||||||
require-macros [macros]})
|
require-macros [macros]})
|
||||||
|
|
||||||
|
|
||||||
(defn dbg [x]
|
(defn dbg [x]
|
||||||
(a.pr x)
|
(a.println (fennel.view x))
|
||||||
x)
|
x)
|
||||||
|
|
||||||
|
|
||||||
(defn contains? [list elem]
|
(defn contains? [list elem]
|
||||||
(fun.any #(= elem $1) list))
|
(or (a.some #(= elem $1) list)) false)
|
||||||
|
|
||||||
|
(defn filter-table [f t]
|
||||||
|
(collect [k v (pairs t)]
|
||||||
|
(when (f k v)
|
||||||
|
(values k v))))
|
||||||
|
|
||||||
(defn without-keys [keys t]
|
(defn without-keys [keys t]
|
||||||
(fun.filter #(not (contains? keys $1)) t))
|
(filter-table #(not (contains? keys $1)) t))
|
||||||
|
|
||||||
(defn keymap [mode from to ?opts]
|
(defn keymap [mode from to ?opts]
|
||||||
"Set a mapping in the given mode, and some optional parameters, defaulting to {:noremap true :silent true}.
|
"Set a mapping in the given mode, and some optional parameters, defaulting to {:noremap true :silent true}.
|
||||||
|
@ -21,8 +27,7 @@
|
||||||
(local full-opts
|
(local full-opts
|
||||||
(->> (or ?opts {})
|
(->> (or ?opts {})
|
||||||
(a.merge {:noremap true :silent true})
|
(a.merge {:noremap true :silent true})
|
||||||
(without-keys [:buffer])
|
(without-keys [:buffer])))
|
||||||
fun.tomap))
|
|
||||||
(if (and ?opts (?. ?opts :buffer))
|
(if (and ?opts (?. ?opts :buffer))
|
||||||
(nvim.buf_set_keymap 0 mode from to full-opts)
|
(nvim.buf_set_keymap 0 mode from to full-opts)
|
||||||
(nvim.set_keymap mode from to full-opts)))
|
(nvim.set_keymap mode from to full-opts)))
|
||||||
|
|
|
@ -140,6 +140,29 @@ endfunction
|
||||||
|
|
||||||
autocmd BufCreate * execute 'call CleanNoNameEmptyBuffers()'
|
autocmd BufCreate * execute 'call CleanNoNameEmptyBuffers()'
|
||||||
|
|
||||||
|
" this nearly works, and does the same
|
||||||
|
|
||||||
|
" ; autoclose empty unedited buffers
|
||||||
|
" (fn _G.clean_no_name_empty_buffers []
|
||||||
|
" (local bufs
|
||||||
|
" (a.filter
|
||||||
|
" #(and
|
||||||
|
" (vim.api.nvim_buf_get_option $1 "buflisted")
|
||||||
|
" (a.empty? (vim.fn.bufname $1))
|
||||||
|
" (< (vim.fn.bufwinnr $1) 0)
|
||||||
|
" (vim.api.nvim_buf_is_loaded $1))
|
||||||
|
" ;(do (utils.dbg (.. (fennel.view $1) " -> " (fennel.view (vim.api.nvim_buf_is_loaded $1))) true)))
|
||||||
|
" ;(a.empty? (vim.api.nvim_buf_get_lines $1 1 (vim.api.nvim_buf_line_count $1) false)))
|
||||||
|
" (vim.fn.range 1 (vim.fn.bufnr "$"))))
|
||||||
|
" (when (not (a.empty? bufs))
|
||||||
|
" (nvim.command (.. "bd " (str.join " " bufs)))))
|
||||||
|
"
|
||||||
|
" (nvim.command "autocmd! BufCreate * :call v:lua.clean_no_name_empty_buffers()")
|
||||||
|
"
|
||||||
|
" ; autocmd BufCreate * execute 'call CleanNoNameEmptyBuffers()'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
" ===============
|
" ===============
|
||||||
|
@ -174,7 +197,7 @@ let g:detectindent_preferred_indent = 2
|
||||||
|
|
||||||
autocmd BufReadPost *.hs :set shiftwidth=2
|
autocmd BufReadPost *.hs :set shiftwidth=2
|
||||||
|
|
||||||
let g:vim_parinfer_filetypes = ['carp']
|
let g:vim_parinfer_filetypes = ['carp', 'fennel']
|
||||||
|
|
||||||
|
|
||||||
let g:sneak#label = 1
|
let g:sneak#label = 1
|
||||||
|
|
|
@ -13,7 +13,7 @@ vim.cmd [[packadd packer.nvim]]
|
||||||
|
|
||||||
require("packer").startup(function(use)
|
require("packer").startup(function(use)
|
||||||
|
|
||||||
use_rocks "rtsisyk/fun"
|
--use_rocks "rtsisyk/fun"
|
||||||
|
|
||||||
use 'pwntester/octo.nvim'
|
use 'pwntester/octo.nvim'
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ require("packer").startup(function(use)
|
||||||
cmd = "Goyo",
|
cmd = "Goyo",
|
||||||
}
|
}
|
||||||
|
|
||||||
use "mhinz/vim-signify"
|
--use "mhinz/vim-signify"
|
||||||
use "lewis6991/gitsigns.nvim"
|
use "lewis6991/gitsigns.nvim"
|
||||||
|
|
||||||
use "tpope/vim-fugitive"
|
use "tpope/vim-fugitive"
|
||||||
|
|
Loading…
Reference in a new issue