This commit is contained in:
newbie 2024-01-20 00:48:15 +08:00
parent e8e3fa6a3d
commit c39a6f7f09
6 changed files with 90 additions and 65 deletions

View File

@ -1,7 +1,14 @@
return {
'vijaymarupudi/nvim-fzf', -- fzf
'lilydjwg/colorizer', -- 颜色识别
require('plugs.nvim-lspconfig'),
require('plugs.nvimtree'), -- nvimtree
require('plugs.theme'), -- theme
require("plugs.edit-plugs"),
require("plugs.toggleterm"),
require("plugs.dev"),
-- leetcode刷题
{
"kawre/leetcode.nvim",
build = ":TSUpdate html",
@ -23,12 +30,4 @@ return {
},
},
require('plugs.nvim-lspconfig'),
require('plugs.nvimtree'), -- nvimtree
require('plugs.theme'), -- theme
require("plugs.edit-plugs"),
require("plugs.toggleterm")
}

28
lua/plugs/dev.lua Normal file
View File

@ -0,0 +1,28 @@
return {
'lilydjwg/colorizer', -- 颜色识别
{
-- 类似postman的curl工具
"rest-nvim/rest.nvim",
dependencies = { { "nvim-lua/plenary.nvim" } },
config = function()
require("rest-nvim").setup({
--- Get the same options from Packer setup
})
end
},
{
-- go开发
"ray-x/go.nvim",
dependencies = { -- optional packages
"ray-x/guihua.lua",
"neovim/nvim-lspconfig",
"nvim-treesitter/nvim-treesitter",
},
config = function()
require("go").setup()
end,
event = { "CmdlineEnter" },
ft = { "go", 'gomod' },
build = ':lua require("go.install").update_all_sync()' -- if you need to install/update all binaries
}
}

View File

@ -1,4 +1,5 @@
return {
'vijaymarupudi/nvim-fzf', -- fzf
{
-- surround 和 wildfire 配合有神奇的效果
'tpope/vim-surround',
@ -53,6 +54,54 @@ return {
-- },
{
-- hop
require("plugs.hop")
"phaazon/hop.nvim",
branch = "v2",
keys = {
"f", "F", "t", "T",
"<c-f>"
},
lazy = true,
config = function()
require("hop").setup { keys = 'asdfghjkl;' }
local hop = require('hop')
local directions = require('hop.hint').HintDirection
G.map({
{ "n", "<c-f>", ":HopChar2MW<CR>", { noremap = true } },
{ "n", "f",
function()
hop.hint_char1({
direction = directions.AFTER_CURSOR,
current_line_only = true
})
end, { noremap = true }
},
{ "n", "F",
function()
hop.hint_char1({
direction = directions.BEFORE_CURSOR,
current_line_only = true
})
end, { noremap = true }
},
{ "n", "t",
function()
hop.hint_char1({
direction = directions.AFTER_CURSOR,
current_line_only = true,
hint_offset = -1
})
end, { noremap = true }
},
{ "n", "T",
function()
hop.hint_char1({
direction = directions.BEFORE_CURSOR,
current_line_only = true,
hint_offset = -1
})
end, { noremap = true }
},
})
end
}
}

View File

@ -1,51 +0,0 @@
return {
"phaazon/hop.nvim",
branch = "v2",
keys = {
"f", "F", "t", "T",
"<c-f>"
},
lazy = true,
config = function()
require("hop").setup { keys = 'asdfghjkl;' }
local hop = require('hop')
local directions = require('hop.hint').HintDirection
G.map({
{ "n", "<c-f>", ":HopChar2MW<CR>", { noremap = true } },
{ "n", "f",
function()
hop.hint_char1({
direction = directions.AFTER_CURSOR,
current_line_only = true
})
end, { noremap = true }
},
{ "n", "F",
function()
hop.hint_char1({
direction = directions.BEFORE_CURSOR,
current_line_only = true
})
end, { noremap = true }
},
{ "n", "t",
function()
hop.hint_char1({
direction = directions.AFTER_CURSOR,
current_line_only = true,
hint_offset = -1
})
end, { noremap = true }
},
{ "n", "T",
function()
hop.hint_char1({
direction = directions.BEFORE_CURSOR,
current_line_only = true,
hint_offset = -1
})
end, { noremap = true }
},
})
end
}

View File

@ -239,6 +239,9 @@ return {
local treesitter_opt = {
ensure_installed = {},
indent = { enable = true },
ignore_install = {
"go", "txt"
},
sync_install = false,
auto_install = true,
highlight = {

View File

@ -1,7 +1,4 @@
require 'lazy'.setup({
require("plugs.hop"),
require('plugs.edit-plugs'),
-- 'vijaymarupudi/nvim-fzf', -- fzf
})