mirror of
https://github.com/Ajetski/dotfiles.git
synced 2025-09-30 07:23:17 -09:00
dataify the things
This commit is contained in:
parent
228d6a6f00
commit
535c2e7472
@ -1,36 +1,81 @@
|
||||
(module main
|
||||
{require {a aniseed.core}})
|
||||
|
||||
;; for the memes. gotta have a macro example that compiles. replace with some thing useful sooon
|
||||
;; for the memes. gotta have a macro example that compiles. replace with some thing useful soon
|
||||
(macro unless [condition & code]
|
||||
`(when (not ,condition)
|
||||
,(unpack code)))
|
||||
|
||||
|
||||
;; utils
|
||||
(fn opt! [name value]
|
||||
(fn opt! [[name value]]
|
||||
(tset vim.o name value))
|
||||
|
||||
(local keymap! vim.keymap.set)
|
||||
|
||||
(fn nmap! [ks then-do desc]
|
||||
(keymap! "n" ks then-do
|
||||
(when desc
|
||||
{:desc desc})))
|
||||
(vim.keymap.set "n"
|
||||
(.. "<leader>" ks)
|
||||
(.. ":" then-do "<cr>")
|
||||
(when desc {:desc desc})))
|
||||
|
||||
|
||||
;; general keymaps
|
||||
(->> [[ "fs" "w" "[f]ile [s]ave"]
|
||||
|
||||
["cf" "e ~/.config/nvim/fnl/init.fnl" "[c]onfig [f]ennel"] ;config helpers
|
||||
["cl" "e ~/.config/nvim/init.lua" "[c]onfig [l]ua"]
|
||||
|
||||
["bn" "bn" "[b]uffer [n]ext"] ;buffer controls
|
||||
["bp" "bp" "[b]uffer [p]revious"]
|
||||
["bd" "bd" "[b]uffer [d]elete"]]
|
||||
(a.map #(nmap! (unpack $1))))
|
||||
|
||||
;; general settings
|
||||
(opt! :relativenumber true)
|
||||
(opt! :tabstop 2)
|
||||
(opt! :softtabstop 2)
|
||||
(opt! :shiftwidth 2)
|
||||
(opt! :expandtab true)
|
||||
(->> {:number true ;line numbers
|
||||
:rnu true
|
||||
:scrolloff 10
|
||||
:confirm true
|
||||
|
||||
:mouse :a
|
||||
:showmode false
|
||||
:cursorline true
|
||||
|
||||
:ts 2 ;tab setttings
|
||||
:sts 2
|
||||
:et true
|
||||
:bri true ;tab wrapped lines
|
||||
:undofile true
|
||||
|
||||
:swf false
|
||||
:scl :yes
|
||||
|
||||
:ut 250 ;perf timeouts
|
||||
:tm 350
|
||||
|
||||
:spr true ;splits
|
||||
:sb true
|
||||
|
||||
:list true ;whitespace
|
||||
:listchars "tab:» ,trail:·,nbsp:␣"
|
||||
:inccommand :split
|
||||
|
||||
:ignorecase true
|
||||
:smartcase true}
|
||||
(a.map-indexed opt!))
|
||||
|
||||
;; speed up scroll
|
||||
(def scroll-speed 8)
|
||||
(vim.keymap.set "n" "<c-e>" (.. scroll-speed "<c-e>") {})
|
||||
(vim.keymap.set "n" "<c-y>" (.. scroll-speed "<c-y>") {})
|
||||
|
||||
(comment
|
||||
;; repl imports
|
||||
(do
|
||||
(local a (require "aniseed.core")))
|
||||
|
||||
|
||||
;; keymaps
|
||||
(nmap! "<leader>fs" ":w<cr>" "[f]ile [s]ave")
|
||||
(nmap! "<leader>cf" ":e ~/.config/nvim/fnl/init.fnl<cr>" "[c]onfig [f]ennel" )
|
||||
(nmap! "<leader>bn" ":bn<cr>" "[b]uffer [n]ext" )
|
||||
(nmap! "<leader>bp" ":bp<cr>" "[b]uffer [p]revious" )
|
||||
(nmap! "<leader>bd" ":bd<cr>" "[b]uffer [d]elete" )
|
||||
;; playground
|
||||
(a.map a.inc {1 1 2 1 3 1})
|
||||
(type [])
|
||||
|
||||
;
|
||||
)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -12,8 +12,8 @@
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "7f0bf635082bb9b7d2b37766054526a6ccafdb85" },
|
||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" },
|
||||
"mason.nvim": { "branch": "main", "commit": "7dc4facca9702f95353d5a1f87daf23d78e31c2a" },
|
||||
"mini.nvim": { "branch": "main", "commit": "0e9d1f972a91acf5a0513319099ba41f7c09c30a" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "45ff1914044de7dbd4cd85053dc09f47312a2f4d" },
|
||||
"mini.nvim": { "branch": "main", "commit": "5d938b3a078a7eeae23ba9f04f180066ab8bd9ef" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "782dda984da54e465dcc142544133606139d0306" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
|
||||
@ -21,5 +21,9 @@
|
||||
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" },
|
||||
"vim-repeat": { "branch": "master", "commit": "65846025c15494983dafe5e3b46c8f88ab2e9635" },
|
||||
"vim-sexp": { "branch": "master", "commit": "14464d4580af43424ed8f2614d94e62bfa40bb4d" },
|
||||
"vim-sexp-mappings-for-regular-people": { "branch": "master", "commit": "4debb74b0a3e530f1b18e5b7dff98a40b2ad26f1" },
|
||||
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user