chg: Switched to fzf-lua
This commit is contained in:
parent
53e41dc35c
commit
cce40ca731
11 changed files with 118 additions and 22 deletions
|
@ -30,12 +30,13 @@ map('n', '<leader>O', "O<Esc>j", { remap = false })
|
||||||
-- Use ,u for redo
|
-- Use ,u for redo
|
||||||
map('n', '<leader>u', "<c-r>", { remap = false })
|
map('n', '<leader>u', "<c-r>", { remap = false })
|
||||||
|
|
||||||
-- Find files using fzf by ,f
|
-- Buffer related keymaps
|
||||||
map('n', '<leader>f', ":Files<cr>", { remap = false })
|
|
||||||
|
|
||||||
-- Move around buffers using ,j and ,k
|
|
||||||
map('n', '<leader>k', ":bnext<cr>", { remap = false })
|
map('n', '<leader>k', ":bnext<cr>", { remap = false })
|
||||||
map('n', '<leader>j', ":bprevious<cr>", { remap = false })
|
map('n', '<leader>j', ":bprevious<cr>", { remap = false })
|
||||||
|
map('n', '<leader>w', ":bdelete<cr>", { remap = false })
|
||||||
|
|
||||||
-- Clear search highlight by Esc in normal mode
|
-- Clear search highlight by Esc in normal mode
|
||||||
map('n', '<Esc>', ':noh<cr>', { remap = false })
|
map('n', '<Esc>', ':noh<cr>', { remap = false })
|
||||||
|
|
||||||
|
-- Find files using fzf by ,f
|
||||||
|
vim.keymap.set('n', '<leader>f', ':Files<cr>', { remap = false, silent = true })
|
||||||
|
|
|
@ -62,8 +62,7 @@ require("lazy").setup(
|
||||||
-- Formatter
|
-- Formatter
|
||||||
"stevearc/conform.nvim",
|
"stevearc/conform.nvim",
|
||||||
"kylechui/nvim-surround",
|
"kylechui/nvim-surround",
|
||||||
"junegunn/fzf",
|
"ibhagwan/fzf-lua",
|
||||||
"junegunn/fzf.vim",
|
|
||||||
"karb94/neoscroll.nvim",
|
"karb94/neoscroll.nvim",
|
||||||
"hiphish/rainbow-delimiters.nvim",
|
"hiphish/rainbow-delimiters.nvim",
|
||||||
"linrongbin16/lsp-progress.nvim",
|
"linrongbin16/lsp-progress.nvim",
|
||||||
|
|
16
laptop/plugin/fzf.lua
Normal file
16
laptop/plugin/fzf.lua
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
local fzf = require("fzf-lua")
|
||||||
|
|
||||||
|
-- Default settings for fzf-lua
|
||||||
|
fzf.setup({
|
||||||
|
actions = {
|
||||||
|
files = {
|
||||||
|
['default'] = fzf.actions.file_tabedit,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
files = {
|
||||||
|
cmd = "rg --files",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Setup the familiar fzf.nvim commands
|
||||||
|
fzf.setup_fzfvim_cmds()
|
|
@ -23,10 +23,13 @@ map('n', '<leader>u', "<c-r>", { remap = false })
|
||||||
-- Find files using fzf by ,f
|
-- Find files using fzf by ,f
|
||||||
map('n', '<leader>f', ":Files<cr>", { remap = false })
|
map('n', '<leader>f', ":Files<cr>", { remap = false })
|
||||||
|
|
||||||
-- Move around buffers using ,j and ,k
|
-- Buffer related keymaps
|
||||||
map('n', '<leader>k', ":bnext<cr>", { remap = false })
|
map('n', '<leader>k', ":bnext<cr>", { remap = false })
|
||||||
map('n', '<leader>j', ":bprevious<cr>", { remap = false })
|
map('n', '<leader>j', ":bprevious<cr>", { remap = false })
|
||||||
|
map('n', '<leader>w', ":bdelete<cr>", { remap = false })
|
||||||
|
|
||||||
-- Clear search highlight by Esc in normal mode
|
-- Clear search highlight by Esc in normal mode
|
||||||
map('n', '<Esc>', ':noh<cr>', { remap = false })
|
map('n', '<Esc>', ':noh<cr>', { remap = false })
|
||||||
|
|
||||||
|
-- Find files using fzf by ,f
|
||||||
|
vim.keymap.set('n', '<leader>f', ':Files<cr>', { remap = false, silent = true })
|
||||||
|
|
|
@ -49,8 +49,7 @@ require("lazy").setup(
|
||||||
-- Syntax highlighting for Fish scripts
|
-- Syntax highlighting for Fish scripts
|
||||||
"khaveesh/vim-fish-syntax",
|
"khaveesh/vim-fish-syntax",
|
||||||
"kylechui/nvim-surround",
|
"kylechui/nvim-surround",
|
||||||
"junegunn/fzf",
|
"ibhagwan/fzf-lua",
|
||||||
"junegunn/fzf.vim",
|
|
||||||
"karb94/neoscroll.nvim",
|
"karb94/neoscroll.nvim",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
16
server/plugin/fzf.lua
Normal file
16
server/plugin/fzf.lua
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
local fzf = require("fzf-lua")
|
||||||
|
|
||||||
|
-- Default settings for fzf-lua
|
||||||
|
fzf.setup({
|
||||||
|
actions = {
|
||||||
|
files = {
|
||||||
|
['default'] = fzf.actions.file_tabedit,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
files = {
|
||||||
|
cmd = "rg --files",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Setup the familiar fzf.nvim commands
|
||||||
|
fzf.setup_fzfvim_cmds()
|
|
@ -1,3 +1,9 @@
|
||||||
|
local function counts()
|
||||||
|
local lc = vim.fn.line('$')
|
||||||
|
local wc = vim.fn.wordcount().words
|
||||||
|
return string.format('%d L, %d W', lc, wc)
|
||||||
|
end
|
||||||
|
|
||||||
require("lualine").setup {
|
require("lualine").setup {
|
||||||
options = {
|
options = {
|
||||||
theme = 'moonfly',
|
theme = 'moonfly',
|
||||||
|
@ -6,8 +12,24 @@ require("lualine").setup{
|
||||||
lualine_a = { 'buffers' },
|
lualine_a = { 'buffers' },
|
||||||
lualine_b = {},
|
lualine_b = {},
|
||||||
lualine_c = {},
|
lualine_c = {},
|
||||||
lualine_x = {},
|
lualine_x = { 'filename' },
|
||||||
lualine_y = {'filename'},
|
lualine_y = { counts },
|
||||||
lualine_z = { 'tabs' },
|
lualine_z = { 'tabs' },
|
||||||
},
|
},
|
||||||
|
sections = {
|
||||||
|
lualine_a = { 'mode' },
|
||||||
|
lualine_b = { 'branch', 'diff', 'diagnostics' },
|
||||||
|
lualine_c = { 'filename' },
|
||||||
|
lualine_x = { 'encoding', 'fileformat', 'filetype' },
|
||||||
|
lualine_y = { 'progress' },
|
||||||
|
lualine_z = { 'location' }
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- listen lsp-progress event and refresh lualine
|
||||||
|
vim.api.nvim_create_augroup("lualine_augroup", { clear = true })
|
||||||
|
vim.api.nvim_create_autocmd("User", {
|
||||||
|
group = "lualine_augroup",
|
||||||
|
pattern = "LspProgressStatusUpdated",
|
||||||
|
callback = require("lualine").refresh,
|
||||||
|
})
|
||||||
|
|
|
@ -21,10 +21,13 @@ map('n', '<leader>u', "<c-r>", { remap = false })
|
||||||
-- Find files using fzf by ,f
|
-- Find files using fzf by ,f
|
||||||
map('n', '<leader>f', ":Files<cr>", { remap = false })
|
map('n', '<leader>f', ":Files<cr>", { remap = false })
|
||||||
|
|
||||||
-- Move around buffers using ,j and ,k
|
-- Buffer related keymaps
|
||||||
map('n', '<leader>k', ":bnext<cr>", { remap = false })
|
map('n', '<leader>k', ":bnext<cr>", { remap = false })
|
||||||
map('n', '<leader>j', ":bprevious<cr>", { remap = false })
|
map('n', '<leader>j', ":bprevious<cr>", { remap = false })
|
||||||
|
map('n', '<leader>w', ":bdelete<cr>", { remap = false })
|
||||||
|
|
||||||
-- Clear search highlight by Esc in normal mode
|
-- Clear search highlight by Esc in normal mode
|
||||||
map('n', '<Esc>', ':noh<cr>', { remap = false })
|
map('n', '<Esc>', ':noh<cr>', { remap = false })
|
||||||
|
|
||||||
|
-- Find files using fzf by ,f
|
||||||
|
vim.keymap.set('n', '<leader>f', ':Files<cr>', { remap = false, silent = true })
|
||||||
|
|
|
@ -49,8 +49,7 @@ require("lazy").setup(
|
||||||
-- Syntax highlighting for Fish scripts
|
-- Syntax highlighting for Fish scripts
|
||||||
"khaveesh/vim-fish-syntax",
|
"khaveesh/vim-fish-syntax",
|
||||||
"kylechui/nvim-surround",
|
"kylechui/nvim-surround",
|
||||||
"junegunn/fzf",
|
"ibhagwan/fzf-lua",
|
||||||
"junegunn/fzf.vim",
|
|
||||||
"karb94/neoscroll.nvim",
|
"karb94/neoscroll.nvim",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
16
vps/plugin/fzf.lua
Normal file
16
vps/plugin/fzf.lua
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
local fzf = require("fzf-lua")
|
||||||
|
|
||||||
|
-- Default settings for fzf-lua
|
||||||
|
fzf.setup({
|
||||||
|
actions = {
|
||||||
|
files = {
|
||||||
|
['default'] = fzf.actions.file_tabedit,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
files = {
|
||||||
|
cmd = "rg --files",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Setup the familiar fzf.nvim commands
|
||||||
|
fzf.setup_fzfvim_cmds()
|
|
@ -1,3 +1,9 @@
|
||||||
|
local function counts()
|
||||||
|
local lc = vim.fn.line('$')
|
||||||
|
local wc = vim.fn.wordcount().words
|
||||||
|
return string.format('%d L, %d W', lc, wc)
|
||||||
|
end
|
||||||
|
|
||||||
require("lualine").setup {
|
require("lualine").setup {
|
||||||
options = {
|
options = {
|
||||||
theme = 'moonfly',
|
theme = 'moonfly',
|
||||||
|
@ -6,8 +12,24 @@ require("lualine").setup{
|
||||||
lualine_a = { 'buffers' },
|
lualine_a = { 'buffers' },
|
||||||
lualine_b = {},
|
lualine_b = {},
|
||||||
lualine_c = {},
|
lualine_c = {},
|
||||||
lualine_x = {},
|
lualine_x = { 'filename' },
|
||||||
lualine_y = {'filename'},
|
lualine_y = { counts },
|
||||||
lualine_z = { 'tabs' },
|
lualine_z = { 'tabs' },
|
||||||
},
|
},
|
||||||
|
sections = {
|
||||||
|
lualine_a = { 'mode' },
|
||||||
|
lualine_b = { 'branch', 'diff', 'diagnostics' },
|
||||||
|
lualine_c = { 'filename' },
|
||||||
|
lualine_x = { 'encoding', 'fileformat', 'filetype' },
|
||||||
|
lualine_y = { 'progress' },
|
||||||
|
lualine_z = { 'location' }
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- listen lsp-progress event and refresh lualine
|
||||||
|
vim.api.nvim_create_augroup("lualine_augroup", { clear = true })
|
||||||
|
vim.api.nvim_create_autocmd("User", {
|
||||||
|
group = "lualine_augroup",
|
||||||
|
pattern = "LspProgressStatusUpdated",
|
||||||
|
callback = require("lualine").refresh,
|
||||||
|
})
|
||||||
|
|
Loading…
Reference in a new issue