Compare commits

...

16 Commits

Author SHA1 Message Date
4cfae23fc0 Merge branch 'master' into dev 2024-04-20 09:05:14 -07:00
4048b8f59b Update git utils 2024-04-19 19:33:16 -07:00
c73f688f2c Update git commands 2024-04-19 19:21:42 -07:00
Alex Yatskov
df4336aacd Update buffer close 2024-04-17 09:18:59 -07:00
5e3d5ff2d9 Update plugins 2024-04-16 19:48:17 -07:00
d3b013b398 fzf tweaks 2024-04-16 18:32:28 -07:00
Alex Yatskov
ebb20dc30a Remove fzf 2024-04-16 12:27:21 -07:00
Alex Yatskov
67b7444ac3 Add fzf-lua 2024-04-16 12:25:52 -07:00
Alex Yatskov
54b0a69482 Switch bat to use Nord theme 2024-04-16 10:43:31 -07:00
ec23ca5566 Enable ginit.lua again 2024-04-14 09:56:51 -07:00
350331207a Update binaries 2024-04-13 22:04:01 -07:00
966b30dc52 Update font 2024-04-13 20:56:09 -07:00
c7572aa2e8 Update font 2024-04-13 11:56:10 -07:00
Alex Yatskov
1aacc80e6e Update scripts 2024-03-27 12:00:52 -07:00
Alex Yatskov
20a34c5699 Add vim-jdaddy 2024-03-27 11:59:00 -07:00
Alex Yatskov
288e8803b3 Update font for Windows 2024-03-06 09:52:33 -08:00
21 changed files with 188 additions and 164 deletions

12
.gitmodules vendored
View File

@ -67,12 +67,6 @@
[submodule "pack/plugins/start/vim-rooter"] [submodule "pack/plugins/start/vim-rooter"]
path = pack/plugins/start/vim-rooter path = pack/plugins/start/vim-rooter
url = https://github.com/airblade/vim-rooter.git 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"] [submodule "pack/plugins/start/neodev.nvim"]
path = pack/plugins/start/neodev.nvim path = pack/plugins/start/neodev.nvim
url = https://github.com/folke/neodev.nvim.git url = https://github.com/folke/neodev.nvim.git
@ -97,6 +91,12 @@
[submodule "pack/plugins/start/vim-quickhl"] [submodule "pack/plugins/start/vim-quickhl"]
path = pack/plugins/start/vim-quickhl path = pack/plugins/start/vim-quickhl
url = https://github.com/t9md/vim-quickhl.git 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 "pack/plugins/start/argonaut.nvim"] [submodule "pack/plugins/start/argonaut.nvim"]
path = pack/plugins/start/argonaut.nvim path = pack/plugins/start/argonaut.nvim
url = https://git.foosoft.net/alex/argonaut.nvim.git url = https://git.foosoft.net/alex/argonaut.nvim.git

View File

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

View File

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

View File

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

View File

@ -1,10 +1,34 @@
-- 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 function invoke(args)
output = vim.fn.system(table.concat(args, ' ')) local output = vim.fn.system(table.concat(args, ' '))
return string.gsub(output, '%s+$', '') return string.gsub(output, '%s+$', '')
end end
local function get_branch_parent() 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 author = invoke({'git', 'config', 'user.name'}) local author = invoke({'git', 'config', 'user.name'})
if #author == 0 then
print('User name is not set')
return
end
local hash = invoke{ local hash = invoke{
'git', 'git',
@ -22,43 +46,42 @@ local function get_branch_parent()
end end
end end
-- UnAlign local function git_edit_paths(names)
vim.api.nvim_create_user_command(
'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'}) local root_dir = invoke({'git', 'rev-parse', '--show-toplevel'})
for name in string.gmatch(names, '[^\r\n]+') do for name in string.gmatch(names, '[^\r\n]+') do
vim.cmd(string.format('e %s/%s', root_dir, name)) vim.cmd(string.format('e %s/%s', root_dir, name))
end end
end end
end
-- GitConflicts
vim.api.nvim_create_user_command(
'GitConflicts',
function()
git_edit_paths(invoke({'git', 'diff', '--name-only', '--diff-filter=U'}))
end, end,
{} {}
) )
-- TopicDiff -- GitTopicEdit
vim.api.nvim_create_user_command( vim.api.nvim_create_user_command(
'TopicDiff', 'GitTopicEdit',
function(ctx) function(ctx)
local hash = get_branch_parent() 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)
if hash then if hash then
invoke({'git', 'difftool', '-d', hash}) invoke({'git', 'difftool', '-d', hash})
end end
end, end,
{} {nargs = '?'}
) )

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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