Finish port of main config

This commit is contained in:
Thomas Gideon 2022-10-31 10:59:04 -04:00
parent 1bcdea7a37
commit 79737fc15e
2 changed files with 17 additions and 15 deletions

View file

@ -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 = "<F2>"
-- 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 <C-Up> :call AdjustFontSize(1)<CR>
-- noremap <C-Down> :call AdjustFontSize(-1)<CR>
-- inoremap <C-Up> <Esc>:call AdjustFontSize(1)<CR>a
-- inoremap <C-Down> <Esc>:call AdjustFontSize(-1)<CR>a
require('nvim-projectconfig').setup({autocmd=true})
require("trouble").setup {

View file

@ -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