started migrating code from after to the plugins folder
This commit is contained in:
5
.luarc.json
Normal file
5
.luarc.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"diagnostics.disable": [
|
||||||
|
"unused-local"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
function Color(color)
|
|
||||||
local catppuccin_colors = require('catppuccin.palettes').get_palette('mocha')
|
|
||||||
|
|
||||||
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
|
|
||||||
vim.api.nvim_set_hl(0, "NormalNC", { bg = "none" })
|
|
||||||
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
|
|
||||||
vim.api.nvim_set_hl(0, "FloatBorder", { fg = catppuccin_colors.surface2 })
|
|
||||||
vim.api.nvim_set_hl(0, "StatusLine", { bg = "none" })
|
|
||||||
-- If Vim thinks StatusLine and StatusLineNC are the same it overrides these settings
|
|
||||||
vim.api.nvim_set_hl(0, "StatusLineNC", { ctermbg = 0, bg = "none" })
|
|
||||||
vim.api.nvim_set_hl(0, "CursorLine", { link = "Visual" })
|
|
||||||
vim.api.nvim_set_hl(0, "Pmenu", { link = "Normal" })
|
|
||||||
vim.api.nvim_set_hl(0, "PmenuSel", { link = "Visual" })
|
|
||||||
vim.api.nvim_set_hl(0, "PmenuSbar", { link = "Normal" })
|
|
||||||
vim.api.nvim_set_hl(0, "CmpPmenuBorder", { fg = catppuccin_colors.surface2 })
|
|
||||||
end
|
|
||||||
|
|
||||||
Color()
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
local harpoon = require("harpoon")
|
|
||||||
|
|
||||||
-- REQUIRED
|
|
||||||
harpoon:setup()
|
|
||||||
-- REQUIRED
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>a", function() harpoon:list():add() end)
|
|
||||||
vim.keymap.set("n", "<C-e>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
|
|
||||||
|
|
||||||
for i = 1, 9, 1 do
|
|
||||||
vim.keymap.set("n", string.format("<leader>%s", i), function() harpoon:list():select(i) end)
|
|
||||||
end
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
require("telescope").setup({
|
|
||||||
defaults = {
|
|
||||||
layout_strategy = "horizontal",
|
|
||||||
layout_config = {
|
|
||||||
horizontal = {
|
|
||||||
prompt_position = "bottom",
|
|
||||||
preview_width = 0.55,
|
|
||||||
results_width = 0.8,
|
|
||||||
},
|
|
||||||
vertical = {
|
|
||||||
mirror = false,
|
|
||||||
},
|
|
||||||
width = 0.87,
|
|
||||||
height = 0.80,
|
|
||||||
preview_cutoff = 120,
|
|
||||||
},
|
|
||||||
borderchars = require("409.ui").telescope_border,
|
|
||||||
prompt_prefix = " ",
|
|
||||||
color_devicons = true,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
local builtin = require("telescope.builtin")
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>pf", builtin.find_files, {})
|
|
||||||
vim.keymap.set("n", "<C-p>", builtin.git_files, {})
|
|
||||||
vim.keymap.set("n", "<leader>pt", ":TodoTelescope<CR>")
|
|
||||||
vim.keymap.set("n", "<leader>ps", function()
|
|
||||||
local status, result = pcall(function()
|
|
||||||
return vim.fn.input("Grep > ")
|
|
||||||
end)
|
|
||||||
--
|
|
||||||
-- prevent keyboard interrupt error
|
|
||||||
if not status then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
builtin.grep_string({ search = result })
|
|
||||||
end)
|
|
||||||
vim.keymap.set("n", "<leader>pl", builtin.live_grep)
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<C-b>", ":Telescope buffers<CR>")
|
|
||||||
|
|
||||||
vim.api.nvim_set_hl(0, "TelescopeSelection", { link = "Visual" })
|
|
||||||
@@ -1,11 +1,93 @@
|
|||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
dependencies = { "nvim-lua/plenary.nvim" },
|
cmd = "Telescope",
|
||||||
},
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
{
|
opts = {
|
||||||
"ThePrimeagen/harpoon",
|
defaults = {
|
||||||
branch = "harpoon2",
|
layout_strategy = "horizontal",
|
||||||
dependencies = { "nvim-lua/plenary.nvim" },
|
layout_config = {
|
||||||
},
|
horizontal = {
|
||||||
|
prompt_position = "bottom",
|
||||||
|
preview_width = 0.55,
|
||||||
|
results_width = 0.8,
|
||||||
|
},
|
||||||
|
vertical = {
|
||||||
|
mirror = false,
|
||||||
|
},
|
||||||
|
width = 0.87,
|
||||||
|
height = 0.80,
|
||||||
|
preview_cutoff = 120,
|
||||||
|
},
|
||||||
|
borderchars = require("409.ui").telescope_border,
|
||||||
|
prompt_prefix = " ",
|
||||||
|
color_devicons = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>pf",
|
||||||
|
":Telescope find_files<CR>",
|
||||||
|
desc = "Find files"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<C-p>",
|
||||||
|
":Telescope git_files<CR>",
|
||||||
|
desc = "Find files (git)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>pt",
|
||||||
|
":TodoTelescope<CR>",
|
||||||
|
desc = "Find TODOs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>ps",
|
||||||
|
function()
|
||||||
|
local status, result = pcall(function()
|
||||||
|
return vim.fn.input("Grep > ")
|
||||||
|
end)
|
||||||
|
--
|
||||||
|
-- prevent keyboard interrupt error
|
||||||
|
if not status then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
require("telescope.builtin").grep_string({ search = result })
|
||||||
|
end,
|
||||||
|
desc = "Grep (root dir)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>pl",
|
||||||
|
function()
|
||||||
|
require("telescope.builtin").live_grep()
|
||||||
|
end,
|
||||||
|
desc = "Live grep (root dir)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<C-b>",
|
||||||
|
":Telescope buffers<CR>",
|
||||||
|
desc = "Find buffers"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
vim.api.nvim_set_hl(0, "TelescopeSelection", { link = "Visual" })
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ThePrimeagen/harpoon",
|
||||||
|
branch = "harpoon2",
|
||||||
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
|
config = function()
|
||||||
|
local harpoon = require("harpoon")
|
||||||
|
|
||||||
|
harpoon.setup()
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>a", function() harpoon:list():add() end)
|
||||||
|
vim.keymap.set("n", "<C-e>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
|
||||||
|
|
||||||
|
for i = 1, 9, 1 do
|
||||||
|
vim.keymap.set("n", string.format("<leader>%s", i), function() harpoon:list():select(i) end)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,21 @@ return {
|
|||||||
priority = 1000,
|
priority = 1000,
|
||||||
config = function()
|
config = function()
|
||||||
vim.cmd.colorscheme('catppuccin-mocha')
|
vim.cmd.colorscheme('catppuccin-mocha')
|
||||||
|
|
||||||
|
local catppuccin_colors = require('catppuccin.palettes').get_palette('mocha')
|
||||||
|
|
||||||
|
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
|
||||||
|
vim.api.nvim_set_hl(0, "NormalNC", { bg = "none" })
|
||||||
|
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
|
||||||
|
vim.api.nvim_set_hl(0, "FloatBorder", { fg = catppuccin_colors.surface2 })
|
||||||
|
vim.api.nvim_set_hl(0, "StatusLine", { bg = "none" })
|
||||||
|
-- If Vim thinks StatusLine and StatusLineNC are the same it overrides these settings
|
||||||
|
vim.api.nvim_set_hl(0, "StatusLineNC", { ctermbg = 0, bg = "none" })
|
||||||
|
vim.api.nvim_set_hl(0, "CursorLine", { link = "Visual" })
|
||||||
|
vim.api.nvim_set_hl(0, "Pmenu", { link = "Normal" })
|
||||||
|
vim.api.nvim_set_hl(0, "PmenuSel", { link = "Visual" })
|
||||||
|
vim.api.nvim_set_hl(0, "PmenuSbar", { link = "Normal" })
|
||||||
|
vim.api.nvim_set_hl(0, "CmpPmenuBorder", { fg = catppuccin_colors.surface2 })
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user