mirror of
https://github.com/hyzendust/KickestEnd.nvim.git
synced 2026-02-15 07:21:14 +01:00
Fix: text hightlight on select all and copy
This commit is contained in:
@@ -30,7 +30,6 @@ return {
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- Enable telescope fzf native, if installed
|
||||
pcall(require('telescope').load_extension, 'fzf')
|
||||
|
||||
@@ -191,7 +190,6 @@ return {
|
||||
end,
|
||||
}
|
||||
end, { desc = 'Switch to Open Buffers' })
|
||||
|
||||
-- Telescope live_grep in git root
|
||||
-- Function to find the git root directory based on the current buffer's path
|
||||
local function find_git_root()
|
||||
@@ -206,7 +204,6 @@ return {
|
||||
-- Extract the directory from the current file's path
|
||||
current_dir = vim.fn.fnamemodify(current_file, ':h')
|
||||
end
|
||||
|
||||
-- Find the Git root directory from the current file's path
|
||||
local git_root = vim.fn.systemlist('git -C ' .. vim.fn.escape(current_dir, ' ') .. ' rev-parse --show-toplevel')[1]
|
||||
if vim.v.shell_error ~= 0 then
|
||||
@@ -215,7 +212,6 @@ return {
|
||||
end
|
||||
return git_root
|
||||
end
|
||||
|
||||
-- Custom live_grep function to search in git root
|
||||
local function live_grep_git_root()
|
||||
local git_root = find_git_root()
|
||||
@@ -225,9 +221,7 @@ return {
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
vim.api.nvim_create_user_command('LiveGrepGitRoot', live_grep_git_root, {})
|
||||
|
||||
-- See `:help telescope.builtin`
|
||||
vim.keymap.set('n', '<leader>/', function()
|
||||
-- You can pass additional configuration to telescope to change theme, layout, etc.
|
||||
@@ -236,7 +230,6 @@ return {
|
||||
previewer = false,
|
||||
})
|
||||
end, { desc = '[/] Fuzzily search in current buffer' })
|
||||
|
||||
local function telescope_live_grep_open_files()
|
||||
require('telescope.builtin').live_grep {
|
||||
grep_open_files = true,
|
||||
|
||||
Reference in New Issue
Block a user