Browse Source

Update vim config with smarter key bindings for osc52 and copilot

master
parent
commit
32cd01bfeb
6 changed files with 21 additions and 12 deletions
  1. +2
    -0
      .config/nvim/lua/config/copilot.lua
  2. +0
    -7
      .config/nvim/lua/config/general/remaps.lua
  3. +3
    -2
      .config/nvim/lua/config/neotest.lua
  4. +3
    -0
      .config/nvim/lua/config/osc52.lua
  5. +1
    -1
      .config/nvim/lua/config/telescope.lua
  6. +12
    -2
      .config/nvim/lua/packer-plugins.lua

+ 2
- 0
.config/nvim/lua/config/copilot.lua View File

@ -0,0 +1,2 @@
vim.api.nvim_set_keymap('i', ',,', 'copilot#Accept("<CR>")', { expr = true, silent = true })
vim.api.nvim_set_keymap('n', '<leader>cs', '<cmd>Copilot panel<CR>', { noremap = true })

+ 0
- 7
.config/nvim/lua/config/general/remaps.lua View File

@ -81,10 +81,3 @@ vim.api.nvim_set_keymap('n', '<leader>gC', '<cmd>Git commit -a<CR>', options)
vim.api.nvim_set_keymap("x", "<leader>p", "\"_dP", options)
vim.api.nvim_set_keymap("n", "<leader>d", "\"_d", options)
vim.api.nvim_set_keymap("v", "<leader>d", "\"_d", options)
vim.keymap.set('n', '<leader>c', require('osc52').copy_operator, { expr = true })
vim.keymap.set('n', '<leader>cc', '<leader>c_', {remap = true})
vim.keymap.set('v', '<leader>c', require('osc52').copy_visual)
vim.api.nvim_set_keymap('i', ',,', 'copilot#Accept("<CR>")', {expr = true, silent = true})
vim.api.nvim_set_keymap('n', '<leader>cp', '<cmd>Copilot panel<CR>', options)

+ 3
- 2
.config/nvim/lua/config/neotest.lua View File

@ -5,7 +5,8 @@ require("neotest").setup({
})
require("neotest-phpunit")({
root_files = { "phpunit.xml" },
phpunit_cmd = { "phpunit" },
root_files = { "phpunit.xml", "composer.json" },
-- phpunit_cmd = { "docker-compose exec fpm ./vendor/bin/phpunit" },
phpunit_cmd = { "vendor/bin/phpunit" },
filter_dirs = { "vendor" }
})

+ 3
- 0
.config/nvim/lua/config/osc52.lua View File

@ -0,0 +1,3 @@
vim.keymap.set('n', '<leader>c', require('osc52').copy_operator, { expr = true })
vim.keymap.set('n', '<leader>cc', '<leader>c_', { remap = true })
vim.keymap.set('v', '<leader>c', require('osc52').copy_visual)

+ 1
- 1
.config/nvim/lua/config/telescope.lua View File

@ -65,7 +65,7 @@ end, options)
vim.keymap.set('n', '<leader>fb', require('telescope.builtin').buffers, options)
vim.keymap.set('n', '<leader>fo', require('telescope.builtin').oldfiles, options)
vim.keymap.set('n', '<leader>gr', require('telescope.builtin').lsp_references, options)
vim.keymap.set('n', 'gr', require('telescope.builtin').lsp_references, options)
vim.keymap.set('n', '<leader>m', require('telescope.builtin').marks, options)
vim.keymap.set('n', '<leader>ch', require('telescope.builtin').command_history, options)


+ 12
- 2
.config/nvim/lua/packer-plugins.lua View File

@ -6,9 +6,19 @@ return require('packer').startup(function()
use { 'gruvbox-community/gruvbox' }
use { 'bluz71/vim-moonfly-colors' }
use { 'github/copilot.vim' }
use {
'github/copilot.vim',
config = function()
require('config.copilot')
end
}
use {'ojroques/nvim-osc52'}
use {
'ojroques/nvim-osc52',
config = function()
require('config.osc52')
end
}
use { 'SirVer/ultisnips' }


Loading…
Cancel
Save