Merge branch 'master' of git.blakenorth.net/home/git/dotfiles

This commit is contained in:
PowerUser64 2022-09-10 20:07:45 -07:00
commit 01c80bc374
6 changed files with 48 additions and 29 deletions

View file

@ -241,7 +241,7 @@ M.lspconfig = function()
buffmap(bufnr, 'n', '<leader>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
buffmap(bufnr, 'n', '<leader>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
buffmap(bufnr, 'n', '<leader>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
buffmap(bufnr, 'n', 'gr', '<cmd>lua require("telescope.builtin").lsp_references()<CR>', opts) -- Telescope
buffmap(bufnr, 'n', 'gR', '<cmd>lua require("telescope.builtin").lsp_references()<CR>', opts) -- Telescope
buffmap(bufnr, 'n', '<leader>f', '<cmd>lua vim.lsp.buf.format { async = true }<CR>', opts)
buffmap(bufnr, 'n', '<leader>so', '<cmd>lua require("telescope.builtin").lsp_document_symbols()<CR>', opts)
end -- <<<

View file

@ -180,7 +180,7 @@ end
-- ZenMode >>>
M.zenmode = function()
-- map :ZM to :ZenMode
vim.cmd 'command! ZM ZenMode'
vim.cmd 'cab ZM ZenMode'
require("zen-mode").setup {
window = {
backdrop = 1, -- shade the backdrop of the Zen window. Set to 1 to keep the same as Normal
@ -233,9 +233,9 @@ M.autosession = function()
-- save some more things. notably options, resize, winpos, and terminal
vim.o.sessionoptions="blank,buffers,curdir,folds,help,tabpages,resize,winpos,terminal"
-- So I don't forget which one it is
vim.cmd 'command! SessionSave SaveSession'
vim.cmd 'command! SessionDelete DeleteSession'
vim.cmd 'command! SessionRestore RestoreSession'
vim.cmd 'cab SessionSave SaveSession'
vim.cmd 'cab SessionDelete DeleteSession'
vim.cmd 'cab SessionRestore RestoreSession'
end -- <<<
-- Lualine >>>

View file

@ -33,7 +33,7 @@ return require('packer').startup({function()
'wbthomason/packer.nvim',
config = function()
-- Map :PS to :PackerSync
vim.cmd 'command! PS PackerSync'
vim.cmd 'cab PS PackerSync'
end,
}
@ -91,7 +91,7 @@ return require('packer').startup({function()
use { -- nvim-colorizer: css color tag highlighter (ex- #FFB13B)
'norcalli/nvim-colorizer.lua',
config = function()
vim.cmd 'command! COL ColorizerToggle'
vim.cmd 'cab COL ColorizerToggle'
end,
}
use { -- lumen: make vim respect the system light/dark theme setting (linux + macos)
@ -183,7 +183,7 @@ return require('packer').startup({function()
use { -- symbols-outline: treesitter-based document outline (SO)
'simrat39/symbols-outline.nvim',
config = function()
vim.cmd 'command! SO SymbolsOutline'
vim.cmd 'cab SO SymbolsOutline'
vim.cmd 'nnoremap <Leader>so <cmd>SymbolsOutline<CR>'
end,
}
@ -274,13 +274,21 @@ return require('packer').startup({function()
require('blake.other').telescope()
end
}
use {
use { -- trouble: one big list of code errors from all sources (lsp, quickfix)
'folke/trouble.nvim',
requires = "kyazdani42/nvim-web-devicons",
config = function()
require('trouble').setup({ mode = "quickfix" })
end
}
use { -- bqf: improved quickfix list
'kevinhwang91/nvim-bqf',
ft = 'qf',
}
use { -- pqf: prettier quickfix list
'https://gitlab.com/yorickpeterse/nvim-pqf',
ft = 'qf',
}
use { -- gitsigns: git integration
'lewis6991/gitsigns.nvim',
requires = { 'nvim-lua/plenary.nvim' },
@ -323,7 +331,7 @@ return require('packer').startup({function()
-- use { -- twilight.nvim: dim text outside paragraph or function
-- 'folke/twilight.nvim',
-- config = function()
-- vim.cmd 'command! TW Twilight'
-- vim.cmd 'cab TW Twilight'
-- require("twilight").setup()
-- end,
-- }
@ -393,6 +401,12 @@ return require('packer').startup({function()
vim.api.nvim_set_keymap('n', '<Leader>u', '<cmd>UndotreeToggle<CR>', { noremap = true, silent = true, })
end
}
use { -- macroeditor: edit macros in another window to avoid making LSP mad
'dohsimpson/vim-macroeditor',
config = function()
vim.cmd 'cab ME MacroEdit'
end
}
-- use { -- shade.nvim: dim inactive window
-- 'sunjon/shade.nvim',
-- config = function()
@ -445,8 +459,7 @@ return require('packer').startup({function()
'RRethy/nvim-align',
}
use { -- comment.nvim: toggle comments - gb and gc
'PowerUser64/Comment.nvim',
branch = 'lockmarks',
'numToStr/Comment.nvim',
config = function()
require('Comment').setup {
mappings = {
@ -502,8 +515,10 @@ return require('packer').startup({function()
use { -- rhysd: clever-split: split calculation based on pane dimensions - CS or CleverSplit
'rhysd/clever-split.vim',
config = function()
-- Map :CS to :CleverSplit
vim.cmd 'command! CS CleverSplit'
vim.cmd [[
cab CH CleverHelp
cab CS CleverSplit
]]
end
}
-- use { -- rhysd: accelerated jk: make j and k move faster by pressing them a lot movement

View file

@ -47,27 +47,27 @@ vim.cmd 'let mapleader = " "'
-- *sigh*...
vim.cmd [[
command! Q q
command! W w
command! Wq wq
command! WQ wq
command! Wa wa
command! WA wa
command! Qa qa
command! QA qa
command! Wqa wqa
command! WQa wqa
command! WQA wqa
cab Q q
cab W w
cab Wq wq
cab WQ wq
cab Wa wa
cab WA wa
cab Qa qa
cab QA qa
cab Wqa wqa
cab WQa wqa
cab WQA wqa
]]
-- Go to previous file, but faster
vim.cmd 'command! P previous'
vim.cmd 'cab P previous'
-- Macro for opening a new terminal
-- Macro for opening a terminal in a new tab
vim.cmd 'command! Term tabnew | term'
-- Genereate ctags
vim.cmd 'command! MakeTags !ctags -R .'
vim.cmd 'cab MakeTags !ctags -R .'
-- Write buffer as root
vim.cmd 'cmap w!! w !sudo tee > /dev/null %'

View file

@ -29,7 +29,7 @@ fi
alias \
mkd="mkdir -p" \
g=git \
smctl='sudo systemctl' \
scl='sudo systemctl' \
# <<<
## Program improvements (ex: ls = ls -h) >>>

View file

@ -38,6 +38,10 @@ error() {
# change cursor to a beam by default
printf '\e[5 q'
if ! "${PROFILE_LOADED:-false}"; then
echo "Warning: profile was not loaded! Set PROFILE_LOADED to 'true' to disable this warning." >&2
fi
### <<<
### Generic shell configuration >>>
### Environment variables >>>