update plugin settings

This commit is contained in:
Ray Andrew 2023-07-30 18:04:37 -05:00
parent 7ee1e5bfb4
commit b0f86dc82d
No known key found for this signature in database
GPG key ID: E2E8D63137DD489E
4 changed files with 270 additions and 9 deletions

View file

@ -33,6 +33,7 @@
"nvim-web-devicons": { "branch": "master", "commit": "efbfed0567ef4bfac3ce630524a0f6c8451c5534" },
"playground": { "branch": "master", "commit": "2b81a018a49f8e476341dfcb228b7b808baba68b" },
"plenary.nvim": { "branch": "master", "commit": "267282a9ce242bbb0c5dc31445b6d353bed978bb" },
"readline.nvim": { "branch": "master", "commit": "cab666cbd026dea9c817182e22255ecb3b3419b1" },
"refactoring.nvim": { "branch": "master", "commit": "5359e74291164fcaeaaecdea9ba753ad54eb53d0" },
"rose-pine": { "branch": "main", "commit": "e29002cbee4854a9c8c4b148d8a52fae3176070f" },
"telescope.nvim": { "branch": "master", "commit": "b6fccfb0f7589a87587875206786daccba62acc3" },
@ -41,6 +42,7 @@
"undotree": { "branch": "master", "commit": "0e11ba7325efbbb3f3bebe06213afa3e7ec75131" },
"vim-fugitive": { "branch": "master", "commit": "b3b838d690f315a503ec4af8c634bdff3b200aaf" },
"vim-illuminate": { "branch": "master", "commit": "a2907275a6899c570d16e95b9db5fd921c167502" },
"vim-startuptime": { "branch": "master", "commit": "454b3de856b7bd298700de33d79774ca9b9e3875" },
"vim-tmux-navigator": { "branch": "master", "commit": "cdd66d6a37d991bba7997d593586fc51a5b37aa8" },
"which-key.nvim": { "branch": "main", "commit": "7ccf476ebe0445a741b64e36c78a682c1c6118b7" },
"zen-mode.nvim": { "branch": "main", "commit": "68f554702de63f4b7b6b6d4bcb10178f41a0acc7" }

View file

