Alpha Chen 1 year ago
parent 5dd48de523
commit 642947a5c5
Signed by: alpha
SSH Key Fingerprint: SHA256:3fOT8fiYQG/aK9ntivV3Bqtg8AYQ7q4nV6ZgihOA20g

@ -20,6 +20,10 @@
(set vim.o.mouse nil) (set vim.o.mouse nil)
;;; completion
(set vim.o.completeopt "longest,menuone")
;; gui ;; gui
(set vim.o.guifont "Source Code Pro") (set vim.o.guifont "Source Code Pro")
@ -33,6 +37,9 @@
(each [_ v (ipairs [:up :down :left :right])] (each [_ v (ipairs [:up :down :left :right])]
(vim.keymap.set :n (.. "<" v ">") :<nop>)) (vim.keymap.set :n (.. "<" v ">") :<nop>))
;; command mode
(vim.keymap.set :c :<c-a> :<home>)
;; quick save ;; quick save
(vim.keymap.set :n "\\\\" ":write<cr>") (vim.keymap.set :n "\\\\" ":write<cr>")
(vim.keymap.set :i "\\\\" "<esc>:write<cr>") (vim.keymap.set :i "\\\\" "<esc>:write<cr>")
@ -52,10 +59,6 @@
;; re-run the last macro ;; re-run the last macro
(vim.keymap.set :n :Q "@@") (vim.keymap.set :n :Q "@@")
;;; completion
(set vim.o.completeopt "longest,menuone")
;; smart tab ;; smart tab
;; https://vim.fandom.com/wiki/Smart_mapping_for_tab_completion ;; https://vim.fandom.com/wiki/Smart_mapping_for_tab_completion
(vim.keymap.set :i :<tab> (vim.keymap.set :i :<tab>
@ -133,7 +136,8 @@
(set vim.g.netrw_home "~/.nvim_tmp") (set vim.g.netrw_home "~/.nvim_tmp")
;;; treesitter ;;; treesitter
(let [configs (require :nvim-treesitter.configs) (let [{: treesitter} vim
configs (require :nvim-treesitter.configs)
{: setup} configs] {: setup} configs]
(setup {:ensure_installed [:fennel (setup {:ensure_installed [:fennel
:hcl :hcl
@ -180,7 +184,8 @@
:ab "@block.outer" :ab "@block.outer"
:ib "@block.inner" :ib "@block.inner"
:aa "@parameter.outer" :aa "@parameter.outer"
:ia "@parameter.inner"}}}})) :ia "@parameter.inner"}}}})
(treesitter.language.register :yaml :yaml.ansible))
(let [tscontext (require :treesitter-context)] (let [tscontext (require :treesitter-context)]
(tscontext.setup)) (tscontext.setup))

Loading…
Cancel
Save