chg: Switched to fzf-lua

This commit is contained in:
Sayantan Santra 2024-03-28 01:57:58 -05:00
parent 53e41dc35c
commit cce40ca731
Signed by: SinTan1729
GPG key ID: EB3E68BFBA25C85F
11 changed files with 118 additions and 22 deletions

View file

@ -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 })

View file

@ -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
View 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()

View file

@ -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 })

View file

@ -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
View 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()

View file

@ -1,13 +1,35 @@
require("lualine").setup{ 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 {
options = { options = {
theme = 'moonfly', theme = 'moonfly',
}, },
tabline = { tabline = {
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,
})

View file

@ -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 })

View file

@ -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
View 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()

View file

@ -1,13 +1,35 @@
require("lualine").setup{ 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 {
options = { options = {
theme = 'moonfly', theme = 'moonfly',
}, },
tabline = { tabline = {
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,
})