-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
592 additions
and
584 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- lua_source {{{ | ||
vim.g.copilot_filetypes = { | ||
gitcommit = true, | ||
markdown = true, | ||
yaml = true, | ||
text = true, | ||
} | ||
vim.g.copilot_no_tab_map = true | ||
|
||
vim.keymap.set( | ||
"i", | ||
"<C-c>", | ||
'copilot#Accept()', | ||
{ silent = true, expr = true, script = true, replace_keycodes = false } | ||
) | ||
vim.keymap.set( | ||
"i", | ||
"<C-x>", | ||
'<Plug>(copilot-dismiss)' | ||
) | ||
--- }}} | ||
|
||
--- lua_post_source {{{ | ||
local function append_diff() | ||
-- Get the Git repository root directory | ||
local git_dir = vim.fn.FugitiveGitDir() | ||
local git_root = vim.fn.fnamemodify(git_dir, ':h') | ||
-- Get the diff of the staged changes relative to the Git repository root | ||
local diff = vim.fn.system('git -C ' .. git_root .. ' diff --cached') | ||
-- Add a comment character to each line of the diff | ||
local comment_diff = table.concat(vim.tbl_map(function(line) | ||
return '# ' .. line | ||
end, vim.split(diff, '\n')), "\n") | ||
-- Append the diff to the commit message | ||
vim.api.nvim_buf_set_lines(0, -1, -1, false, vim.split(comment_diff, '\n')) | ||
end | ||
vim.cmd [[ | ||
autocmd BufReadPost COMMIT_EDITMSG call lua append_diff() | ||
]] | ||
--- }}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,50 @@ | ||
[[plugins]] | ||
repo = 'cohama/lexima.vim' | ||
on_event = 'InsertEnter' | ||
|
||
[[plugins]] | ||
repo = 'hrsh7th/nvim-cmp' | ||
on_event = 'VimEnter' | ||
hooks_file = '$XDG_CONFIG_HOME/nvim/lua/plugins/completion/nvim-cmp.lua' | ||
|
||
[[plugins]] | ||
repo = 'hrsh7th/cmp-nvim-lsp' | ||
on_event = 'VimEnter' | ||
|
||
[[plugins]] | ||
repo = 'hrsh7th/cmp-buffer' | ||
on_event = 'VimEnter' | ||
|
||
[[plugins]] | ||
repo = 'hrsh7th/cmp-path' | ||
on_event = 'VimEnter' | ||
|
||
[[plugins]] | ||
repo = 'hrsh7th/cmp-cmdline' | ||
on_event = 'VimEnter' | ||
|
||
[[plugins]] | ||
repo = 'hrsh7th/cmp-nvim-lsp-signature-help' | ||
on_event = 'VimEnter' | ||
|
||
[[plugins]] | ||
repo = 'hrsh7th/cmp-nvim-lsp-document-symbol' | ||
on_event = 'VimEnter' | ||
|
||
[[plugins]] | ||
repo = 'onsails/lspkind.nvim' | ||
on_event = 'VimEnter' | ||
|
||
[[plugins]] | ||
repo = 'hrsh7th/vim-vsnip' | ||
on_event = 'VimEnter' | ||
hooks_file = '$XDG_CONFIG_HOME/nvim/lua/plugins/completion/vim-vsnip.lua' | ||
|
||
[[plugins]] | ||
repo = 'hrsh7th/cmp-vsnip' | ||
on_event = 'VimEnter' | ||
|
||
[[plugins]] | ||
repo = 'github/copilot.vim' | ||
on_event = 'VimEnter' | ||
hooks_file = '$XDG_CONFIG_HOME/nvim/lua/plugins/completion/copilot.lua' |
Oops, something went wrong.