mirror of
https://github.com/Baipyrus/nvim-config.git
synced 2024-12-28 14:21:45 +00:00
Compare commits
No commits in common. "62df1661f9a0e2467f1c2ff9dd4d512d07e3f45e" and "baba79c8b11760736a51a0b17b20e3c02eebe61b" have entirely different histories.
62df1661f9
...
baba79c8b1
@ -1,14 +0,0 @@
|
|||||||
-- File: lua/custom/plugins/autopairs.lua
|
|
||||||
|
|
||||||
return {
|
|
||||||
'windwp/nvim-autopairs',
|
|
||||||
-- Optional dependency
|
|
||||||
dependencies = { 'hrsh7th/nvim-cmp' },
|
|
||||||
config = function()
|
|
||||||
require('nvim-autopairs').setup {}
|
|
||||||
-- If you want to automatically add `(` after selecting a function or method
|
|
||||||
local cmp_autopairs = require 'nvim-autopairs.completion.cmp'
|
|
||||||
local cmp = require 'cmp'
|
|
||||||
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())
|
|
||||||
end,
|
|
||||||
}
|
|
@ -1,18 +0,0 @@
|
|||||||
-- Unless you are still migrating, remove the deprecated commands from v1.x
|
|
||||||
vim.cmd [[ let g:neo_tree_remove_legacy_commands = 1 ]]
|
|
||||||
|
|
||||||
-- Open nvim-neo-tree window
|
|
||||||
vim.keymap.set({ 'n', 'v' }, '<leader>f', ':Neotree toggle<enter>', { desc = 'Explore [F]ile Tree' })
|
|
||||||
|
|
||||||
return {
|
|
||||||
'nvim-neo-tree/neo-tree.nvim',
|
|
||||||
version = '*',
|
|
||||||
dependencies = {
|
|
||||||
'nvim-lua/plenary.nvim',
|
|
||||||
'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended
|
|
||||||
'MunifTanjim/nui.nvim',
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require('neo-tree').setup {}
|
|
||||||
end,
|
|
||||||
}
|
|
5
lua/custom/plugins/init.lua
Normal file
5
lua/custom/plugins/init.lua
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
-- You can add your own plugins here or in other files in this directory!
|
||||||
|
-- I promise not to create any merge conflicts in this directory :)
|
||||||
|
--
|
||||||
|
-- See the kickstart.nvim README for more information
|
||||||
|
return {}
|
@ -31,15 +31,10 @@ vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper win
|
|||||||
|
|
||||||
-- Delete (currently selected) text without yanking it
|
-- Delete (currently selected) text without yanking it
|
||||||
vim.keymap.set({ 'n', 'v' }, '<leader>dny', '"_d', { desc = '[D]elete [N]o [Y]ank' })
|
vim.keymap.set({ 'n', 'v' }, '<leader>dny', '"_d', { desc = '[D]elete [N]o [Y]ank' })
|
||||||
|
|
||||||
-- Replace currently selected text with default register without yanking it
|
-- Replace currently selected text with default register without yanking it
|
||||||
vim.keymap.set('v', '<leader>pny', '"_dP', { desc = '[P]aste [N]o [Y]ank' })
|
vim.keymap.set('v', '<leader>pny', '"_dP', { desc = '[P]aste [N]o [Y]ank' })
|
||||||
|
|
||||||
-- Populate CMD to prepare for change directory
|
|
||||||
vim.keymap.set('n', '<leader>cd', ':cd ', { desc = 'Prepare CMD for [C]hange [D]irectory' })
|
|
||||||
|
|
||||||
-- Open git window from fugitive in full screen
|
|
||||||
vim.keymap.set({ 'n', 'v' }, '<leader>go', ':Git<enter><C-w>o', { desc = '[G]it [O]pen' })
|
|
||||||
|
|
||||||
-- Highlight when yanking (copying) text
|
-- Highlight when yanking (copying) text
|
||||||
-- Try it with `yap` in normal mode
|
-- Try it with `yap` in normal mode
|
||||||
-- See `:help vim.highlight.on_yank()`
|
-- See `:help vim.highlight.on_yank()`
|
||||||
|
@ -9,11 +9,7 @@
|
|||||||
-- :Lazy update
|
-- :Lazy update
|
||||||
--
|
--
|
||||||
-- NOTE: Here is where you install your plugins.
|
-- NOTE: Here is where you install your plugins.
|
||||||
require('lazy').setup {
|
require('lazy').setup({
|
||||||
|
|
||||||
-- [[ Plugin Specs list ]]
|
|
||||||
|
|
||||||
|
|
||||||
-- NOTE: First, some plugins that don't require any configuration
|
-- NOTE: First, some plugins that don't require any configuration
|
||||||
-- Discord RPC
|
-- Discord RPC
|
||||||
'andweeb/presence.nvim',
|
'andweeb/presence.nvim',
|
||||||
@ -298,7 +294,7 @@ require('lazy').setup {
|
|||||||
--
|
--
|
||||||
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
||||||
-- For additional information see: :help lazy.nvim-lazy.nvim-structuring-your-plugins
|
-- For additional information see: :help lazy.nvim-lazy.nvim-structuring-your-plugins
|
||||||
{ import = 'custom.plugins' },
|
-- { import = 'custom.plugins' },
|
||||||
}
|
}, {})
|
||||||
|
|
||||||
-- vim: ts=2 sts=2 sw=2 et
|
-- vim: ts=2 sts=2 sw=2 et
|
||||||
|
@ -19,7 +19,6 @@ pcall(require('telescope').load_extension, 'ui-select')
|
|||||||
|
|
||||||
-- See `:help telescope.builtin`
|
-- See `:help telescope.builtin`
|
||||||
local builtin = require 'telescope.builtin'
|
local builtin = require 'telescope.builtin'
|
||||||
local actions = require 'telescope.actions'
|
|
||||||
|
|
||||||
-- Telescope live_grep in git root
|
-- Telescope live_grep in git root
|
||||||
-- Function to find the git root directory based on the current buffer's path
|
-- Function to find the git root directory based on the current buffer's path
|
||||||
@ -77,31 +76,7 @@ end
|
|||||||
vim.keymap.set('n', '<leader>s/', telescope_live_grep_open_files, { desc = '[S]earch [/] in Open Files' })
|
vim.keymap.set('n', '<leader>s/', telescope_live_grep_open_files, { desc = '[S]earch [/] in Open Files' })
|
||||||
vim.keymap.set('n', '<leader>ss', builtin.builtin, { desc = '[S]earch [S]elect Telescope' })
|
vim.keymap.set('n', '<leader>ss', builtin.builtin, { desc = '[S]earch [S]elect Telescope' })
|
||||||
vim.keymap.set('n', '<leader>gf', builtin.git_files, { desc = 'Search [G]it [F]iles' })
|
vim.keymap.set('n', '<leader>gf', builtin.git_files, { desc = 'Search [G]it [F]iles' })
|
||||||
vim.keymap.set('n', '<leader>sf', function()
|
vim.keymap.set('n', '<leader>sf', builtin.find_files, { desc = '[S]earch [F]iles' })
|
||||||
builtin.find_files {
|
|
||||||
-- This will ignore the directories you specified
|
|
||||||
find_command = {
|
|
||||||
'rg',
|
|
||||||
'--files',
|
|
||||||
'--hidden',
|
|
||||||
'-u',
|
|
||||||
'-g',
|
|
||||||
'!{' .. table.concat({
|
|
||||||
'.git',
|
|
||||||
'target',
|
|
||||||
'node_modules',
|
|
||||||
'.svelte-kit',
|
|
||||||
'bin',
|
|
||||||
'obj',
|
|
||||||
}, ',') .. '}',
|
|
||||||
},
|
|
||||||
attach_mappings = function(_, map)
|
|
||||||
map('i', '<CR>', actions.select_default + actions.center)
|
|
||||||
return true
|
|
||||||
end,
|
|
||||||
desc = '[S]earch [F]iles',
|
|
||||||
}
|
|
||||||
end)
|
|
||||||
vim.keymap.set('n', '<leader>sh', builtin.help_tags, { desc = '[S]earch [H]elp' })
|
vim.keymap.set('n', '<leader>sh', builtin.help_tags, { desc = '[S]earch [H]elp' })
|
||||||
vim.keymap.set('n', '<leader>sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' })
|
vim.keymap.set('n', '<leader>sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' })
|
||||||
vim.keymap.set('n', '<leader>sw', builtin.grep_string, { desc = '[S]earch current [W]ord' })
|
vim.keymap.set('n', '<leader>sw', builtin.grep_string, { desc = '[S]earch current [W]ord' })
|
||||||
|
Loading…
Reference in New Issue
Block a user