From bd34387c571fe1c2df79317373a7f167541bb4de Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Tue, 7 Sep 2021 01:49:23 -0700 Subject: [PATCH] minor neovim changes - I think it's ready to roll --- .config/nvim/init.lua | 2 +- .config/nvim/lua/other.lua | 15 ++++++--------- .config/nvim/lua/plugins.lua | 10 +++++++--- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 34323f0..6040620 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -8,7 +8,7 @@ require('plugins') -- TODO: -- -- Misc: --- [X] map A-S to toggle spell check (see logic from hlsearch section in init.vim) +-- [x] map A-S to toggle spell check (see logic from hlsearch section in init.vim) -- -- Plugins to Configure -- [ ] toggleterm diff --git a/.config/nvim/lua/other.lua b/.config/nvim/lua/other.lua index f31aac7..18a74f5 100644 --- a/.config/nvim/lua/other.lua +++ b/.config/nvim/lua/other.lua @@ -1,12 +1,6 @@ local M = {} --- chadtree -M.chadtree = function () - vim.api.nvim_set_keymap('n', 'v', 'CHADopen', { noremap = true, silent = true }) - -- chadtree_settings.theme.text_colour_set = "trapdoor" -end - --- nvimtree +-- nvimtree >>> M.nvimtree = function () local tree_cb = require'nvim-tree.config'.nvim_tree_callback -- default mappings @@ -45,8 +39,9 @@ M.nvimtree = function () { key = "g?", cb = tree_cb("toggle_help") }, } end +-- <<< --- toggleterm +-- toggleterm >>> M.toggleterm = function() require("toggleterm").setup{ -- size can be a number or function which is passed the current terminal @@ -86,7 +81,9 @@ M.toggleterm = function() } } end +-- <<< return M --- vim:expandtab:tabstop=3:sw=3 +-- vim:fdm=marker:fmr=>>>,<<<:expandtab:tabstop=3:sw=3 + diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua index 04fd08d..9dd1a5a 100644 --- a/.config/nvim/lua/plugins.lua +++ b/.config/nvim/lua/plugins.lua @@ -1,11 +1,12 @@ -- Load plugins --- Bootstrap packer if needed +-- Bootstrap packer if needed { local fn = vim.fn local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim' if fn.empty(fn.glob(install_path)) > 0 then fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path}) vim.cmd 'packadd packer.nvim' end +-- } return require('packer').startup(function() -- Packer @@ -88,13 +89,12 @@ return require('packer').startup(function() } use { -- ALE: Support for lots of linters, etc 'dense-analysis/ale', - ft = {'sh', 'zsh', 'bash', 'c', 'cc', 'cpp', 'cmake', 'html', 'markdown', 'racket', 'vim', 'tex'}, + ft = {'sh', 'zsh', 'bash', 'cmake', 'html', 'markdown', 'racket', 'vim', 'tex'}, config = function() vim.g.ale_disable_lsp = 1 end } - ---- Other IDE features use { -- git integration 'lewis6991/gitsigns.nvim', @@ -133,6 +133,10 @@ return require('packer').startup(function() -- Conveniences use { -- Undo tree 'mbbill/undotree', + config = function() + vim.cmd 'nnoremap UndotreeToggle' + vim.api.nvim_set_keymap("n", "", "UndotreeToggle", { noremap = true, silent = true, }) + end } use { -- Quote pairing 'jiangmiao/auto-pairs'