From 642947a5c51cfaf9a938f875c1772abe3e9264ea Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Mon, 11 Sep 2023 20:03:36 -0700 Subject: [PATCH] mu --- .config/nvim/fnl/init.fnl | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.config/nvim/fnl/init.fnl b/.config/nvim/fnl/init.fnl index eb5fe10..2f83b72 100644 --- a/.config/nvim/fnl/init.fnl +++ b/.config/nvim/fnl/init.fnl @@ -20,6 +20,10 @@ (set vim.o.mouse nil) +;;; completion + +(set vim.o.completeopt "longest,menuone") + ;; gui (set vim.o.guifont "Source Code Pro") @@ -33,6 +37,9 @@ (each [_ v (ipairs [:up :down :left :right])] (vim.keymap.set :n (.. "<" v ">") :)) +;; command mode +(vim.keymap.set :c : :) + ;; quick save (vim.keymap.set :n "\\\\" ":write") (vim.keymap.set :i "\\\\" ":write") @@ -52,10 +59,6 @@ ;; re-run the last macro (vim.keymap.set :n :Q "@@") -;;; completion - -(set vim.o.completeopt "longest,menuone") - ;; smart tab ;; https://vim.fandom.com/wiki/Smart_mapping_for_tab_completion (vim.keymap.set :i : @@ -133,7 +136,8 @@ (set vim.g.netrw_home "~/.nvim_tmp") ;;; treesitter -(let [configs (require :nvim-treesitter.configs) +(let [{: treesitter} vim + configs (require :nvim-treesitter.configs) {: setup} configs] (setup {:ensure_installed [:fennel :hcl @@ -180,7 +184,8 @@ :ab "@block.outer" :ib "@block.inner" :aa "@parameter.outer" - :ia "@parameter.inner"}}}})) + :ia "@parameter.inner"}}}}) + (treesitter.language.register :yaml :yaml.ansible)) (let [tscontext (require :treesitter-context)] (tscontext.setup))