@ -20,12 +20,20 @@ require("lazy").setup({
lazy = false,
version = false,
},
checker = {
enabled = true,
notify = false,
frequency = 3600 * 12,
},
change_detection = {
enabled = true,
notify = false,
},
checker = { enabled = true },
performance = {
cache = {
enabled = true,
},
reset_packpath = true,
rtp = {
-- disable some rtp plugins
disabled_plugins = {

View file

@ -4,6 +4,16 @@ return {
{ "folke/lazy.nvim", version = "*" },
{ "nvim-lua/plenary.nvim", lazy = true },
{
"dstein64/vim-startuptime",
-- lazy-load on a command
cmd = "StartupTime",
-- init is called during startup. Configuration for vim plugins typically should be set in an init function
init = function()
vim.g.startuptime_tries = 10
end,
},
------------------------------
-- Telescope
------------------------------
@ -23,6 +33,17 @@ return {
end,
desc = "Find in Files (Grep)",
},
{
"<leader>ps",
function()
local Util = require("rayandrew.util")
local fun = Util.telescope("grep_string", {
search = vim.fn.input("Grep > "),
})
fun()
end,
desc = "Find in Files (Grep)",
},
{
"<leader>bb",
function()
@ -50,6 +71,33 @@ return {
end,
desc = "Find Files (cwd)",
},
{
"<c-p>",
function()
local Util = require("rayandrew.util")
local fun = Util.telescope("git_files")
fun()
end,
desc = "Find Git Files",
},
{
"<space>sm",
function()
local Util = require("rayandrew.util")
local fun = Util.telescope("man_pages")
fun()
end,
desc = "Find Manual",
},
{
"<space>sh",
function()
local Util = require("rayandrew.util")
local fun = Util.telescope("help_tags")
fun()
end,
desc = "Find Help Tags",
},
},
},
@ -290,7 +338,6 @@ return {
{
"folke/noice.nvim",
enabled = true,
event = "VeryLazy",
opts = {
lsp = {
@ -299,6 +346,16 @@ return {
["vim.lsp.util.stylize_markdown"] = true,
["cmp.entry.get_documentation"] = true,
},
hover = {
enabled = false,
},
signature = {
enabled = false,
},
},
cmdline = {
enabled = true,
view = "cmdline",
},
routes = {
{
@ -567,7 +624,7 @@ return {
"hrsh7th/nvim-cmp",
event = "InsertEnter",
dependencies = {
{ "L3MON4D3/LuaSnip" },
{ "L3MON4D3/LuaSnip", build = "make install_jsregexp" },
{
"zbirenbaum/copilot-cmp",
dependencies = "copilot.lua",
@ -601,23 +658,28 @@ return {
{ name = "path", group_index = 2 },
{ name = "luasnip", group_index = 2 },
},
mapping = {
mapping = cmp.mapping.preset.insert({
["<C-Space>"] = cmp.mapping.complete(),
["<C-f>"] = cmp_action.luasnip_jump_forward(),
["<C-b>"] = cmp_action.luasnip_jump_backward(),
["<C-p>"] = cmp.mapping.select_prev_item(cmp_select),
["<C-n>"] = cmp.mapping.select_next_item(cmp_select),
["<C-y>"] = cmp.mapping.confirm({ select = true }),
["<Tab>"] = nil,
["<S-Tab>"] = nil,
["<Tab>"] = cmp_action.luasnip_supertab(),
["<S-Tab>"] = cmp_action.luasnip_supertab(),
["<CR>"] = cmp.mapping.confirm({
-- documentation says this is important.
-- I don't know why.
behavior = cmp.ConfirmBehavior.Replace,
select = false,
}),
},
}),
sorting,
snippet = {
expand = function(args)
require("luasnip").lsp_expand(args.body)
end,
},
})
end,
},
@ -797,10 +859,12 @@ return {
},
-- comments
{ "JoosepAlviste/nvim-ts-context-commentstring", lazy = true },
{
"echasnovski/mini.comment",
event = "VeryLazy",
dependencies = {
{ "JoosepAlviste/nvim-ts-context-commentstring", lazy = true },
},
opts = {
options = {
custom_commentstring = function()
@ -811,11 +875,154 @@ return {
},
},
-- RSI compatibility
{
"linty-org/readline.nvim",
event = "VeryLazy",
keys = {
{
"<M-f>",
function()
require("readline").forward_word()
end,
mode = "!",
},
{
"<M-b>",
function()
require("readline").backward_word()
end,
mode = "!",
},
{
"<M-d>",
function()
require("readline").kill_word()
end,
mode = "!",
},
{
"<M-BS>",
function()
require("readline").backward_kill_word()
end,
mode = "!",
},
{
"<C-w>",
function()
require("readline").unix_word_rubout()
end,
mode = "!",
},
{
"<C-k>",
function()
require("readline").kill_line()
end,
mode = "!",
},
{
"<C-u>",
function()
require("readline").backward_kill_line()
end,
mode = "!",
},
{
"<C-a>",
function()
require("readline").beginning_of_line()
end,
mode = "!",
},
{
"<C-e>",
function()
require("readline").end_of_line()
end,
mode = "!",
},
{ "<C-f>", "<Right>", mode = "!" }, -- forward-char
{ "<C-b>", "<Left>", mode = "!" }, -- backward-char
{ "<C-n>", "<Down>", mode = "!" }, -- next-line
{ "<C-p>", "<Up>", mode = "!" }, -- previous-line
{ "<C-d>", "<Delete>", mode = "!" }, -- delete-char
{ "<C-h>", "<BS>", mode = "!" }, -- backward-delete-char
},
},
{
"tpope/vim-fugitive",
cmd = { "Git" },
},
{
"laytan/cloak.nvim",
event = {
"BufEnter .env*",
},
cmd = {
"CloakEnable",
"CloakDisable",
"CloakToggle",
},
opts = {
enabled = true,
cloak_character = "*",
-- The applied highlight group (colors) on the cloaking, see `:h highlight`.
highlight_group = "Comment",
patterns = {
{
file_pattern = {
".env*",
".dev.vars",
},
-- Match an equals sign and any character after it.
-- This can also be a table of patterns to cloak,
-- example: cloak_pattern = { ":.+", "-.+" } for yaml files.
cloak_pattern = "=.+",
},
},
},
config = function(_, opts)
require("cloak").setup(opts)
end,
},
{
"theprimeagen/harpoon",
event = "VeryLazy",
keys = {
{
"<leader>ha",
function()
local mark = require("harpoon.mark")
mark.add_file()
vim.print("Added to Harpoon " .. vim.fn.expand("%"))
end,
desc = "Harpoon Add File",
},
{
"<leader>he",
function()
local ui = require("harpoon.ui")
ui.toggle_quick_menu()
end,
desc = "Harpoon UI",
},
{
"<leader>h1",
function()
local ui = require("harpoon.ui")
ui.nav_file(1)
end,
},
{
"<leader>h2",
function()
local ui = require("harpoon.ui")
ui.nav_file(2)
end,
},
},
},
{
"theprimeagen/refactoring.nvim",
@ -949,8 +1156,45 @@ return {
wk.register(opts.defaults)
end,
},
-- zen
{
"folke/zen-mode.nvim",
opts = {
window = {
width = 90,
},
plugins = {
tmux = {
enabled = true,
},
},
on_open = function(_win)
vim.wo.wrap = false
vim.wo.number = false
vim.wo.rnu = false
end,
on_close = function()
vim.wo.wrap = true
vim.wo.number = true
vim.wo.rnu = true
end,
},
keys = {
{
"<leader>z",
function()
-- require("zen-mode").setup({
-- window = {
-- width = 90,
-- options = {},
-- },
-- })
require("zen-mode").toggle()
require("rayandrew.theme").recolor()
end,
},
},
},
-- Flash Telescope config
@ -999,7 +1243,6 @@ return {
},
-- Copilot Lualine
{
"nvim-lualine/lualine.nvim",
-- optional = true,

View file

@ -77,4 +77,12 @@ M.icons = {
},
}
function M.recolor(color)
color = color or M.colorscheme
vim.cmd.colorscheme(color)
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
end
return M