mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
feat(nvim): Change picker to FzfLua
This commit is contained in:
parent
e0ca95b7a4
commit
c25d4ec182
10 changed files with 128 additions and 82 deletions
|
|
@ -32,9 +32,9 @@ return {
|
|||
opts = {
|
||||
variant = "dawn",
|
||||
},
|
||||
cmd = "Telescope colorscheme",
|
||||
cmd = "FzfLua colorschemes",
|
||||
},
|
||||
{ "rebelot/kanagawa.nvim", cmd = "Telescope colorscheme" },
|
||||
{ "rebelot/kanagawa.nvim", cmd = "FzfLua colorschemes" },
|
||||
{ -- Modern Status Line
|
||||
"nvim-lualine/lualine.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
|
|
@ -43,55 +43,55 @@ return {
|
|||
require("plugins.mod.lualine")
|
||||
end,
|
||||
},
|
||||
{ -- Breadcrumb
|
||||
"Bekaboo/dropbar.nvim",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
build = "make",
|
||||
},
|
||||
opts = {},
|
||||
keys = {
|
||||
{
|
||||
"<Leader>+",
|
||||
function()
|
||||
require("dropbar.api").pick()
|
||||
end,
|
||||
desc = "Pick symbols in winbar",
|
||||
},
|
||||
{
|
||||
"[;",
|
||||
function()
|
||||
require("dropbar.api").goto_context_start()
|
||||
end,
|
||||
desc = "Go to start of current context",
|
||||
},
|
||||
{
|
||||
"];",
|
||||
function()
|
||||
require("dropbar.api").select_next_context()
|
||||
end,
|
||||
desc = "Select next context",
|
||||
},
|
||||
},
|
||||
},
|
||||
-- { -- Breadcrumb
|
||||
-- "Bekaboo/dropbar.nvim",
|
||||
-- dependencies = {
|
||||
-- "nvim-telescope/telescope-fzf-native.nvim",
|
||||
-- build = "make",
|
||||
-- },
|
||||
-- opts = {},
|
||||
-- keys = {
|
||||
-- {
|
||||
-- "<Leader>+",
|
||||
-- function()
|
||||
-- require("dropbar.api").pick()
|
||||
-- end,
|
||||
-- desc = "Pick symbols in winbar",
|
||||
-- },
|
||||
-- {
|
||||
-- "[;",
|
||||
-- function()
|
||||
-- require("dropbar.api").goto_context_start()
|
||||
-- end,
|
||||
-- desc = "Go to start of current context",
|
||||
-- },
|
||||
-- {
|
||||
-- "];",
|
||||
-- function()
|
||||
-- require("dropbar.api").select_next_context()
|
||||
-- end,
|
||||
-- desc = "Select next context",
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
{ import = "plugins.mod.bufferline" }, -- Buffer Top Bar
|
||||
{ -- Git Blames, Changes
|
||||
{ -- Git Blames, Changes
|
||||
"lewis6991/gitsigns.nvim",
|
||||
opts = {
|
||||
current_line_blame = true,
|
||||
},
|
||||
event = "BufReadPre",
|
||||
keys = {
|
||||
{ "<leader>gb", "<cmd>Gitsigns blame<CR>", desc = "Blame file" },
|
||||
{ "<leader>gd", "<cmd>Gitsigns diffthis<CR>", desc = "Diff file" },
|
||||
{ "<leader>gb", "<cmd>Gitsigns blame<CR>", desc = "Blame file" },
|
||||
{ "<leader>gd", "<cmd>Gitsigns diffthis<CR>", desc = "Diff file" },
|
||||
{ "<leader>gB", "<cmd>Gitsigns toggle_current_line_blame<CR>", desc = "Toggle line blame" },
|
||||
},
|
||||
},
|
||||
{ -- Highlight and navigate between TODOs
|
||||
"folke/todo-comments.nvim",
|
||||
cmd = { "TodoTelescope" },
|
||||
event = "BufRead",
|
||||
opts = {},
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
},
|
||||
-- { -- Highlight and navigate between TODOs
|
||||
-- "folke/todo-comments.nvim",
|
||||
-- cmd = { "TodoTelescope" },
|
||||
-- event = "BufRead",
|
||||
-- opts = {},
|
||||
-- dependencies = { "nvim-lua/plenary.nvim" },
|
||||
-- },
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,23 +11,23 @@ return {
|
|||
},
|
||||
},
|
||||
-- { import = "plugins.mod.nvim-tree" },
|
||||
{ import = "plugins.mod.telescope" },
|
||||
-- { import = "plugins.mod.fzf" },
|
||||
{
|
||||
"ahmedkhalf/project.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
detection_methods = { "lsp", "pattern" },
|
||||
patterns = { ".git", "Makefile", "package.json" },
|
||||
sync_root_with_cwd = true,
|
||||
silent_chdir = true,
|
||||
scope_chdir = "global",
|
||||
},
|
||||
config = function()
|
||||
require("telescope").load_extension("projects")
|
||||
end,
|
||||
dependencies = { "nvim-telescope/telescope.nvim" },
|
||||
},
|
||||
-- { import = "plugins.mod.telescope" },
|
||||
{ import = "plugins.mod.fzf" },
|
||||
-- {
|
||||
-- "ahmedkhalf/project.nvim",
|
||||
-- event = "VeryLazy",
|
||||
-- opts = {
|
||||
-- detection_methods = { "lsp", "pattern" },
|
||||
-- patterns = { ".git", "Makefile", "package.json" },
|
||||
-- sync_root_with_cwd = true,
|
||||
-- silent_chdir = true,
|
||||
-- scope_chdir = "global",
|
||||
-- },
|
||||
-- config = function()
|
||||
-- require("telescope").load_extension("projects")
|
||||
-- end,
|
||||
-- dependencies = { "nvim-telescope/telescope.nvim" },
|
||||
-- },
|
||||
-- {
|
||||
-- "NeogitOrg/neogit",
|
||||
-- config = true,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
return {
|
||||
"epwalsh/obsidian.nvim",
|
||||
"obsidian-nvim/obsidian.nvim",
|
||||
version = "*", -- recommended, use latest release instead of latest commit
|
||||
-- lazy = false,
|
||||
ft = "markdown",
|
||||
|
|
@ -38,11 +38,15 @@ return {
|
|||
-- "BufReadPre path/to/my-vault/*.md",
|
||||
-- "BufNewFile path/to/my-vault/*.md",
|
||||
-- },
|
||||
keys = {
|
||||
{ "<leader>fo", "<cmd>ObsidianQuickSwitch<CR>", desc = "Obsidian: Quick Switch" },
|
||||
},
|
||||
dependencies = {
|
||||
-- Required.
|
||||
"nvim-lua/plenary.nvim",
|
||||
|
||||
-- see below for full list of optional dependencies 👇
|
||||
"ibhagwan/fzf-lua",
|
||||
},
|
||||
opts = {
|
||||
workspaces = {
|
||||
|
|
@ -53,11 +57,18 @@ return {
|
|||
},
|
||||
completion = {
|
||||
nvim_cmp = false,
|
||||
blink = true,
|
||||
min_chars = 2,
|
||||
},
|
||||
ui = {
|
||||
enable = false,
|
||||
},
|
||||
daily_notes = {
|
||||
folder = "_Global/Periodic",
|
||||
date_format = "%Y-%m-%d",
|
||||
default_tags = { "daily" },
|
||||
template = nil,
|
||||
},
|
||||
-- see below for full list of options 👇
|
||||
attachments = {
|
||||
img_folder = "_Global/Assets",
|
||||
|
|
@ -65,5 +76,14 @@ return {
|
|||
return string.format("%s-", os.time())
|
||||
end,
|
||||
},
|
||||
mappings = {
|
||||
["<cr>"] = {
|
||||
action = function()
|
||||
require("obsidian").util.smart_action()
|
||||
end,
|
||||
opts = { buffer = true, expr = true },
|
||||
},
|
||||
},
|
||||
new_notes_location = "current_dir",
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ return {
|
|||
{
|
||||
"nvim-orgmode/orgmode",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
"nvim-orgmode/telescope-orgmode.nvim",
|
||||
-- "nvim-telescope/telescope.nvim",
|
||||
-- "nvim-orgmode/telescope-orgmode.nvim",
|
||||
"nvim-orgmode/org-bullets.nvim",
|
||||
"Saghen/blink.cmp",
|
||||
},
|
||||
|
|
@ -65,11 +65,11 @@ return {
|
|||
},
|
||||
})
|
||||
|
||||
require("telescope").setup()
|
||||
require("telescope").load_extension("orgmode")
|
||||
-- require("telescope").setup()
|
||||
-- require("telescope").load_extension("orgmode")
|
||||
-- vim.keymap.set("n", "<leader>r", require("telescope").extensions.orgmode.refile_heading)
|
||||
vim.keymap.set("n", "<leader>oP", require("telescope").extensions.orgmode.search_headings)
|
||||
vim.keymap.set("n", "<leader>op", "<cmd>Telescope find_files cwd=~/OrgFiles<CR>")
|
||||
-- vim.keymap.set("n", "<leader>oP", require("telescope").extensions.orgmode.search_headings)
|
||||
vim.keymap.set("n", "<leader>op", "<cmd>FzfLua files cwd=~/OrgFiles<CR>")
|
||||
-- vim.keymap.set("n", "<leader>li", require("telescope").extensions.orgmode.insert_link)
|
||||
end,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
|||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
|
|
@ -19,4 +19,4 @@ vim.opt.rtp:prepend(lazypath)
|
|||
-- loading lazy.nvim so that mappings are correct.
|
||||
-- This is also a good place to setup other settings (vim.opt)
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = "<C-k>"
|
||||
vim.g.maplocalleader = "\\"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
return {
|
||||
{ "nvim-lua/plenary.nvim", lazy = true },
|
||||
{ "wakatime/vim-wakatime", lazy = false },
|
||||
{ "nvim-lua/plenary.nvim", lazy = true },
|
||||
{ "wakatime/vim-wakatime", lazy = false },
|
||||
{ import = "plugins.mod.toggleterm" },
|
||||
{ import = "plugins.mod.which-keys-nvim" },
|
||||
{ import = "plugins.mod.copilot-lua" },
|
||||
|
|
@ -14,7 +14,8 @@ return {
|
|||
lazy = true,
|
||||
-- event = "VeryLazy",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
-- "nvim-telescope/telescope.nvim",
|
||||
"ibhagwan/fzf-lua",
|
||||
"nvim-lua/plenary.nvim",
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@ return {
|
|||
-- for example
|
||||
provider = "openai",
|
||||
openai = {
|
||||
endpoint = "https://yunwu.ai/v1",
|
||||
endpoint = "https://aihubmix.com/v1",
|
||||
model = "claude-3-7-sonnet-20250219", -- your desired model (or use gpt-4o, etc.)
|
||||
timeout = 30000, -- timeout in milliseconds
|
||||
temperature = 0, -- adjust if needed
|
||||
timeout = 30000, -- timeout in milliseconds
|
||||
temperature = 0, -- adjust if needed
|
||||
max_tokens = 4096,
|
||||
-- reasoning_effort = "high" -- only supported for "o" models
|
||||
},
|
||||
|
|
@ -25,10 +25,11 @@ return {
|
|||
"nvim-lua/plenary.nvim",
|
||||
"MunifTanjim/nui.nvim",
|
||||
--- The below dependencies are optional,
|
||||
"nvim-telescope/telescope.nvim", -- for file_selector provider telescope
|
||||
"hrsh7th/nvim-cmp", -- autocompletion for avante commands and mentions
|
||||
-- "nvim-telescope/telescope.nvim", -- for file_selector provider telescope
|
||||
"ibhagwan/fzf-lua",
|
||||
"hrsh7th/nvim-cmp", -- autocompletion for avante commands and mentions
|
||||
"nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons
|
||||
"zbirenbaum/copilot.lua", -- for providers='copilot'
|
||||
"zbirenbaum/copilot.lua", -- for providers='copilot'
|
||||
{
|
||||
-- support for image pasting
|
||||
"HakonHarnes/img-clip.nvim",
|
||||
|
|
|
|||
|
|
@ -2,5 +2,29 @@ return {
|
|||
"ibhagwan/fzf-lua",
|
||||
-- optional for icon support
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
cmd = "FzfLua",
|
||||
keys = {
|
||||
{ "<leader><leader>", "<cmd>FzfLua files<CR>", desc = "Find Files" },
|
||||
{ "<leader>fc", "<cmd>FzfLua files cwd=~/.config/nvim<CR>", desc = "Edit configs" },
|
||||
{ "<leader>/", "<cmd>FzfLua live_grep<CR>", desc = "Grep Files" },
|
||||
{ "<leader>;", "<cmd>FzfLua<CR>", desc = "Show Telescope Commands" },
|
||||
{ "<leader>ui", "<cmd>FzfLua colorschemes<CR>", desc = "Change colorscheme" },
|
||||
-- find_files { "<leader>pp", "<cmd>FzfLua projects<CR>", desc = "Listfind_files all Projects" },
|
||||
{ "<leader>pd", "<cmd>FzfLua zoxide<CR>", desc = "List recent directories" },
|
||||
-- { "<leader>pg", "<cmd>FzfLua projects<CR>", desc = "List all Git Projects" },
|
||||
{ "<leader>ps", "<cmd>FzfLua session-lens<CR>", desc = "List all sessions" },
|
||||
{ "<leader>gs", "<cmd>FzfLua git_status<CR>", desc = "Git Status" },
|
||||
{ "<leader>gt", "<cmd>FzfLua git_branches<CR>", desc = "Git Branches" },
|
||||
{ "<leader>gc", "<cmd>FzfLua git_commits<CR>", desc = "Show commits" },
|
||||
{ "<leader>fb", "<cmd>FzfLua buffers<CR>", desc = "List Buffers" },
|
||||
{ "<leader>ff", "<cmd>FzfLua fd<CR>", desc = "Find Files" },
|
||||
{ "<leader>fh", "<cmd>FzfLua oldfiles<CR>", desc = "Recent Files" },
|
||||
{ "<leader>ce", "<cmd>FzfLua diagnostics<CR>", desc = "Navigate errors/warnings" },
|
||||
{ "<leader>cs", "<cmd>FzfLua treesitter<CR>", desc = "Search symbols" },
|
||||
{ "<leader>cS", "<cmd>FzfLua grep_string<CR>", desc = "Search current symbol" },
|
||||
{ "<leader>bB", "<cmd>FzfLua buffers<CR>", desc = "List Buffers" },
|
||||
{ "<leader>fl", ":FzfLua filetypes", desc = "Set Filetype/Lang to ..." },
|
||||
{ "<leader>R", "<cmd>FzfLua resume<CR>", desc = "Resume FzfLua" },
|
||||
},
|
||||
opts = {},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,14 +11,14 @@ return {
|
|||
enabled = true,
|
||||
preset = {
|
||||
keys = {
|
||||
{ key = "p", icon = " ", desc = "查找项目", action = "<cmd>Telescope projects<CR>" },
|
||||
{ key = "h", icon = " ", desc = "历史文件", action = "<cmd>Telescope oldfiles<CR>" },
|
||||
-- { key = "p", icon = " ", desc = "查找项目", action = "<cmd>Telescope projects<CR>" },
|
||||
{ key = "h", icon = " ", desc = "历史文件", action = "<cmd>FzfLua oldfiles<CR>" },
|
||||
{ key = "l", icon = " ", desc = "加载会话", action = "<cmd>SessionSearch<CR>" },
|
||||
{
|
||||
key = "c",
|
||||
icon = " ",
|
||||
desc = "转到设置",
|
||||
action = "<cmd>Telescope find_files cwd=~/.config/nvim<CR>",
|
||||
action = "<cmd>FzfLua files cwd=~/.config/nvim<CR>",
|
||||
},
|
||||
{ key = "q", icon = " ", desc = "退出", action = "<cmd>qa<CR>" },
|
||||
},
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ return {
|
|||
{ "<leader>fc", "<cmd>Telescope find_files cwd=~/.config/nvim<CR>", desc = "Edit configs" },
|
||||
{ "<leader>/", "<cmd>Telescope live_grep<CR>", desc = "Grep Files" },
|
||||
{ "<leader>;", "<cmd>Telescope<CR>", desc = "Show Telescope Commands" },
|
||||
{ "<leader>ui", "<cmd>Telescope colorscheme<CR>", desc = "Change colorscheme" },
|
||||
{ "<leader>ui", "<cmd>FzfLua colorscheme<CR>", desc = "Change colorscheme" },
|
||||
{ "<leader>pp", "<cmd>Telescope projects<CR>", desc = "List all Projects" },
|
||||
{ "<leader>pg", "<cmd>Telescope projects<CR>", desc = "List all Git Projects" },
|
||||
{ "<leader>ps", "<cmd>Telescope session-lens<CR>", desc = "List all sessions" },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue