mirror of
https://github.com/Baipyrus/nvim-config.git
synced 2024-12-27 05:41:45 +00:00
Compare commits
7 Commits
9fb7d5de4b
...
689f994fbd
Author | SHA1 | Date | |
---|---|---|---|
689f994fbd | |||
e95ecf56e6 | |||
9a4a5f31ae | |||
69c8790f6e | |||
15d4cfcdf7 | |||
12aa2d8a7b | |||
37ccad6701 |
@ -1,8 +0,0 @@
|
|||||||
-- Set keymap to open chat in browser
|
|
||||||
vim.keymap.set('n', '<leader>cc', ':execute codeium#Chat()<Enter>', { desc = '[C]odeium [C]hat' })
|
|
||||||
|
|
||||||
return {
|
|
||||||
-- Free Github Copilot alternative
|
|
||||||
'Exafunction/codeium.vim',
|
|
||||||
event = 'BufEnter',
|
|
||||||
}
|
|
@ -5,17 +5,18 @@ vim.g.conflict_marker_highlight_group = ''
|
|||||||
vim.g.conflict_marker_begin = '^<<<<<<< .*$'
|
vim.g.conflict_marker_begin = '^<<<<<<< .*$'
|
||||||
vim.g.conflict_marker_end = '^>>>>>>> .*$'
|
vim.g.conflict_marker_end = '^>>>>>>> .*$'
|
||||||
|
|
||||||
-- Highlight groups
|
|
||||||
vim.cmd 'highlight ConflictMarkerBegin guibg=#2f7366'
|
|
||||||
vim.cmd 'highlight ConflictMarkerOurs guibg=#2e5049'
|
|
||||||
vim.cmd 'highlight ConflictMarkerTheirs guibg=#344f69'
|
|
||||||
vim.cmd 'highlight ConflictMarkerEnd guibg=#2f628e'
|
|
||||||
vim.cmd 'highlight ConflictMarkerCommonAncestorsHunk guibg=#754a81'
|
|
||||||
|
|
||||||
-- Git conflict marker management plugin
|
-- Git conflict marker management plugin
|
||||||
return {
|
return {
|
||||||
|
{
|
||||||
'rhysd/conflict-marker.vim',
|
'rhysd/conflict-marker.vim',
|
||||||
config = function()
|
config = function()
|
||||||
|
-- Highlight groups
|
||||||
|
vim.cmd 'highlight ConflictMarkerBegin guibg=#2f7366'
|
||||||
|
vim.cmd 'highlight ConflictMarkerOurs guibg=#2e5049'
|
||||||
|
vim.cmd 'highlight ConflictMarkerTheirs guibg=#344f69'
|
||||||
|
vim.cmd 'highlight ConflictMarkerEnd guibg=#2f628e'
|
||||||
|
vim.cmd 'highlight ConflictMarkerCommonAncestorsHunk guibg=#754a81'
|
||||||
|
|
||||||
-- Read all lines in buffer, check if there is any conflict marker
|
-- Read all lines in buffer, check if there is any conflict marker
|
||||||
function git_conflict_detection()
|
function git_conflict_detection()
|
||||||
local lines = vim.api.nvim_buf_get_lines(0, 0, -1, false)
|
local lines = vim.api.nvim_buf_get_lines(0, 0, -1, false)
|
||||||
@ -41,4 +42,5 @@ return {
|
|||||||
callback = git_conflict_detection,
|
callback = git_conflict_detection,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
@ -1,15 +1,5 @@
|
|||||||
-- Switch in fugitive.vim status window with the current one
|
|
||||||
vim.keymap.set('n', '<leader>gs', '<cmd>Gedit :<cr>', { desc = '[G]it [S]tatus' })
|
|
||||||
-- Fetch all changes
|
|
||||||
vim.keymap.set('n', '<leader>gF', '<cmd>Git fetch<cr>', { desc = '[G]it [F]etch' })
|
|
||||||
-- Push changes
|
|
||||||
vim.keymap.set('n', '<leader>gP', '<cmd>Git push<cr>', { desc = '[G]it [P]ush' })
|
|
||||||
-- Pull changes
|
|
||||||
vim.keymap.set('n', '<leader>gp', '<cmd>Git pull<cr>', { desc = '[G]it [P]ull' })
|
|
||||||
-- Open history graph
|
|
||||||
vim.keymap.set('n', '<leader>gl', '<cmd>Flogsplit<cr><cmd>wincmd k<cr><cmd>q<cr>', { desc = '[G]it [L]og' })
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
{
|
||||||
-- Git related plugins
|
-- Git related plugins
|
||||||
'tpope/vim-fugitive',
|
'tpope/vim-fugitive',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
@ -20,4 +10,17 @@ return {
|
|||||||
},
|
},
|
||||||
'idanarye/vim-merginal',
|
'idanarye/vim-merginal',
|
||||||
},
|
},
|
||||||
|
config = function()
|
||||||
|
-- Switch in fugitive.vim status window with the current one
|
||||||
|
vim.keymap.set('n', '<leader>gs', '<cmd>Gedit :<cr>', { desc = '[G]it [S]tatus' })
|
||||||
|
-- Fetch all changes
|
||||||
|
vim.keymap.set('n', '<leader>gF', '<cmd>Git fetch<cr>', { desc = '[G]it [F]etch' })
|
||||||
|
-- Push changes
|
||||||
|
vim.keymap.set('n', '<leader>gP', '<cmd>Git push<cr>', { desc = '[G]it [P]ush' })
|
||||||
|
-- Pull changes
|
||||||
|
vim.keymap.set('n', '<leader>gp', '<cmd>Git pull<cr>', { desc = '[G]it [P]ull' })
|
||||||
|
-- Open history graph
|
||||||
|
vim.keymap.set('n', '<leader>gl', '<cmd>Flogsplit<cr><cmd>wincmd k<cr><cmd>q<cr>', { desc = '[G]it [L]og' })
|
||||||
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
-- Plugin to intelligently reopen files at last edit position
|
-- Plugin to intelligently reopen files at last edit position
|
||||||
return {
|
return {
|
||||||
|
{
|
||||||
'farmergreg/vim-lastplace',
|
'farmergreg/vim-lastplace',
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
return {
|
return {
|
||||||
|
{
|
||||||
-- Set lualine as statusline
|
-- Set lualine as statusline
|
||||||
'nvim-lualine/lualine.nvim',
|
'nvim-lualine/lualine.nvim',
|
||||||
-- See `:help lualine.txt`
|
-- See `:help lualine.txt`
|
||||||
@ -10,4 +11,5 @@ return {
|
|||||||
component_separators = { left = '', right = '' },
|
component_separators = { left = '', right = '' },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
-- Markdown preview plugin
|
-- Markdown preview plugin
|
||||||
return {
|
return {
|
||||||
|
{
|
||||||
'iamcco/markdown-preview.nvim',
|
'iamcco/markdown-preview.nvim',
|
||||||
cmd = { 'MarkdownPreviewToggle', 'MarkdownPreview', 'MarkdownPreviewStop' },
|
cmd = { 'MarkdownPreviewToggle', 'MarkdownPreview', 'MarkdownPreviewStop' },
|
||||||
build = 'cd app; npm install',
|
build = 'cd app; npm install',
|
||||||
@ -7,4 +8,5 @@ return {
|
|||||||
vim.g.mkdp_filetypes = { 'markdown' }
|
vim.g.mkdp_filetypes = { 'markdown' }
|
||||||
end,
|
end,
|
||||||
ft = { 'markdown' },
|
ft = { 'markdown' },
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
-- Smooth scroll plugin and keymaps
|
-- Smooth scroll plugin and keymaps
|
||||||
return {
|
return {
|
||||||
|
{
|
||||||
'karb94/neoscroll.nvim',
|
'karb94/neoscroll.nvim',
|
||||||
enabled = not vim.g.neovide,
|
enabled = not vim.g.neovide,
|
||||||
config = function()
|
config = function()
|
||||||
@ -25,4 +26,5 @@ return {
|
|||||||
['zb'] = { 'zb', { '40' } },
|
['zb'] = { 'zb', { '40' } },
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
@ -9,12 +9,25 @@ vim.api.nvim_create_autocmd('BufLeave', {
|
|||||||
})
|
})
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
{
|
||||||
'stevearc/oil.nvim',
|
'stevearc/oil.nvim',
|
||||||
opts = {},
|
|
||||||
-- Optional dependencies
|
-- Optional dependencies
|
||||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||||
config = function()
|
config = function()
|
||||||
require('oil').setup()
|
local oil = require 'oil'
|
||||||
vim.keymap.set('n', '<leader>fe', require('oil').open, { desc = '[F]ile [E]xplorer' })
|
oil.setup {
|
||||||
|
view_options = {
|
||||||
|
show_hidden = true,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>fe', function()
|
||||||
|
if vim.bo.filetype == 'oil' then
|
||||||
|
oil.close()
|
||||||
|
else
|
||||||
|
oil.open()
|
||||||
|
end
|
||||||
|
end, { desc = '[F]ile [E]xplorer' })
|
||||||
end,
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
return {
|
return {
|
||||||
|
{
|
||||||
-- Simple task runner plugin
|
-- Simple task runner plugin
|
||||||
'stevearc/overseer.nvim',
|
'stevearc/overseer.nvim',
|
||||||
opts = {},
|
opts = {},
|
||||||
@ -44,4 +45,5 @@ return {
|
|||||||
-- Run task by listing all in floating
|
-- Run task by listing all in floating
|
||||||
vim.keymap.set('n', '<leader>or', '<cmd>OverseerRun<cr>', { desc = '[O]verseer [R]un' })
|
vim.keymap.set('n', '<leader>or', '<cmd>OverseerRun<cr>', { desc = '[O]verseer [R]un' })
|
||||||
end,
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
-- For more options, you can see `:help option-list`
|
-- For more options, you can see `:help option-list`
|
||||||
|
|
||||||
-- Set display language
|
-- Set display language
|
||||||
vim.cmd('language en_US', {})
|
vim.cmd 'language en_US'
|
||||||
|
|
||||||
-- Shell options
|
-- Shell options
|
||||||
-- Sets the shell to use for system() and ! commands in windows
|
-- Sets the shell to use for system() and ! commands in windows
|
||||||
|
Loading…
Reference in New Issue
Block a user