Compare commits

..

No commits in common. "4cfae23fc0c8a3968e72bafc89050f47ba49cca2" and "77ac354da5d475d03eb51c076008f95d214b7ee6" have entirely different histories.

21 changed files with 165 additions and 189 deletions

198
.gitmodules vendored
View File

@ -1,102 +1,102 @@
[submodule ".vim/bundle/vim-argwrap"]
path = pack/plugins/start/vim-argwrap
url = https://git.foosoft.net/alex/vim-argwrap.git
[submodule ".vim/bundle/vim-sort-motion"]
path = pack/plugins/start/vim-sort-motion
url = https://github.com/christoomey/vim-sort-motion.git
[submodule ".vim/bundle/vim-go"]
path = pack/plugins/start/vim-go
url = https://github.com/fatih/vim-go.git
[submodule ".vim/bundle/vim-easy-align"]
path = pack/plugins/start/vim-easy-align
url = https://github.com/junegunn/vim-easy-align.git
[submodule ".vim/bundle/vim-indent-object"]
path = pack/plugins/start/vim-indent-object
url = https://github.com/michaeljsmith/vim-indent-object.git
[submodule ".vim/bundle/vim-better-whitespace"]
path = pack/plugins/start/vim-better-whitespace
url = https://github.com/ntpeters/vim-better-whitespace.git
[submodule ".vim/bundle/vim-abolish"]
path = pack/plugins/start/vim-abolish
url = https://github.com/tpope/vim-abolish.git
[submodule ".vim/bundle/vim-repeat"]
path = pack/plugins/start/vim-repeat
url = https://github.com/tpope/vim-repeat
[submodule ".vim/bundle/vim-surround"]
path = pack/plugins/start/vim-surround
url = https://github.com/tpope/vim-surround
[submodule ".vim/bundle/vim-unimpaired"]
path = pack/plugins/start/vim-unimpaired
url = https://github.com/tpope/vim-unimpaired.git
[submodule ".vim/bundle/vim-dirvish"]
path = pack/plugins/start/vim-dirvish
url = https://github.com/justinmk/vim-dirvish.git
[submodule ".vim/bundle/vim-signify"]
path = pack/plugins/start/vim-signify
url = https://github.com/mhinz/vim-signify.git
[submodule ".vim/bundle/vim-angry"]
path = pack/plugins/start/vim-angry
url = https://github.com/b4winckler/vim-angry.git
[submodule ".vim/pack/plugins/start/vim-fugitive"]
path = pack/plugins/start/vim-fugitive
url = https://github.com/tpope/vim-fugitive.git
[submodule "pack/plugins/start/vim-polyglot"]
path = pack/plugins/start/vim-polyglot
url = https://github.com/sheerun/vim-polyglot
[submodule "pack/plugins/opt/cmp-nvim-lsp"]
path = pack/plugins/start/cmp-nvim-lsp
url = https://github.com/hrsh7th/cmp-nvim-lsp.git
[submodule "pack/plugins/opt/nvim-lspconfig"]
path = pack/plugins/start/nvim-lspconfig
url = https://github.com/neovim/nvim-lspconfig.git
[submodule "pack/plugins/opt/nvim-cmp"]
path = pack/plugins/start/nvim-cmp
url = https://github.com/hrsh7th/nvim-cmp.git
[submodule "pack/plugins/opt/cmp-vsnip"]
path = pack/plugins/start/cmp-vsnip
url = https://github.com/hrsh7th/cmp-vsnip
[submodule "pack/plugins/opt/vim-vsnip"]
path = pack/plugins/start/vim-vsnip
url = https://github.com/hrsh7th/vim-vsnip
[submodule "pack/plugins/start/suda.vim"]
path = pack/plugins/start/suda.vim
url = https://github.com/lambdalisue/suda.vim.git
[submodule "pack/plugins/start/plenary.nvim"]
path = pack/plugins/start/plenary.nvim
url = https://github.com/nvim-lua/plenary.nvim.git
[submodule "pack/plugins/start/vim-rooter"]
path = pack/plugins/start/vim-rooter
url = https://github.com/airblade/vim-rooter.git
[submodule "pack/plugins/start/neodev.nvim"]
path = pack/plugins/start/neodev.nvim
url = https://github.com/folke/neodev.nvim.git
[submodule "pack/plugins/start/cmp-nvim-lsp-signature-help"]
path = pack/plugins/start/cmp-nvim-lsp-signature-help
url = https://github.com/hrsh7th/cmp-nvim-lsp-signature-help.git
[submodule "pack/plugins/start/nightfox.nvim"]
path = pack/plugins/start/nightfox.nvim
url = https://github.com/EdenEast/nightfox.nvim.git
[submodule "pack/plugins/start/lualine.nvim"]
path = pack/plugins/start/lualine.nvim
url = https://github.com/nvim-lualine/lualine.nvim.git
[submodule "pack/plugins/start/Comment.nvim"]
path = pack/plugins/start/Comment.nvim
url = https://github.com/numToStr/Comment.nvim.git
[submodule "pack/plugins/start/guid.nvim"]
path = pack/plugins/start/guid.nvim
url = https://git.foosoft.net/alex/guid.nvim.git
[submodule "pack/plugins/start/revolver.nvim"]
path = pack/plugins/start/revolver.nvim
url = https://git.foosoft.net/alex/revolver.nvim.git
[submodule "pack/plugins/start/vim-quickhl"]
path = pack/plugins/start/vim-quickhl
url = https://github.com/t9md/vim-quickhl.git
[submodule "pack/plugins/start/vim-jdaddy"]
path = pack/plugins/start/vim-jdaddy
url = https://github.com/tpope/vim-jdaddy.git
[submodule "pack/plugins/start/fzf-lua"]
path = pack/plugins/start/fzf-lua
url = https://github.com/ibhagwan/fzf-lua.git
[submodule ".vim/bundle/vim-argwrap"]
path = pack/plugins/start/vim-argwrap
url = https://git.foosoft.net/alex/vim-argwrap.git
[submodule ".vim/bundle/vim-sort-motion"]
path = pack/plugins/start/vim-sort-motion
url = https://github.com/christoomey/vim-sort-motion.git
[submodule ".vim/bundle/vim-go"]
path = pack/plugins/start/vim-go
url = https://github.com/fatih/vim-go.git
[submodule ".vim/bundle/vim-easy-align"]
path = pack/plugins/start/vim-easy-align
url = https://github.com/junegunn/vim-easy-align.git
[submodule ".vim/bundle/vim-indent-object"]
path = pack/plugins/start/vim-indent-object
url = https://github.com/michaeljsmith/vim-indent-object.git
[submodule ".vim/bundle/vim-better-whitespace"]
path = pack/plugins/start/vim-better-whitespace
url = https://github.com/ntpeters/vim-better-whitespace.git
[submodule ".vim/bundle/vim-abolish"]
path = pack/plugins/start/vim-abolish
url = https://github.com/tpope/vim-abolish.git
[submodule ".vim/bundle/vim-repeat"]
path = pack/plugins/start/vim-repeat
url = https://github.com/tpope/vim-repeat
[submodule ".vim/bundle/vim-surround"]
path = pack/plugins/start/vim-surround
url = https://github.com/tpope/vim-surround
[submodule ".vim/bundle/vim-unimpaired"]
path = pack/plugins/start/vim-unimpaired
url = https://github.com/tpope/vim-unimpaired.git
[submodule ".vim/bundle/vim-dirvish"]
path = pack/plugins/start/vim-dirvish
url = https://github.com/justinmk/vim-dirvish.git
[submodule ".vim/bundle/vim-signify"]
path = pack/plugins/start/vim-signify
url = https://github.com/mhinz/vim-signify.git
[submodule ".vim/bundle/vim-angry"]
path = pack/plugins/start/vim-angry
url = https://github.com/b4winckler/vim-angry.git
[submodule ".vim/pack/plugins/start/vim-fugitive"]
path = pack/plugins/start/vim-fugitive
url = https://github.com/tpope/vim-fugitive.git
[submodule "pack/plugins/start/vim-polyglot"]
path = pack/plugins/start/vim-polyglot
url = https://github.com/sheerun/vim-polyglot
[submodule "pack/plugins/opt/cmp-nvim-lsp"]
path = pack/plugins/start/cmp-nvim-lsp
url = https://github.com/hrsh7th/cmp-nvim-lsp.git
[submodule "pack/plugins/opt/nvim-lspconfig"]
path = pack/plugins/start/nvim-lspconfig
url = https://github.com/neovim/nvim-lspconfig.git
[submodule "pack/plugins/opt/nvim-cmp"]
path = pack/plugins/start/nvim-cmp
url = https://github.com/hrsh7th/nvim-cmp.git
[submodule "pack/plugins/opt/cmp-vsnip"]
path = pack/plugins/start/cmp-vsnip
url = https://github.com/hrsh7th/cmp-vsnip
[submodule "pack/plugins/opt/vim-vsnip"]
path = pack/plugins/start/vim-vsnip
url = https://github.com/hrsh7th/vim-vsnip
[submodule "pack/plugins/start/suda.vim"]
path = pack/plugins/start/suda.vim
url = https://github.com/lambdalisue/suda.vim.git
[submodule "pack/plugins/start/plenary.nvim"]
path = pack/plugins/start/plenary.nvim
url = https://github.com/nvim-lua/plenary.nvim.git
[submodule "pack/plugins/start/vim-rooter"]
path = pack/plugins/start/vim-rooter
url = https://github.com/airblade/vim-rooter.git
[submodule "pack/plugins/start/fzf.vim"]
path = pack/plugins/start/fzf.vim
url = https://github.com/junegunn/fzf.vim.git
[submodule "pack/plugins/start/fzf"]
path = pack/plugins/start/fzf
url = https://github.com/junegunn/fzf.git
[submodule "pack/plugins/start/neodev.nvim"]
path = pack/plugins/start/neodev.nvim
url = https://github.com/folke/neodev.nvim.git
[submodule "pack/plugins/start/cmp-nvim-lsp-signature-help"]
path = pack/plugins/start/cmp-nvim-lsp-signature-help
url = https://github.com/hrsh7th/cmp-nvim-lsp-signature-help.git
[submodule "pack/plugins/start/nightfox.nvim"]
path = pack/plugins/start/nightfox.nvim
url = https://github.com/EdenEast/nightfox.nvim.git
[submodule "pack/plugins/start/lualine.nvim"]
path = pack/plugins/start/lualine.nvim
url = https://github.com/nvim-lualine/lualine.nvim.git
[submodule "pack/plugins/start/Comment.nvim"]
path = pack/plugins/start/Comment.nvim
url = https://github.com/numToStr/Comment.nvim.git
[submodule "pack/plugins/start/guid.nvim"]
path = pack/plugins/start/guid.nvim
url = https://git.foosoft.net/alex/guid.nvim.git
[submodule "pack/plugins/start/revolver.nvim"]
path = pack/plugins/start/revolver.nvim
url = https://git.foosoft.net/alex/revolver.nvim.git
[submodule "pack/plugins/start/vim-quickhl"]
path = pack/plugins/start/vim-quickhl
url = https://github.com/t9md/vim-quickhl.git
[submodule "pack/plugins/start/argonaut.nvim"]
path = pack/plugins/start/argonaut.nvim
url = https://git.foosoft.net/alex/argonaut.nvim.git

