improve startup time from >250ms to ~70ms

This commit is contained in:
2024-11-22 13:43:37 -05:00
parent 19474801dd
commit 9e03718a80
20 changed files with 667 additions and 588 deletions
+8 -7
View File
@@ -1,6 +1,7 @@
return { return {
"rmagatti/auto-session", 'rmagatti/auto-session',
lazy = false, -- lazy = false,
event = 'VeryLazy',
---@module "auto-session" ---@module "auto-session"
---@type AutoSession.Config ---@type AutoSession.Config
@@ -12,13 +13,13 @@ return {
previewer = false, previewer = false,
mappings = { mappings = {
delete_session = { "i", "<C-D>" }, delete_session = { 'i', '<C-D>' },
alternate_session = { "i", "<C-S>" }, alternate_session = { 'i', '<C-S>' },
copy_session = { "i", "<C-Y>" }, copy_session = { 'i', '<C-Y>' },
}, },
}, },
bypass_save_filetypes = { "alpha", "dashboard" }, -- don't save dashboard/greeter to a session bypass_save_filetypes = { 'alpha', 'dashboard' }, -- don't save dashboard/greeter to a session
-- Folders listed here will not have sessions created within. -- Folders listed here will not have sessions created within.
suppress_dirs = { "~/", "~/Downloads", "~/Documents", "~/Desktop", "/" }, suppress_dirs = { '~/', '~/Downloads', '~/Documents', '~/Desktop', '/' },
}, },
} }
+14 -21
View File
@@ -1,12 +1,13 @@
return { return {
"akinsho/bufferline.nvim", 'akinsho/bufferline.nvim',
dependencies = { "nvim-tree/nvim-web-devicons" }, dependencies = { 'nvim-tree/nvim-web-devicons' },
version = "*", version = '*',
event = 'VeryLazy',
opts = { opts = {
options = { options = {
mode = "buffer", mode = 'buffer',
separator_style = "slant", separator_style = 'slant',
diagnostics = "nvim_lsp", diagnostics = 'nvim_lsp',
-- diagnostics_indicator = function(count, level, diagnostics_dict, context) -- diagnostics_indicator = function(count, level, diagnostics_dict, context)
-- local s = " " -- local s = " "
-- for e, n in pairs(diagnostics_dict) do -- for e, n in pairs(diagnostics_dict) do
@@ -21,15 +22,15 @@ return {
show_buffer_icons = true, show_buffer_icons = true,
persist_buffer_sort = true, persist_buffer_sort = true,
indicator = { indicator = {
style = "underline", style = 'underline',
}, },
offsets = { offsets = {
{ {
filetype = "NvimTree", filetype = 'NvimTree',
text = function() text = function()
return vim.fn.getcwd() return vim.fn.getcwd()
end, end,
highlight = "Directory", highlight = 'Directory',
separator = true, separator = true,
}, },
}, },
@@ -42,21 +43,13 @@ return {
local info = #vim.diagnostic.get(0, { severity = seve.INFO }) local info = #vim.diagnostic.get(0, { severity = seve.INFO })
local hint = #vim.diagnostic.get(0, { severity = seve.HINT }) local hint = #vim.diagnostic.get(0, { severity = seve.HINT })
if error ~= 0 then if error ~= 0 then table.insert(result, { text = '' .. error, link = 'DiagnosticError' }) end
table.insert(result, { text = "" .. error, link = "DiagnosticError" })
end
if warning ~= 0 then if warning ~= 0 then table.insert(result, { text = '' .. warning, link = 'DiagnosticWarn' }) end
table.insert(result, { text = "" .. warning, link = "DiagnosticWarn" })
end
if hint ~= 0 then if hint ~= 0 then table.insert(result, { text = '' .. hint, link = 'DiagnosticHint' }) end
table.insert(result, { text = "" .. hint, link = "DiagnosticHint" })
end
if info ~= 0 then if info ~= 0 then table.insert(result, { text = '' .. info, link = 'DiagnosticInfo' }) end
table.insert(result, { text = "" .. info, link = "DiagnosticInfo" })
end
return result return result
end, end,
}, },
+22 -15
View File
@@ -1,17 +1,24 @@
return { return {
"norcalli/nvim-colorizer.lua", 'norcalli/nvim-colorizer.lua',
-- event = { 'BufEnter', 'BufNewFile' },
config = function() ft = {
local colorizer = require "colorizer" 'markdown',
'javascript',
colorizer.setup { 'css',
"css", 'python',
"javascript", 'json',
"python", 'lua',
"json", 'toml',
"lua", 'yaml',
"toml", },
"yaml", opts = {
} 'css',
end, 'javascript',
'markdown',
'python',
'json',
'lua',
'toml',
'yaml',
},
} }
+4 -4
View File
@@ -1,8 +1,8 @@
return { return {
"LudoPinelli/comment-box.nvim", 'LudoPinelli/comment-box.nvim',
lazy = true, event = { 'BufReadPre', 'BufNewFile' },
keys = { keys = {
{ "<leader>Cb", "<cmd>CBllbox19<CR>", desc = "Insert a default comment box" }, { '<leader>Cb', '<cmd>CBllbox19<CR>', desc = 'Insert a default comment box' },
{ "<leader>Cl", "<cmd>CBccline6<CR>", desc = "Insert a default comment line" }, { '<leader>Cl', '<cmd>CBccline6<CR>', desc = 'Insert a default comment line' },
}, },
} }
+6 -6
View File
@@ -1,26 +1,26 @@
return { return {
{ {
"ThePrimeagen/harpoon", 'ThePrimeagen/harpoon',
enabled = false, enabled = false,
}, },
{ {
"tadmccorkle/markdown.nvim", 'tadmccorkle/markdown.nvim',
enabled = false, enabled = false,
}, },
{ {
"OXY2DEV/markview.nvim", 'OXY2DEV/markview.nvim',
enabled = false, enabled = false,
}, },
{ {
"jakewvincent/mkdnflow.nvim", 'jakewvincent/mkdnflow.nvim',
enabled = false, enabled = false,
}, },
{ {
"willothy/moveline.nvim", 'willothy/moveline.nvim',
enabled = false, enabled = false,
}, },
{ {
"MeanderingProgrammer/render-markdown.nvim", 'MeanderingProgrammer/render-markdown.nvim',
enabled = false, enabled = false,
}, },
} }
+34 -3
View File
@@ -1,5 +1,36 @@
return { return {
"stevearc/dressing.nvim", 'stevearc/dressing.nvim',
event = "VeryLazy", dependencies = {
opts = {}, 'nvim-telescope/telescope.nvim',
},
event = 'VeryLazy',
opts = {
input = {
enabled = true,
-- default_prompt = 'Prompt',
prompt_align = 'left',
insert_only = false,
start_in_insert = true,
border = 'rounded',
relative = 'cursor',
prefer_width = 0.4,
mappings = {
n = {
['<Esc>'] = 'Close',
['q'] = 'Close',
['<CR>'] = 'Confirm',
},
i = {
['<C-c>'] = 'Close',
['<CR>'] = 'Confirm',
['<Up>'] = 'HistoryPrev',
['<Down>'] = 'HistoryNext',
},
},
override = function(conf)
return conf
end,
},
select = {},
},
} }
+1 -1
View File
@@ -12,7 +12,7 @@ return {
event = { "BufReadPre", "BufNewFile" }, event = { "BufReadPre", "BufNewFile" },
opts = { opts = {
_on_attach_pre = function(_, callback) _on_attach_pre = function(_, callback)
if vim.fn.executable "yadm" == 1 then if vim.fn.executable("yadm") == 1 then
require("gitsigns-yadm").yadm_signs(callback) require("gitsigns-yadm").yadm_signs(callback)
else else
callback() callback()
+26 -25
View File
@@ -1,28 +1,29 @@
return { return {
"ThePrimeagen/harpoon", 'ThePrimeagen/harpoon',
branch = "harpoon2", branch = 'harpoon2',
dependencies = { dependencies = {
"nvim-lua/plenary.nvim", 'nvim-lua/plenary.nvim',
"nvim-telescope/telescope.nvim", 'nvim-telescope/telescope.nvim',
}, },
event = 'VeryLazy',
config = function() config = function()
local harpoon = require("harpoon") local harpoon = require('harpoon')
local map = vim.keymap local map = vim.keymap
harpoon:setup() harpoon:setup()
local conf = require("telescope.config").values local conf = require('telescope.config').values
local function toggle_telescope(harpoon_files) local function toggle_telescope(harpoon_files)
local file_paths = {} local file_paths = {}
for _, item in ipairs(harpoon_files.items) do for _, item in ipairs(harpoon_files.items) do
table.insert(file_paths, item.value) table.insert(file_paths, item.value)
end end
require("telescope.pickers") require('telescope.pickers')
.new({}, { .new({}, {
prompt_title = "Harpoon", prompt_title = 'Harpoon',
finder = require("telescope.finders").new_table({ finder = require('telescope.finders').new_table({
results = file_paths, results = file_paths,
}), }),
previewer = conf.file_previewer({}), previewer = conf.file_previewer({}),
@@ -31,29 +32,29 @@ return {
:find() :find()
end end
map.set("n", "<leader>a", function() map.set('n', '<leader>a', function()
harpoon:list():add() harpoon:list():add()
end, { desc = "Harpoon this" }) end, { desc = 'Harpoon this' })
map.set("n", "<C-e>", function() map.set('n', '<C-e>', function()
toggle_telescope(harpoon:list()) toggle_telescope(harpoon:list())
end, { desc = "Harpoon UI" }) end, { desc = 'Harpoon UI' })
map.set("n", "<C-S-!>", function() map.set('n', '<C-S-!>', function()
harpoon:list():select(1) harpoon:list():select(1)
end, { desc = "Mark 1" }) end, { desc = 'Mark 1' })
map.set("n", "<C-S-2>", function() map.set('n', '<C-S-2>', function()
harpoon:list():select(2) harpoon:list():select(2)
end, { desc = "Mark 2" }) end, { desc = 'Mark 2' })
map.set("n", "<C-S-3>", function() map.set('n', '<C-S-3>', function()
harpoon:list():select(3) harpoon:list():select(3)
end, { desc = "Mark 3" }) end, { desc = 'Mark 3' })
map.set("n", "<C-S-4>", function() map.set('n', '<C-S-4>', function()
harpoon:list():select(4) harpoon:list():select(4)
end, { desc = "Mark 4" }) end, { desc = 'Mark 4' })
map.set("n", "<C-S-{>", function() map.set('n', '<C-S-{>', function()
harpoon:list():prev() harpoon:list():prev()
end, { desc = "Cycle back" }) end, { desc = 'Cycle back' })
map.set("n", "<C-S-}>", function() map.set('n', '<C-S-}>', function()
harpoon:list():next() harpoon:list():next()
end, { desc = "Cycle forward" }) end, { desc = 'Cycle forward' })
end, end,
} }
+3 -2
View File
@@ -1,8 +1,9 @@
return { return {
"ziontee113/icon-picker.nvim", 'ziontee113/icon-picker.nvim',
dependencies = { dependencies = {
"stevearc/dressing.nvim", 'stevearc/dressing.nvim',
}, },
event = { 'BufReadPre', 'BufNewFile' },
opts = { opts = {
disable_legacy_commands = true, disable_legacy_commands = true,
}, },
+11 -10
View File
@@ -1,18 +1,19 @@
return { return {
"RRethy/vim-illuminate", 'RRethy/vim-illuminate',
event = { "BufReadPre", "BufNewFile" }, event = { 'BufReadPre', 'BufNewFile' },
opts = { opts = {
providers = { providers = {
"lsp", 'lsp',
"treesitter", 'treesitter',
"regex", 'regex',
}, },
delay = 100, delay = 100,
filetypes_denylist = { filetypes_denylist = {
"help", 'NvimTree',
"man", 'help',
"markdown", 'man',
"md", 'markdown',
'md',
}, },
under_cursor = true, under_cursor = true,
min_count_to_highlight = 1, min_count_to_highlight = 1,
@@ -20,6 +21,6 @@ return {
}, },
config = function(_, opts) config = function(_, opts)
require("illuminate").configure(opts) require('illuminate').configure(opts)
end, end,
} }
+78 -56
View File
@@ -1,109 +1,131 @@
return { return {
"neovim/nvim-lspconfig", 'neovim/nvim-lspconfig',
event = { "BufReadPre", "BufNewFile" }, event = { 'BufReadPost', 'BufNewFile' },
dependencies = { dependencies = {
"hrsh7th/cmp-nvim-lsp", 'williamboman/mason.nvim',
{ "antosha417/nvim-lsp-file-operations", config = true }, 'williamboman/mason-lspconfig.nvim',
{ "folke/neodev.nvim", opts = {} }, 'hrsh7th/cmp-nvim-lsp',
{ 'antosha417/nvim-lsp-file-operations', config = true },
{ 'folke/neodev.nvim', config = true },
}, },
config = function() config = function()
local lspconfig = require "lspconfig" local lspconfig = require('lspconfig')
local mason_lspconfig = require "mason-lspconfig" local mason_lspconfig = require('mason-lspconfig')
local cmp_nvim_lsp = require "cmp_nvim_lsp" local cmp_nvim_lsp = require('cmp_nvim_lsp')
local keymap = vim.keymap local keymap = vim.keymap
vim.api.nvim_create_autocmd("LspAttach", { vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup("UserLspConfig", {}), group = vim.api.nvim_create_augroup('UserLspConfig', {}),
callback = function(ev) callback = function(ev)
local opts = { buffer = ev.buf, silent = true } local opts = { buffer = ev.buf, silent = true }
opts.desc = "Show LSP references" opts.desc = 'Show LSP references'
keymap.set("n", "gR", "<cmd>Telescope lsp_references<CR>", opts) keymap.set('n', 'gR', '<cmd>Telescope lsp_references<CR>', opts)
opts.desc = "Go to declaration" opts.desc = 'Go to declaration'
keymap.set("n", "gD", vim.lsp.buf.declaration, opts) keymap.set('n', 'gD', vim.lsp.buf.declaration, opts)
opts.desc = "Show LSP definitions" opts.desc = 'Show LSP definitions'
keymap.set("n", "gd", "<cmd>Telescope lsp_definitions<CR>", opts) keymap.set('n', 'gd', '<cmd>Telescope lsp_definitions<CR>', opts)
opts.desc = "Show LSP implementations" opts.desc = 'Show LSP implementations'
keymap.set("n", "gi", "<cmd>Telescope lsp_implementations<CR>", opts) keymap.set('n', 'gi', '<cmd>Telescope lsp_implementations<CR>', opts)
opts.desc = "Show LSP type definitions" opts.desc = 'Show LSP type definitions'
keymap.set("n", "gt", "<cmd>Telescope lsp_type_definitions<CR>", opts) keymap.set('n', 'gt', '<cmd>Telescope lsp_type_definitions<CR>', opts)
opts.desc = "See available code actions" opts.desc = 'See available code actions'
keymap.set({ "n", "v" }, "<leader>ca", vim.lsp.buf.code_action, opts) keymap.set({ 'n', 'v' }, '<leader>ca', vim.lsp.buf.code_action, opts)
opts.desc = "Smart rename" opts.desc = 'Smart rename'
keymap.set("n", "<leader>rn", vim.lsp.buf.rename, opts) keymap.set('n', '<leader>rn', vim.lsp.buf.rename, opts)
opts.desc = "Show buffer diagnostics" opts.desc = 'Show buffer diagnostics'
keymap.set("n", "<leader>D", "<cmd>Telescope diagnostics bufnf=0<CR>", opts) keymap.set('n', '<leader>D', '<cmd>Telescope diagnostics bufnf=0<CR>', opts)
opts.desc = "Show line diagnostics" opts.desc = 'Show line diagnostics'
keymap.set("n", "<leader>d", vim.diagnostic.open_float, opts) keymap.set('n', '<leader>d', vim.diagnostic.open_float, opts)
opts.desc = "Go to previous diagnostic" opts.desc = 'Go to previous diagnostic'
keymap.set("n", "[d", vim.diagnostic.goto_prev, opts) keymap.set('n', '[d', vim.diagnostic.goto_prev, opts)
opts.desc = "Go to next diagnostic" opts.desc = 'Go to next diagnostic'
keymap.set("n", "]d", vim.diagnostic.goto_next, opts) keymap.set('n', ']d', vim.diagnostic.goto_next, opts)
opts.desc = "Show documentation for what is under cursor" opts.desc = 'Show documentation for what is under cursor'
keymap.set("n", "K", vim.lsp.buf.hover, opts) keymap.set('n', 'K', vim.lsp.buf.hover, opts)
opts.desc = "Restart LSP" opts.desc = 'Restart LSP'
keymap.set("n", "<leader>rs", ":LspRestart<CR>", opts) keymap.set('n', '<leader>rs', ':LspRestart<CR>', opts)
end, end,
}) })
local capabilities = cmp_nvim_lsp.default_capabilities() local capabilities = cmp_nvim_lsp.default_capabilities()
local signs = { Error = "", Warn = "", Hint = "󰠠 ", Info = "" } local signs = { Error = '', Warn = '', Hint = '󰠠 ', Info = '' }
for type, icon in pairs(signs) do for type, icon in pairs(signs) do
local hl = "DiagnosticSign" .. type local hl = 'DiagnosticSign' .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" }) vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = '' })
end end
mason_lspconfig.setup_handlers { mason_lspconfig.setup_handlers({
-- default handler for installed servers -- default handler for installed servers
function(server_name) function(server_name)
lspconfig[server_name].setup { lspconfig[server_name].setup({
capabilities = capabilities, capabilities = capabilities,
} })
end, end,
["emmet_ls"] = function() ['emmet_ls'] = function()
-- configure emmet language server -- configure emmet language server
lspconfig["emmet_ls"].setup { lspconfig['emmet_ls'].setup({
capabilities = capabilities, capabilities = capabilities,
filetypes = { "html", "typescriptreact", "javascriptreact", "css", "sass", "scss", "less", "svelte" }, filetypes = { 'html', 'typescriptreact', 'javascriptreact', 'css', 'sass', 'scss', 'less', 'svelte' },
} })
end, end,
["bashls"] = function() ['bashls'] = function()
lspconfig["bashls"].setup { lspconfig['bashls'].setup({
capabilities = capabilities, capabilities = capabilities,
filetypes = { "sh", "zsh" }, filetypes = { 'sh', 'zsh' },
} })
end, end,
["lua_ls"] = function() ['lua_ls'] = function()
-- configure lua server (with special settings) -- configure lua server (with special settings)
lspconfig["lua_ls"].setup { lspconfig['lua_ls'].setup({
capabilities = capabilities, capabilities = capabilities,
settings = { settings = {
Lua = { Lua = {
-- make the language server recognize "vim" global -- make the language server recognize "vim" global
diagnostics = { diagnostics = {
globals = { "vim" }, globals = { 'vim' },
}, },
completion = { completion = {
callSnippet = "Replace", callSnippet = 'Replace',
}, },
}, },
}, },
} })
end, end,
} })
vim.diagnostic.config({
virtual_text = {
prefix = '',
},
signs = {
active = signs,
},
update_in_insert = true,
underline = true,
severity_sort = true,
float = {
focusable = false,
style = 'minimal',
border = 'rounded',
source = true,
show_header = true,
prefix = '',
},
})
end, end,
} }
+54 -50
View File
@@ -1,68 +1,72 @@
return { return {
"williamboman/mason.nvim", 'williamboman/mason.nvim',
dependencies = { dependencies = {
"williamboman/mason-lspconfig.nvim", 'williamboman/mason-lspconfig.nvim',
"WhoIsSethDaniel/mason-tool-installer.nvim", 'WhoIsSethDaniel/mason-tool-installer.nvim',
}, },
event = 'VeryLazy',
build = ':MasonUpdate',
config = function() config = function()
local mason = require "mason" local mason = require('mason')
local mason_lspconfig = require "mason-lspconfig" local mason_lspconfig = require('mason-lspconfig')
local mason_tool_installer = require "mason-tool-installer" local mason_tool_installer = require('mason-tool-installer')
mason.setup { mason.setup({
ui = { ui = {
-- style = 'minimal',
border = 'rounded',
icons = { icons = {
package_installed = "", package_installed = '',
package_pending = "", package_pending = '',
package_uninstalled = "", package_uninstalled = '',
}, },
}, },
} })
mason_lspconfig.setup { mason_lspconfig.setup({
ensure_installed = { ensure_installed = {
"ansiblels", 'ansiblels',
"bashls", 'bashls',
"css_variables", 'css_variables',
"cssls", 'cssls',
"cssmodules_ls", 'cssmodules_ls',
"docker_compose_language_service", 'docker_compose_language_service',
"dockerls", 'dockerls',
"emmet_ls", 'emmet_ls',
"eslint", 'eslint',
"html", 'html',
"jinja_lsp", 'jinja_lsp',
"jsonls", 'jsonls',
"lua_ls", 'lua_ls',
"markdown_oxide", 'markdown_oxide',
"marksman", 'marksman',
"pylsp", 'pylsp',
"vimls", 'vimls',
"yamlls", 'yamlls',
}, },
} })
mason_tool_installer.setup { mason_tool_installer.setup({
ensure_installed = { ensure_installed = {
"ansible-lint", 'ansible-lint',
"beautysh", 'beautysh',
"black", 'black',
"eslint_d", 'eslint_d',
"gitlint", 'gitlint',
"htmlhint", 'htmlhint',
"isort", 'isort',
"jinja_lsp", 'jinja_lsp',
"jsonlint", 'jsonlint',
"markdownlint", 'markdownlint',
"prettier", 'prettier',
"pylint", 'pylint',
"shellcheck", 'shellcheck',
"shellharden", 'shellharden',
"stylua", 'stylua',
"trivy", 'trivy',
"yamllint", 'yamllint',
}, },
} })
end, end,
} }
+9
View File
@@ -4,16 +4,25 @@ return {
"nvim-tree/nvim-web-devicons", "nvim-tree/nvim-web-devicons",
"rmehri01/onenord.nvim", "rmehri01/onenord.nvim",
}, },
event = "VeryLazy",
config = function() config = function()
local lualine = require("lualine") local lualine = require("lualine")
local lazy_status = require("lazy.status") local lazy_status = require("lazy.status")
local custom_components = { local custom_components = {
-- ┌
-- │ do not show encoding if UTF-8
-- │ from https://github.com/wookayin/dotfiles/blob/master/nvim/lua/config/statusline.lua
-- └
encoding = function() encoding = function()
local ret, _ = (vim.bo.fenc or vim.go.enc):gsub("^utf%-8$", "") local ret, _ = (vim.bo.fenc or vim.go.enc):gsub("^utf%-8$", "")
return ret return ret
end, end,
-- ┌
-- │ only show non-unix file format
-- │ from https://github.com/wookayin/dotfiles/blob/master/nvim/lua/config/statusline.lua
-- └
fileformat = function() fileformat = function()
local ret, _ = vim.bo.fileformat:gsub("^unix$", "") local ret, _ = vim.bo.fileformat:gsub("^unix$", "")
return ret return ret
+25 -24
View File
@@ -1,12 +1,13 @@
return { return {
"nvim-tree/nvim-tree.lua", 'nvim-tree/nvim-tree.lua',
dependencies = "nvim-tree/nvim-web-devicons", dependencies = 'nvim-tree/nvim-web-devicons',
event = 'VeryLazy',
opts = { opts = {
respect_buf_cwd = false, respect_buf_cwd = false,
view = { view = {
width = 35, width = 35,
relativenumber = true, relativenumber = true,
signcolumn = "yes", signcolumn = 'yes',
}, },
renderer = { renderer = {
indent_markers = { indent_markers = {
@@ -23,10 +24,10 @@ return {
color = true, color = true,
}, },
}, },
git_placement = "after", git_placement = 'after',
modified_placement = "after", modified_placement = 'after',
diagnostics_placement = "signcolumn", diagnostics_placement = 'signcolumn',
padding = " ", padding = ' ',
show = { show = {
file = true, file = true,
folder = true, folder = true,
@@ -38,24 +39,24 @@ return {
bookmarks = true, bookmarks = true,
}, },
glyphs = { glyphs = {
default = "", default = '',
modified = "", modified = '',
folder = { folder = {
default = "", default = '',
open = "", open = '',
empty = "", empty = '',
empty_open = "", empty_open = '',
arrow_closed = "", -- arrow when folder is closed arrow_closed = '', -- arrow when folder is closed
arrow_open = "", -- arrow when folder is open arrow_open = '', -- arrow when folder is open
}, },
git = { git = {
unstaged = "", unstaged = '',
staged = "", staged = '',
unmerged = "", unmerged = '',
renamed = "", renamed = '',
untracked = "", untracked = '',
deleted = "", deleted = '',
ignored = "", ignored = '',
}, },
}, },
}, },
@@ -71,7 +72,7 @@ return {
enable = true, enable = true,
git_ignored = true, git_ignored = true,
dotfiles = false, dotfiles = false,
custom = { ".DS_Store" }, custom = { '.DS_Store' },
}, },
git = { git = {
enable = true, enable = true,
@@ -92,6 +93,6 @@ return {
config = function(_, opts) config = function(_, opts)
vim.g.loaded_netrwPlugin = 1 vim.g.loaded_netrwPlugin = 1
require("nvim-tree").setup(opts) require('nvim-tree').setup(opts)
end, end,
} }
+22 -21
View File
@@ -1,44 +1,45 @@
return { return {
"nvim-telescope/telescope.nvim", 'nvim-telescope/telescope.nvim',
branch = "0.1.x", branch = '0.1.x',
dependencies = { dependencies = {
"nvim-lua/plenary.nvim", 'nvim-lua/plenary.nvim',
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" }, { 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' },
"nvim-tree/nvim-web-devicons", 'nvim-tree/nvim-web-devicons',
"folke/todo-comments.nvim", 'folke/todo-comments.nvim',
}, },
event = 'VeryLazy',
config = function() config = function()
local telescope = require("telescope") local telescope = require('telescope')
local actions = require("telescope.actions") local actions = require('telescope.actions')
local transform_mod = require("telescope.actions.mt").transform_mod local transform_mod = require('telescope.actions.mt').transform_mod
local trouble = require("trouble") local trouble = require('trouble')
local trouble_telescope = require("trouble.sources.telescope") local trouble_telescope = require('trouble.sources.telescope')
local custom_actions = transform_mod({ local custom_actions = transform_mod({
open_trouble_qflist = function(prompt_bufnr) open_trouble_qflist = function(prompt_bufnr)
trouble.toggle("quickfix") trouble.toggle('quickfix')
end, end,
}) })
telescope.setup({ telescope.setup({
defaults = { defaults = {
path_display = { "smart" }, path_display = { 'smart' },
mappings = { mappings = {
n = { n = {
["x"] = actions.delete_buffer, ['x'] = actions.delete_buffer,
["q"] = actions.close, ['q'] = actions.close,
}, },
i = { i = {
["<C-k>"] = actions.move_selection_previous, ['<C-k>'] = actions.move_selection_previous,
["<C-j>"] = actions.move_selection_next, ['<C-j>'] = actions.move_selection_next,
["<C-q>"] = actions.send_selected_to_qflist + custom_actions.open_trouble_qflist, ['<C-q>'] = actions.send_selected_to_qflist + custom_actions.open_trouble_qflist,
["<C-t>"] = trouble_telescope.open, ['<C-t>'] = trouble_telescope.open,
["<ESC>"] = actions.close, ['<ESC>'] = actions.close,
}, },
}, },
}, },
}) })
telescope.load_extension("fzf") telescope.load_extension('fzf')
end, end,
} }
+4 -4
View File
@@ -1,11 +1,11 @@
return { return {
"folke/trouble.nvim", 'folke/trouble.nvim',
dependencies = { dependencies = {
"nvim-tree/nvim-web-devicons", 'nvim-tree/nvim-web-devicons',
"folke/todo-comments.nvim", 'folke/todo-comments.nvim',
}, },
cmd = 'Trouble',
opts = { opts = {
focus = true, focus = true,
}, },
cmd = "Trouble",
} }
+6 -5
View File
@@ -1,13 +1,14 @@
return { return {
"folke/twilight.nvim", 'folke/twilight.nvim',
lazy = true,
opts = { opts = {
context = 10, context = 10,
treesitter = true, treesitter = true,
expand = { expand = {
"function", 'function',
"method", 'method',
"table", 'table',
"if_statement", 'if_statement',
}, },
exclude = {}, -- filetypes to excluise exclude = {}, -- filetypes to excluise
}, },
+2 -1
View File
@@ -1,3 +1,4 @@
return { return {
"ThePrimeagen/vim-be-good", 'ThePrimeagen/vim-be-good',
cmd = 'VimBeGood',
} }
+2 -1
View File
@@ -1,3 +1,4 @@
return { return {
"szw/vim-maximizer", 'szw/vim-maximizer',
event = { 'BufReadPre', 'BufNewFile' },
} }
+7 -3
View File
@@ -1,5 +1,9 @@
return { return {
"folke/zen-mode.nvim", 'folke/zen-mode.nvim',
dependencies = {
'folke/twilight.nvim',
},
cmd = 'ZenMode',
opts = { opts = {
window = { signcolumn = false }, window = { signcolumn = false },
plugins = { plugins = {
@@ -10,11 +14,11 @@ return {
todo = { enabled = true }, todo = { enabled = true },
alacritty = { alacritty = {
enabled = true, enabled = true,
font = "16", font = '16',
}, },
kitty = { kitty = {
enabled = true, enabled = true,
font = "+4", font = '+4',
}, },
}, },
}, },