Merge branch 'master' of git.blakenorth.net/home/git/dotfiles
This commit is contained in:
commit
01c80bc374
6 changed files with 48 additions and 29 deletions
|
@ -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>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>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', '<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>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)
|
buffmap(bufnr, 'n', '<leader>so', '<cmd>lua require("telescope.builtin").lsp_document_symbols()<CR>', opts)
|
||||||
end -- <<<
|
end -- <<<
|
||||||
|
|
|
@ -180,7 +180,7 @@ end
|
||||||
-- ZenMode >>>
|
-- ZenMode >>>
|
||||||
M.zenmode = function()
|
M.zenmode = function()
|
||||||
-- map :ZM to :ZenMode
|
-- map :ZM to :ZenMode
|
||||||
vim.cmd 'command! ZM ZenMode'
|
vim.cmd 'cab ZM ZenMode'
|
||||||
require("zen-mode").setup {
|
require("zen-mode").setup {
|
||||||
window = {
|
window = {
|
||||||
backdrop = 1, -- shade the backdrop of the Zen window. Set to 1 to keep the same as Normal
|
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
|
-- save some more things. notably options, resize, winpos, and terminal
|
||||||
vim.o.sessionoptions="blank,buffers,curdir,folds,help,tabpages,resize,winpos,terminal"
|
vim.o.sessionoptions="blank,buffers,curdir,folds,help,tabpages,resize,winpos,terminal"
|
||||||
-- So I don't forget which one it is
|
-- So I don't forget which one it is
|
||||||
vim.cmd 'command! SessionSave SaveSession'
|
vim.cmd 'cab SessionSave SaveSession'
|
||||||
vim.cmd 'command! SessionDelete DeleteSession'
|
vim.cmd 'cab SessionDelete DeleteSession'
|
||||||
vim.cmd 'command! SessionRestore RestoreSession'
|
vim.cmd 'cab SessionRestore RestoreSession'
|
||||||
end -- <<<
|
end -- <<<
|
||||||
|
|
||||||
-- Lualine >>>
|
-- Lualine >>>
|
||||||
|
|
|
@ -33,7 +33,7 @@ return require('packer').startup({function()
|
||||||
'wbthomason/packer.nvim',
|
'wbthomason/packer.nvim',
|
||||||
config = function()
|
config = function()
|
||||||
-- Map :PS to :PackerSync
|
-- Map :PS to :PackerSync
|
||||||
vim.cmd 'command! PS PackerSync'
|
vim.cmd 'cab PS PackerSync'
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ return require('packer').startup({function()
|
||||||
use { -- nvim-colorizer: css color tag highlighter (ex- #FFB13B)
|
use { -- nvim-colorizer: css color tag highlighter (ex- #FFB13B)
|
||||||
'norcalli/nvim-colorizer.lua',
|
'norcalli/nvim-colorizer.lua',
|
||||||
config = function()
|
config = function()
|
||||||
vim.cmd 'command! COL ColorizerToggle'
|
vim.cmd 'cab COL ColorizerToggle'
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
use { -- lumen: make vim respect the system light/dark theme setting (linux + macos)
|
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)
|
use { -- symbols-outline: treesitter-based document outline (SO)
|
||||||
'simrat39/symbols-outline.nvim',
|
'simrat39/symbols-outline.nvim',
|
||||||
config = function()
|
config = function()
|
||||||
vim.cmd 'command! SO SymbolsOutline'
|
vim.cmd 'cab SO SymbolsOutline'
|
||||||
vim.cmd 'nnoremap <Leader>so <cmd>SymbolsOutline<CR>'
|
vim.cmd 'nnoremap <Leader>so <cmd>SymbolsOutline<CR>'
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
@ -274,13 +274,21 @@ return require('packer').startup({function()
|
||||||
require('blake.other').telescope()
|
require('blake.other').telescope()
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
use {
|
use { -- trouble: one big list of code errors from all sources (lsp, quickfix)
|
||||||
'folke/trouble.nvim',
|
'folke/trouble.nvim',
|
||||||
requires = "kyazdani42/nvim-web-devicons",
|
requires = "kyazdani42/nvim-web-devicons",
|
||||||
config = function()
|
config = function()
|
||||||
require('trouble').setup({ mode = "quickfix" })
|
require('trouble').setup({ mode = "quickfix" })
|
||||||
end
|
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
|
use { -- gitsigns: git integration
|
||||||
'lewis6991/gitsigns.nvim',
|
'lewis6991/gitsigns.nvim',
|
||||||
requires = { 'nvim-lua/plenary.nvim' },
|
requires = { 'nvim-lua/plenary.nvim' },
|
||||||
|
@ -323,7 +331,7 @@ return require('packer').startup({function()
|
||||||
-- use { -- twilight.nvim: dim text outside paragraph or function
|
-- use { -- twilight.nvim: dim text outside paragraph or function
|
||||||
-- 'folke/twilight.nvim',
|
-- 'folke/twilight.nvim',
|
||||||
-- config = function()
|
-- config = function()
|
||||||
-- vim.cmd 'command! TW Twilight'
|
-- vim.cmd 'cab TW Twilight'
|
||||||
-- require("twilight").setup()
|
-- require("twilight").setup()
|
||||||
-- end,
|
-- 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, })
|
vim.api.nvim_set_keymap('n', '<Leader>u', '<cmd>UndotreeToggle<CR>', { noremap = true, silent = true, })
|
||||||
end
|
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
|
-- use { -- shade.nvim: dim inactive window
|
||||||
-- 'sunjon/shade.nvim',
|
-- 'sunjon/shade.nvim',
|
||||||
-- config = function()
|
-- config = function()
|
||||||
|
@ -445,8 +459,7 @@ return require('packer').startup({function()
|
||||||
'RRethy/nvim-align',
|
'RRethy/nvim-align',
|
||||||
}
|
}
|
||||||
use { -- comment.nvim: toggle comments - gb and gc
|
use { -- comment.nvim: toggle comments - gb and gc
|
||||||
'PowerUser64/Comment.nvim',
|
'numToStr/Comment.nvim',
|
||||||
branch = 'lockmarks',
|
|
||||||
config = function()
|
config = function()
|
||||||
require('Comment').setup {
|
require('Comment').setup {
|
||||||
mappings = {
|
mappings = {
|
||||||
|
@ -502,8 +515,10 @@ return require('packer').startup({function()
|
||||||
use { -- rhysd: clever-split: split calculation based on pane dimensions - CS or CleverSplit
|
use { -- rhysd: clever-split: split calculation based on pane dimensions - CS or CleverSplit
|
||||||
'rhysd/clever-split.vim',
|
'rhysd/clever-split.vim',
|
||||||
config = function()
|
config = function()
|
||||||
-- Map :CS to :CleverSplit
|
vim.cmd [[
|
||||||
vim.cmd 'command! CS CleverSplit'
|
cab CH CleverHelp
|
||||||
|
cab CS CleverSplit
|
||||||
|
]]
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
-- use { -- rhysd: accelerated jk: make j and k move faster by pressing them a lot movement
|
-- use { -- rhysd: accelerated jk: make j and k move faster by pressing them a lot movement
|
||||||
|
|
|
@ -47,27 +47,27 @@ vim.cmd 'let mapleader = " "'
|
||||||
|
|
||||||
-- *sigh*...
|
-- *sigh*...
|
||||||
vim.cmd [[
|
vim.cmd [[
|
||||||
command! Q q
|
cab Q q
|
||||||
command! W w
|
cab W w
|
||||||
command! Wq wq
|
cab Wq wq
|
||||||
command! WQ wq
|
cab WQ wq
|
||||||
command! Wa wa
|
cab Wa wa
|
||||||
command! WA wa
|
cab WA wa
|
||||||
command! Qa qa
|
cab Qa qa
|
||||||
command! QA qa
|
cab QA qa
|
||||||
command! Wqa wqa
|
cab Wqa wqa
|
||||||
command! WQa wqa
|
cab WQa wqa
|
||||||
command! WQA wqa
|
cab WQA wqa
|
||||||
]]
|
]]
|
||||||
|
|
||||||
-- Go to previous file, but faster
|
-- 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'
|
vim.cmd 'command! Term tabnew | term'
|
||||||
|
|
||||||
-- Genereate ctags
|
-- Genereate ctags
|
||||||
vim.cmd 'command! MakeTags !ctags -R .'
|
vim.cmd 'cab MakeTags !ctags -R .'
|
||||||
|
|
||||||
-- Write buffer as root
|
-- Write buffer as root
|
||||||
vim.cmd 'cmap w!! w !sudo tee > /dev/null %'
|
vim.cmd 'cmap w!! w !sudo tee > /dev/null %'
|
||||||
|
|
|
@ -29,7 +29,7 @@ fi
|
||||||
alias \
|
alias \
|
||||||
mkd="mkdir -p" \
|
mkd="mkdir -p" \
|
||||||
g=git \
|
g=git \
|
||||||
smctl='sudo systemctl' \
|
scl='sudo systemctl' \
|
||||||
|
|
||||||
# <<<
|
# <<<
|
||||||
## Program improvements (ex: ls = ls -h) >>>
|
## Program improvements (ex: ls = ls -h) >>>
|
||||||
|
|
|
@ -38,6 +38,10 @@ error() {
|
||||||
# change cursor to a beam by default
|
# change cursor to a beam by default
|
||||||
printf '\e[5 q'
|
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 >>>
|
### Generic shell configuration >>>
|
||||||
### Environment variables >>>
|
### Environment variables >>>
|
||||||
|
|
Loading…
Add table
Reference in a new issue