View File

@ -36,7 +36,7 @@ vim.opt.writebackup = false
-- common keymaps
vim.keymap.set('i', '<c-c>', '<esc>')
vim.keymap.set('n', '<bs>', '<cmd>bp|bd #<cr>')
vim.keymap.set('n', '<bs>', '<cmd>bd<cr>')
vim.keymap.set('n', '<c-c><c-c>', '<cmd>nohlsearch<cr>')
vim.keymap.set('n', '<leader><leader>', '<cmd>b#<cr>')
vim.keymap.set('n', '<leader>w', '<cmd>w<cr>')

View File

@ -1,9 +1,13 @@
vim.cmd.GuiTabline(0)
vim.cmd.GuiPopupmenu(0)
if vim.fn.has('win32') == 1 then
vim.cmd.Guifont({
args = {'Cascadia Mono:h10'},
bang = true
})
local font
if vim.fn.has('unix') == 1 then
font = 'Terminus:h12'
elseif vim.fn.has('win32') == 1 then
font = 'Lucida Console:h8'
end
if font then
vim.cmd.Guifont({args = {font}, bang = true})
end

View File

@ -7,25 +7,20 @@ end)
-- comment.nvim
require('Comment').setup()
-- fzf-lua
-- fzf.vim
if vim.fn.executable('fzf') == 1 then
local fzf_lua = require('fzf-lua')
fzf_lua.setup({
winopts = {
preview = {
winopts = {
cursorline = false,
},
},
},
})
vim.cmd([[
command! -bang -nargs=* Fs
\ call fzf#vim#grep(
\ 'git grep --line-number -- '.shellescape(<q-args>), 0,
\ fzf#vim#with_preview({'dir': systemlist('git rev-parse --show-toplevel')[0]}), <bang>0)
]])
vim.keymap.set('n', '<leader>fb', fzf_lua.buffers)
vim.keymap.set('n', '<leader>fg', fzf_lua.git_files)
vim.keymap.set('n', '<leader>fh', fzf_lua.oldfiles)
vim.keymap.set('n', '<leader>fl', fzf_lua.lines)
vim.keymap.set('n', '<leader>fp', fzf_lua.grep)
vim.keymap.set('n', '<leader>fs', fzf_lua.live_grep_native)
vim.keymap.set('n', '<leader>fg', vim.cmd.GFiles)
vim.keymap.set('n', '<leader>fs', vim.cmd.Fs)
vim.keymap.set('n', '<leader>fh', vim.cmd.History)
vim.keymap.set('n', '<leader>fb', vim.cmd.Buffers)
vim.keymap.set('n', '<leader>fl', vim.cmd.Lines)
end
-- guid.nvim

