From 79737fc15ec67b0424a3273b3e682a9f71c22fac Mon Sep 17 00:00:00 2001 From: Thomas Gideon Date: Mon, 31 Oct 2022 10:59:04 -0400 Subject: [PATCH] Finish port of main config --- init.lua | 30 +++++++++++++++--------------- plug.vim | 2 ++ 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/init.lua b/init.lua index b698e78..33cf2c3 100644 --- a/init.lua +++ b/init.lua @@ -1,5 +1,9 @@ local vimrc_git = os.getenv("HOME") .. "/src/vimrc" +-- it is a big fat key, after all +-- N.B. should come before plugins and plugin specific settings +vim.g.mapleader = ' ' + vim.cmd("source " .. vimrc_git .. "/plug.vim") vim.cmd("source " .. vimrc_git .. "/airline.vim") vim.cmd("source " .. vimrc_git .. "/syntastic.vim") @@ -10,6 +14,10 @@ vim.cmd("source " .. vimrc_git .. "/jsonnet.vim") vim.cmd("source " .. vimrc_git .. "/nerdtree.vim") vim.cmd("source " .. vimrc_git .. "/wiki.vim") +if vim.g.neovide then + require("size-matters") +end + -- set up a line number on the current line but relative above and below to -- help with motion commands vim.opt.number = true @@ -84,7 +92,7 @@ vim.opt.undodir = os.getenv("HOME") .. "/.nvim/undodir" vim.opt.pastetoggle = "" -- save when moving away ---au FocusLost * :wa +vim.api.nvim_create_autocmd("FocusLost", {pattern = "*", command = "wa"}) -- make sure to set TERM to xterm-256color in terminal program or app vim.cmd("colorscheme breezy") @@ -93,7 +101,7 @@ vim.opt.termguicolors = true -- ensure autoread works, to detect file changes outside the editor vim.opt.autoread = true --- au CursorHold * checktime +vim.api.nvim_create_autocmd("CursorHold", {pattern = "*", command = "checktime"}) -- for gui, make it easier to tell different instances apart vim.opt.title = true @@ -101,28 +109,20 @@ vim.opt.title = true -- keep nvim from resetting font back to default from terminal config vim.opt.guicursor = nil -local guiopts = vim.opt.guioptions +local guiopts = vim.g.guioptions +if guiopts == nil then + guiopts = "" +end guiopts = guiopts:gsub("r", "") guiopts = guiopts:gsub("b", "") guiopts = guiopts:gsub("T", "") guiopts = guiopts:gsub("m", "") -vim.opt.guioptions = guiopts +vim.g.guioptions = guiopts vim.opt.mouse = "nv" vim.opt.gfn = "FiraCode Nerd Font Mono:h12" --- from https://stackoverflow.com/a/51424640 --- let s:fontsize = 14 --- function! AdjustFontSize(amount) --- let s:fontsize = s:fontsize+a:amount --- :execute --set gfn=FiraCode\\ Nerd\\ Font\\ Mono:h" . s:fontsize --- endfunction --- --- noremap :call AdjustFontSize(1) --- noremap :call AdjustFontSize(-1) --- inoremap :call AdjustFontSize(1)a --- inoremap :call AdjustFontSize(-1)a require('nvim-projectconfig').setup({autocmd=true}) require("trouble").setup { diff --git a/plug.vim b/plug.vim index fa49694..b3ba129 100644 --- a/plug.vim +++ b/plug.vim @@ -3,6 +3,8 @@ call plug#begin("~/.config/nvim/plugged") " adds to my existing set up. I try to capture the value, at least to me, each " plugin adds. I've tried to logically group them, as well, to spot overlap " and redundancy. +" +Plug 'tenxsoydev/size-matters.nvim' " informational