View File

@ -1,34 +1,10 @@
-- UnAlign
vim.api.nvim_create_user_command(
'UnAlign',
function(ctx)
vim.cmd(ctx.line1 .. ',' .. ctx.line2 .. 's/\\(\\S\\+\\)\\s\\{2,\\}/\\1 /g')
end,
{range = '%'}
)
local function invoke(args)
local output = vim.fn.system(table.concat(args, ' '))
output = vim.fn.system(table.concat(args, ' '))
return string.gsub(output, '%s+$', '')
end
local function git_parent_branch(parent_branch)
for _, branch in ipairs({'master', 'main'}) do
local output = invoke({'git', 'rev-parse', '--verify', branch})
if not string.find(output, 'fatal') then
parent_branch = branch
end
end
if parent_branch ~= '' then
return parent_branch
end
local function get_branch_parent()
local author = invoke({'git', 'config', 'user.name'})
if #author == 0 then
print('User name is not set')
return
end
local hash = invoke{
'git',
@ -46,42 +22,43 @@ local function git_parent_branch(parent_branch)
end
end
local function git_edit_paths(names)
local root_dir = invoke({'git', 'rev-parse', '--show-toplevel'})
for name in string.gmatch(names, '[^\r\n]+') do
vim.cmd(string.format('e %s/%s', root_dir, name))
end
end
-- GitConflicts
-- UnAlign
vim.api.nvim_create_user_command(
'GitConflicts',
function()
git_edit_paths(invoke({'git', 'diff', '--name-only', '--diff-filter=U'}))
'UnAlign',
function(ctx)
vim.cmd(ctx.line1 .. ',' .. ctx.line2 .. 's/\\(\\S\\+\\)\\s\\{2,\\}/\\1 /g')
end,
{range = '%'}
)
-- TopicEdit
vim.api.nvim_create_user_command(
'TopicEdit',
function(ctx)
local hash = get_branch_parent()
if hash then
local names = invoke({'git', 'diff', '--name-only', hash})
if #names == 0 then
print('No files changed since previous author')
else
local root_dir = invoke({'git', 'rev-parse', '--show-toplevel'})
for name in string.gmatch(names, '[^\r\n]+') do
vim.cmd(string.format('e %s/%s', root_dir, name))
end
end
end
end,
{}
)
-- GitTopicEdit
-- TopicDiff
vim.api.nvim_create_user_command(
'GitTopicEdit',
'TopicDiff',
function(ctx)
local hash = git_parent_branch(ctx.args)
if hash then
git_edit_paths(invoke({'git', 'diff', '--name-only', hash}))
end
end,
{nargs = '?'}
)
-- GitTopicDiff
vim.api.nvim_create_user_command(
'GitTopicDiff',
function(ctx)
local hash = git_parent_branch(ctx.args)
local hash = get_branch_parent()
if hash then
invoke({'git', 'difftool', '-d', hash})
end
end,
{nargs = '?'}
{}
)

@ -0,0 +1 @@
Subproject commit 90b818788249bb080f9eddcc4b36ad4080b55c5c

@ -1 +0,0 @@
Subproject commit 62cb8f37b3a017e6b2401726c96e02498f332b70

@ -0,0 +1 @@
Subproject commit f6cb5b17897ff0c38f60fecd4b529678bcfec259

@ -1 +1 @@
Subproject commit 0a5a66803c7407767b799067986b4dc3036e1983
Subproject commit 7d131a8d3ba5016229e8a1d08bf8782acea98852

@ -1 +1 @@
Subproject commit ce9a2e8eaba5649b553529c5498acb43a6c317cd
Subproject commit b49b976cf2c28cd8283e9d74cb10885f6dd9e3d0

@ -1 +1 @@
Subproject commit ce0cdf8538c8c0b9c8fb2884d3d1090c8faf515d
Subproject commit a408e6bb101066952b81de9c11be367114bd561f

@ -1 +1 @@
Subproject commit ce16de5665c766f39c271705b17fff06f7bcb84f
Subproject commit 04e0ca376d6abdbfc8b52180f8ea236cbfddf782

@ -1 +1 @@
Subproject commit 9266dc26862d8f3556c2ca77602e811472b4c5b8
Subproject commit 41f40dc4b86f3e166cf08115f621001972565a20

@ -1 +1 @@
Subproject commit 8aad4396840be7fc42896e3011751b7609ca4119
Subproject commit 4f71c0c4a196ceb656c824a70792f3df3ce6bb6d

@ -1 +1 @@
Subproject commit d0ccc1a5172f6a26182238767e60e08b931d11fa
Subproject commit 8b0fc3711760195aba104e2d190cff9af8267052

@ -1 +1 @@
Subproject commit 3851bedb7f191b9a4a5531000b6fc0a8795cc9bb
Subproject commit 0966b866580ec5cc8fbc26ee396a516d72600db5

@ -1 +1 @@
Subproject commit 9815a55dbcd817784458df7a18acacc6f82b1241
Subproject commit 12dd6316974f71ce333e360c0260b4e1f81169c3

@ -1 +1 @@
Subproject commit dac8e5c2d85926df92672bf2afb4fc48656d96c7
Subproject commit fab00f7c0f3a08e860e39c7adeb8fbe849921a98

@ -1 +1 @@
Subproject commit feef9b31507f8e942bcd21f9e1f22d587c83c72d
Subproject commit 76cab3355fee04e750f69ccd34787b2570c6de7a

@ -1 +0,0 @@
Subproject commit 23b67752cb869dd9c8f3109173b69aa96a1f3acf

@ -1 +1 @@
Subproject commit 8670143f9e12ed1cd3c9b2c54f345cdd9a4baac3
Subproject commit 7d538b77a5a8806e344b057f8846f6d0c035efa9